[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: CDBS and Pear packages



Le Jeu 29 Septembre 2005 19:03, Charles Fry a écrit :
> Greetings,
>
> While reporting bug #330726 suggesting that dh-make-php move to the
> use of CDDB, I realized that it wouldn't be that hard to create
> /usr/share/cdbs/1/rules/pearpackage.mk to provide a common, centrally
> maintained build file that we could all use in our Pear packages. The
> main contents would be something like:
>
>
>     include /usr/share/cdbs/1/rules/debhelper.mk
>
>     # PEAR_PKG must be set somehow
>     # DEBIAN_PKG must be set somehow
>     PEAR=/usr/bin/pear
>     PEAR_PHP_DIR=/usr/share/php
>     SOURCE_DIR=`ls -d $(PEAR_PKG)-*`
>
>     common-configure-indep::
>         ln -f -s ../package.xml $(SOURCE_DIR)
>         xsltproc --nonet --novalid debian/changelog.xsl package.xml >
> debian/Changelog
>
>     clean::
>         rm -f debian/pearrc debian/Changelog
> $(SOURCE_DIR)/package.xml
>
>     common-install-indep::
>         $(PEAR) install --nodeps -R debian/$(DEBIAN_PKG)
> $(SOURCE_DIR)/package.xml
>
>         # remove unwanted files
>         rm -f debian/pearrc \
>               debian/$(DEBIAN_PKG)$(PEAR_PHP_DIR)/.lock \
>               debian/$(DEBIAN_PKG)$(PEAR_PHP_DIR)/.filemap
>
>         # move documentation to correct location
>         mkdir -p debian/$(DEBIAN_PKG)/usr/share/doc/$(DEBIAN_PKG)
>         mv -i debian/$(DEBIAN_PKG)$(PEAR_PHP_DIR)/docs/$(PEAR_PKG)/*
> debian/$(DEBIAN_PKG)/usr/share/doc/$(DEBIAN_PKG) rmdir
> debian/$(DEBIAN_PKG)$(PEAR_PHP_DIR)/docs/$(PEAR_PKG) ln -s
> ../../doc/$(DEBIAN_PKG)
> debian/$(DEBIAN_PKG)$(PEAR_PHP_DIR)/docs/$(PEAR_PKG)
>
>
> What do you guys think?

uhoh, I didn't saw that mail before the last I sent you. so you already 
know that I agree with that :D

though, cdbs uses $(cdbs_*) variables generally, to avoid clashes. so 
your snipplet isn't cdbs-ish at all, but the idea is here. it's only a 
coding-style question.

IMHO, you should write a real /usr/share/cdbs/1/class/pear.mk (it's a 
class, not rules IMHO), with the right style, and propose it to 
inclusion on the bts.

until it's incorporated in cdbs itself, you only have to ship it with 
your package (that's why it can be shipped in dh-make-php until cdbs 
has it)

-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

Attachment: pgpG8MvWMTUnp.pgp
Description: PGP signature


Reply to: