Date: Thu, 31 Oct 2013 17:37:10 +0200 From: Peter Pentchev <roam@ringlet.net> To: Kimmo Paasiala <kpaasial@gmail.com> Cc: Baptiste Daroussin <bapt@freebsd.org>, freebsd-ports <freebsd-ports@freebsd.org> Subject: Re: Staging DOs & DON'Ts Message-ID: <20131031153710.GA5610@straylight.m.ringlet.net> In-Reply-To: <CA%2B7WWSfVYOudaobwe39aYYXt5y0MxJRomD3bE--cUPK%2BCukUqw@mail.gmail.com> References: <CA%2B7WWSfVYOudaobwe39aYYXt5y0MxJRomD3bE--cUPK%2BCukUqw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--3V7upXqbjpZ4EhLz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 31, 2013 at 10:30:03AM +0200, Kimmo Paasiala wrote: > Could we have this as an example what not to in the Makefile. It is > from the latest change to the Makefile of sysutils/kiconvtool. >=20 >=20 > MAKE_ARGS=3D PREFIX=3D"${STAGEDIR}${PREFIX}" >=20 > This breaks stuff that edits scripts in place trying to replace paths > that depend on the value of PREFIX. The proper way to do this - and the way it's done on other OSs and other packaging systems that have the staging directory feature - is to: 1. Pass ${STAGEDIR} as a separate build option to the actual build; it's traditional to pass it as the DESTDIR option: MAKE_ARGS+=3D DESTDIR=3D"${STAGEDIR}" 2. Make sure that the actual build honors DESTDIR. Yes, this does mean that in some cases you have to patch the upstream build system; please do this, and please forward the patches to the upstream authors, so that their piece of software builds properly everywhere and is that much easier to package for everyone :) Yes, this does involve a bit more work for the port maintainer in cases when the upstream build system is not yet DESTDIR-aware. Yes, this is actually a good thing, this is practically an omission of the upstream authors that will be corrected sooner or later by somebody, either the FreeBSD port maintainer or some other packager :) G'luck, Peter --=20 Peter Pentchev roam@ringlet.net roam@FreeBSD.org p.penchev@storpool.com PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13 If you think this sentence is confusing, then change one pig. --3V7upXqbjpZ4EhLz Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) iQIcBAEBCAAGBQJScnkgAAoJEGUe77AlJ98TJJoQAJvR1646sxOw4rRHLySujDEb 6/ZW4pLqjr0ZebfFOLoWXNXzXeITD2toB4ow/HwD9U21mYo27UXMLC/UuoW9NBfM xoggldikpe3hDS37j4wof6hAdWnIjoqqljVZ64Vr/TsgBb8CK4Sa1+HWshJJcUyK JXzvt4MXCZrxLDYoI4FFxZbraD1caknMSiU08Dy7i4fsk8KC4Sk7T7J+MdmU+MQB 3pIPF4uqd38FooDILAB1pyyux1yahWpRxPJa/mp434XH1dHC0hABusn7M0z980qq XSkbSkREqEoQfNmSf/cp6AmCVqNW9wGsNSQgU/iGA0JkZDmsHFeAl9Zoc0bCP9K4 OuMaNG/j8ZjrIzIoKdPCCP2KzTH5Bjkr+e4+hQ5RJJg9ycqc71SA2lBVrB0vdqdv +8WZP2oPkXJ66y7SIcotxxw+nlSq3/eYvSW+mfDzTZNYbvFoaVxjkfe60zO+tA2s P6TOq9cnbOtyReT7d7h36UsYDiIUxFY1UU8hmHwjzg75XJGT4rykFNdffUjnnUrm 5jmTFwiLvPcWonBtRO/GmcbAE+aWAq36rNUsnz9DvmyvIwZgzs/wr/jO+EHr81eQ Sjd/SF1n4qS0UF4VPXebkrwPMHDnvifvzr//u9xtNT65UnuPC2e9lwvLGVqHA1hi U/Y2p5fZqRu5NVtT2B/m =GZ6f -----END PGP SIGNATURE----- --3V7upXqbjpZ4EhLz--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20131031153710.GA5610>