tech-pkg archive

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

Re: Packaging software without DESTDIR support



As the originator of "all stuff must be DESTDIR-clean" in OpenBSD-stuff,
sometimes it's tough, but always workable in the end.

Various strategies will help:

- shell/makefile tricks:
setting bindir='${DESTDIR}/bin'
can get this thru shell unharmed, and then make is happy.

- sometimes you don't need too many patches for Makefiles. stuff passed
on the command line AFTER make itself *overrides* make contents (e.g.,
make DESTDIR=/somewhere will work even if the Makefile defines DESTDIR).

- find + sed are your friends. I still remember patching TeX to do the right
thing (don't even remember which TeX distribution it was at the time, but it
was definitely one of the hardest ones).

- *always* work with upstream for this on complicated cases. A lot of upstream
software developers *do not* understand DESTDIR concepts. Once you explain it
to them, there's often a good chance they will collaborate. They're much more
involved in the software than you are, and thus there's a good chance they
might "accidentally" redesign their build system to work much better during
the next release (they're going to redesign a lot of things IN ANY CASE, might
as well explain your problem, they might solve it FOR YOU, and if not, at
least you won't get the impression their new shiny build system doesn't nullify
all the work you've been doing these last three months).

I think I can't insist enough on the last point. Porting software isn't a
super-hero job, but working with upstream IS the winning super-power. :)


Home | Main Index | Thread Index | Old Index