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

Re: Target path variables in debian/rules

On Fri, 01 Jun 2012 23:37:16 +0200, Ole Wolf wrote:

> > PACKAGE = $(shell dh_listpackages)
> > TMP     = $(CURDIR)/debian/$(PACKAGE)
> > Using this method, you can substitute $(PACKAGE) for the package name,
> > which may make your rules file a little prettier...
> Thanks! It turns out I wasn't entirely off then, because in my original
> rules file I used $(CURDIR) and a hard-coded package name.

> The $(shell dh_listpackages) adds some additional generality, but I was
> actually thinking that there might be some further generalization
> options that might even eliminate the directory structure. That is,
> although man pages currently go to /usr/share/man/man?/.+[0-8](.gz)?,
> somehow I thought some "MANDIR" or similar variable would be more
> appropriate. Still, I'm glad to learn it's Debian kosher to hard-code
> the paths.

That's fine, yes.

If you'd like to avoid the paths in debian/rules, you could also do
something like:

1) create the manpage in d/rules and save it under debian/:

    /script/to/create/manpage > $(CURDIR)/debian/manpage.1

2) let dh_installman install it:

echo debian/manpage.1 > debian/package.manpages 

3) make sure the generated manpage gets removed during clean:

echo debian/manpage.1 > debian/clean

More complicated than just writing it into the temporary
$(CURDIR)/debian/$(PACKAGE)/... path during build, but also works and
makes debian/rules shorter.

gregor, who prefers the first option

 .''`.  Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06
 : :' : Debian GNU/Linux user, admin, and developer  -  http://www.debian.org/
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Rolling Stones: Lastime

Attachment: signature.asc
Description: Digital signature

Reply to: