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

Re: Registering files at installtion time

Dear dpkg team,

I want to make a follow up to this email and explain how I have - for
now - achieved more or less the same effect as described in the previous

Short repetition:

On Die, 20 Sep 2005, Ralf Stubner wrote:
> Is there any recommended way to register files with dpkg, when these
> files are created only during installation?
> Storing the fonts in .t1c instead of .pfb format halfs the size of the
> package, which would be quite nice to have. The problem is that most
> programs don't understand the .t1c format. Therefore the fonts are
> converted to .pfb format during installation. This of course means that
> they are not under dpkg control. They could get overwritten by other
> packages etc.

What I did is the following:
. create empty files instead of the real .pfb files
. call dh_md5sums
. change the DEBIAN/md5sums file to contain the real ones
. build the deb package

Here the relevant part of the debian/rules:
> binary-indep:  build install
>         dh_testdir 
>         dh_testroot
>         dh_installdirs
>         cd pfb ; for i in *.pfb ; do \
>                 touch ../debian/$(package)/usr/share/texmf/fonts/type1/public/cm-super/$$i ; \
>         done
> 	...
> 	dh_gencontrol
>         # here we should fix the installed sizes!
>         dh_md5sums -X usr/share/texmf/fonts/type1/public/cm-super
>         ( cd pfb ; for i in *.pfb ; do cat $$i | md5sum - | sed -e "s|-|usr/share/texmf/fonts/type1/public/cm-super/$$i|" ; done ) >> debian/$(package)/DEBIAN/md5sums
>         ( cd debian/$(package) ; md5sum usr/share/texmf/fonts/type1/public/cm-super/cm-super.t1c ) >> debian/$(package)/DEBIAN/md5sums
>         dh_builddeb

My questions are:
. is it ok this way, or can we expect some incompatibilities with dpkg?
  I installed the package and tested it with debsums, and it worked,
  but I may have missed something
. Can we expect some dpkg mechanism for achieving this more simply?

Thanks a lot and all the best


Dr. Norbert Preining <preining AT logic DOT at>             Università di Siena
sip:preining@at43.tuwien.ac.at                             +43 (0) 59966-690018
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
A 'yes, maybe' which means 'no'.
			--- Douglas Adams, The Meaning of Liff

Reply to: