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

Re: dh_install by file suffix



Ole Streicher:
Hi again,

I think youe way could be to put the file list into a variable in d/rules, and expand the list the .install, like:

---------- debian/iraf.install -----------------------------
etc/iraf/
usr/lib/iraf/bin/ecl.e
[... other fixed content]
${env:IRAF_FILES}
----------------------------8<------------------------------

----------- debian/rules -----------------------------------

override_dh_install:
     IRAF_FILES=$$(cd debian/tmp; \
             find usr/lib/iraf/pkg usr/lib/iraf/unix/hlib \
              -name \*.hlp \
           -o -name \*.hd \
           [...] \
           -o -name \*.fits) \
         dh_install

----------------------------8<------------------------------

where the same procedure however would required for all four binary packages. This does not look very nice, and also according to the debhelper manpage, one can only expand to 4096 chars (I'd need ~40,000).

Any better idea?

Best

Ole


On 15.07.23 21:01, Ole Streicher wrote:
Hi,

I am upgrading one of my packages (iraf) to a new version. The new version comes with a "make install", which installs everything under /usr/lib/iraf/ (and some other places).

The "iraf" source package needs to divide these files into user related files (for the "iraf" and "iraf-noao" packages) and development related files (for "iraf-dev" and "iraf-noao-dev"). The problem is now, that the division is (mainly) by extension:

- *.cl, *.hd, *.men, *.par (... and some other extensions) should go to
   the user packages

- *.a, *.h should go to the development packages

(the "iraf" and "iraf-noao" package differ mainly by that "iraf" collects them in the pkg/ subdir, and "iraf-noao" in the noao subdir).

The main question here is: how can I do a dh_install selective by file suffix? Otherwise, I would need to list the (~1000) files in the "install" files, which is not very robust.

Cheers

Ole


Hi,

This would also not work as substitution is applied /after/ "word splitting". That is ${env:IRAF_FILES} would be treated as a single file (with a lot of spaces) even if you could do the expansion.

The order is deliberate as it is the way debhelper supports files with spaces (by using substitution variables to introduce them post split).

However, using dh-exec (as proposed elsewhere) might be an option as then the substitution happens before the split and dh-exec does not have the substitution limit either. I believe you can make dh-exec env variables as well. However, it has a different syntax then debhelper.

Alternatively, you can just make the .install executable in general and have it output what you want. That option also works.

Best regards,
Niels


Reply to: