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

Re: Getting dh_install to do what we need



Goswin von Brederlow <goswin-v-b@web.de> writes:

> Arno Töll <debian@toell.net> writes:
>
>> Your own script-fu in debian/rules or external scripts isn't exactly the
>> next best thing to read and learn how a foreign package works and there
>> /are/ use cases where dh_install isn't flexible enough to deal with the
>> problem by using the possibilities you had before. Renaming files and
>> multi-arch support is what comes me in mind immediately.
>
> Yes, there are cases where dh_install isn't the tool you should or even
> can use.
>
> But that is what override is for. All this feature does it replace an
> override for dh_install with one to chmod +x the script.

To be honest, I find executable debhelper files far cleaner and more
understandable than a maze of overrides in something that is very far
from your old trusty Makefile by now.

At least, if the various tasks one wishes to do with the executable
config files is standardised one way or the other (and that can be done:
see dpatch, which provided executable patches for *years*, and we never
saw wide-spread abuse, did we?), then all it takes is having a look at
the executable config file, perhaps the manpage of the interpreter tool,
and done.

It can make perfect sense.

And in the end, I prefer this:

,----
| #!/usr/lib/debhelper/dh_subst
| debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}/libfoo.so.*
| debian/${VARIANT}/foo.conf /etc/foo/
`----

Over this:

,----
| override_dh_install:
| 	install -d debian/libfoo0/usr/lib/${DEB_HOST_MULTIARCH}
| 	cp debian/tmp/usr/lib/${DEB_HOST_MULTIARCH}/libfoo.so.* debian/libfoo0/usr/lib/${DEB_HOST_MULTIARCH}/ 
|
| 	cp debian/${VARIANT}/foo.conf debian/libfoo0/etc/foo/
`----

Perhaps it is just me, but the former makes much more sense to me, and
is easier to modify, and easier to copy to other similar packages (or
even duplicate it, if one's building multiple binaries from the same
source, all of which require similar treatment).

-- 
|8]


Reply to: