CDBS and /usr/share/doc links
Hi,
I wanted to switch to CDBS which makes the packaging awesome easy. One
final problem was left for me when I tried to use implement the following
multi binary package:
Extract from control:
Package: tipptrainer
Architecture: any
Depends: tipptrainer-data, ...
...
Package: tipptrainer-data-de
Architecture: all
Depends: tipptrainer (=${Source-Version})
...
Package: tipptrainer-data-en
Architecture: all
Depends: tipptrainer (=${Source-Version})
Intended layout:
$ ls -l `pwd`/debian/tipptrainer-data-*/usr/share/doc
/home/tillea/debian-maintain/packages/tipptrainer/tipptrainer-0.6.0/debian/tipptrainer-data-de/usr/share/doc:
lrwxr-xr-x 1 tillea admin 11 2005-06-09 10:55 tipptrainer-data-de -> tipptrainer
/home/tillea/debian-maintain/packages/tipptrainer/tipptrainer-0.6.0/debian/tipptrainer-data-en/usr/share/doc:
lrwxr-xr-x 1 tillea admin 11 2005-06-09 10:55 tipptrainer-data-en -> tipptrainer
My try in debian/rules to accomplish this:
pkg=tipptrainer
pkg-de=$(pkg)-data-de
pkg-en=$(pkg)-data-en
binary/$(pkg-de)::
rm -rf `pwd`/debian/$(pkg-de)/usr/share/doc/$(pkg-de)
ln -s $(pkg) `pwd`/debian/$(pkg-de)/usr/share/doc/$(pkg-de)
binary/$(pkg-en)::
rm -rf `pwd`/debian/$(pkg-en)/usr/share/doc/$(pkg-en)
ln -s $(pkg) `pwd`/debian/$(pkg-en)/usr/share/doc/$(pkg-en)
The result is that the build log (sorry for German locale, but the problem seems
to be clear):
dh_installdocs -ptipptrainer-data-de ./README ./NEWS ./TODO ./BUGS ./AUTHORS
...
dh_installdocs -ptipptrainer-data-en ./README ./NEWS ./TODO ./BUGS ./AUTHORS
...
dh_builddeb -ptipptrainer-data-de
dpkg-deb: baue Paket »tipptrainer-data-de« in »../tipptrainer-data-de_0.6.0-3_all.deb«.
rm -rf `pwd`/debian/tipptrainer-data-de/usr/share/doc/tipptrainer-data-de
ln -s tipptrainer `pwd`/debian/tipptrainer-data-de/usr/share/doc/tipptrainer-data-de
dh_shlibdeps -ptipptrainer-data-en
dh_gencontrol -ptipptrainer-data-en
dh_md5sums -ptipptrainer-data-en
dh_builddeb -ptipptrainer-data-en
dpkg-deb: baue Paket »tipptrainer-data-en« in »../tipptrainer-data-en_0.6.0-3_all.deb«.
rm -rf `pwd`/debian/tipptrainer-data-en/usr/share/doc/tipptrainer-data-en
ln -s tipptrainer `pwd`/debian/tipptrainer-data-en/usr/share/doc/tipptrainer-data-en
So the links are implemented right *after* the package is builded instead of
*before*. I tried to get a clue from
https://wiki.duckcorp.org/DebianPackagingTutorial/CDBS
where this is stated this way, but I tried "install/foo::" first which does
not help either, because this is executed before dh_installdocs which fails
obviousely because there is no directory to copy the docs to. So the
question is:
Is there any hook which I can insert inbetween dh_installdocs and dh_builddeb ?
Or is there even a hook for doing exactly what I want: Link to the doc directory
of a dependant package?
Kind regards
Andreas.
--
http://fam-tille.de
Reply to: