From owner-freebsd-ports@FreeBSD.ORG Thu Oct 31 15:46:50 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 54A0EAAB for ; Thu, 31 Oct 2013 15:46:50 +0000 (UTC) (envelope-from roam@ringlet.net) Received: from nimbus.fccf.net (nimbus.fccf.net [77.77.144.35]) by mx1.freebsd.org (Postfix) with ESMTP id 0FC9B28ED for ; Thu, 31 Oct 2013 15:46:49 +0000 (UTC) Received: from straylight.m.ringlet.net (unknown [78.90.13.150]) by nimbus.fccf.net (Postfix) with ESMTPSA id 2C52BDD for ; Thu, 31 Oct 2013 17:37:11 +0200 (EET) Received: from roam (uid 1000) (envelope-from roam@ringlet.net) id b0e01a by straylight.m.ringlet.net (DragonFly Mail Agent v0.9); Thu, 31 Oct 2013 17:37:10 +0200 Date: Thu, 31 Oct 2013 17:37:10 +0200 From: Peter Pentchev To: Kimmo Paasiala Subject: Re: Staging DOs & DON'Ts Message-ID: <20131031153710.GA5610@straylight.m.ringlet.net> Mail-Followup-To: Kimmo Paasiala , freebsd-ports , Baptiste Daroussin References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3V7upXqbjpZ4EhLz" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Baptiste Daroussin , freebsd-ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Oct 2013 15:46:50 -0000 --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--