Am 2006-11-24 16:04:48, schrieb andremachado: > Hello, > I am trying to create a rudimentary package for php-java-bridge.sf.net. > The problem now is that makefiles does not accept regular bash commands and > need different sintax. Also, Policy define to avoid "bashisms". > Reading > http://www.gnu.org/software/make/manual/make.html#Shell-Function > I found the "$(shell command parms)" . > But it still leaving EXT_DIR empty. > Please, what am I doing wrong? > Regards > Andre Felipe Machado > http://www.techforce.com.br > > > # EXT_DIR=`/usr/bin/php-config --extension-dir`; > EXT_DIR = $(shell /usr/bin/php-config --extension-dir); > > mkdir -p ${CURDIR}/debian/php-java-bridge/var/lib/tomcat5/webapps; \ > cp ${CURDIR}/debian/php-java-bridge/${EXT_DIR}/JavaBridge.war > ${CURDIR}/debian/php-java-bridge/var/lib/tomcat5/webapps;
In my package "tdmenu" I use:
----[ '~/src/tdmenu-0.4.0/debian/rules' ]---------------------------
#!/usr/bin/make -f
#
# Rules for making the tdmenu binary packages - Michelle Konzack
# Copyright (C) 2006 Michelle Konzack <[EMAIL PROTECTED]>
#
SHELL = /bin/bash
ifneq ($(strip $(shell which update-menus)),)
VERS_MENU := $(shell dpkg -s menu |grep '^Version:' |sed 's/^Version:\ //')
LANG_MENU := $(shell ls /usr/share/locale/*/LC_MESSAGES/menu-sections.mo |sed
's,/usr/share/locale/,,;s,/LC_MESSAGES/menu-sections.mo,,')
endif
LANG_DMS := $(wildcard ??) $(wildcard ??_??)
LANG_NOT := $(filter-out $(LANG_DMS), $(LANG_MENU))
PKGEXT := common $(filter-out en, $(LANG_DMS))
LANG_PO := $(notdir $(wildcard l10n/*.po))
PKGVERS := $(patsubst tdmenu-%,%,$(notdir $(PWD)))
<snip>
update-menu-methods:
dh_testdir
<snip>
echo "Package: tdmenu" >>debian/control
echo "Architecture: all" >>debian/control
echo -n "Depends: tdmenu-common (= $(PKGVERS))" >>debian/control
#==============================================================================
for CC in $(LANG_DMS) ; do \
if [ "$$CC" != "en" ] ; then \
CC2=`echo "$$CC" |sed 'y/BCNRTW_/bcnrtw-/'` ; \
echo -n ", tdmenu-$$CC2 (= $(PKGVERS))" >>debian/control ; \
fi ; \
done
<snip>
--------------------------------------------------------------------
It works perfectly
Thanks, Greetings and nice Day
Michelle Konzack
Systemadministrator
Tamay Dogan Network
Debian GNU/Linux Consultant
--
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack Apt. 917 ICQ #328449886
50, rue de Soultz MSM LinuxMichi
0033/6/61925193 67100 Strasbourg/France IRC #Debian (irc.icq.com)
signature.pgp
Description: Digital signature

