From owner-freebsd-questions@FreeBSD.ORG Sat Feb 9 13:08:55 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D13E16A417 for ; Sat, 9 Feb 2008 13:08:55 +0000 (UTC) (envelope-from michael.grunewald@laposte.net) Received: from smtp5-g19.free.fr (smtp5-g19.free.fr [212.27.42.35]) by mx1.freebsd.org (Postfix) with ESMTP id 50A2B13C45B for ; Sat, 9 Feb 2008 13:08:55 +0000 (UTC) (envelope-from michael.grunewald@laposte.net) Received: from smtp5-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp5-g19.free.fr (Postfix) with ESMTP id 946243F615D; Sat, 9 Feb 2008 14:08:53 +0100 (CET) Received: from [192.168.0.73] (ron34-3-82-236-236-194.fbx.proxad.net [82.236.236.194]) by smtp5-g19.free.fr (Postfix) with ESMTP id 176133F6149; Sat, 9 Feb 2008 14:08:53 +0100 (CET) In-Reply-To: <200802072301.29261.fbsd.questions@rachie.is-a-geek.net> References: <86sl07y5fr.fsf@Llea.celt.neu> <200802072301.29261.fbsd.questions@rachie.is-a-geek.net> Mime-Version: 1.0 (Apple Message framework v753) Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: quoted-printable From: =?ISO-8859-1?Q?Micha=EBl_Gr=FCnewald?= Date: Sat, 9 Feb 2008 14:08:49 +0100 To: Mel X-Mailer: Apple Mail (2.753) Cc: =?ISO-8859-1?Q?Micha=EBl_Gr=FCnewald?= , freebsd-questions@freebsd.org Subject: Re: Best practices for managing tweaked ports X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Feb 2008 13:08:55 -0000 Le 7 f=E9vr. 08 =E0 23:01, Mel a =E9crit : > Hi, > > On Tuesday 05 February 2008 13:05:12 Micha=EBl Gr=FCnewald wrote: > >> I am seeking for a word in advice in how to automatically tweak some >> applications, possibly making packages for them. >> >> > >> The current solution is: I have a post install shell script that =20 >> plugs >> my files into appropriate location. This works but there is two >> drawbacks: > > You're almost there: > - Create a file Makefile.local in the port you need a post-install =20 > shell > script executed with contents: > PKGINSTALL=3D/path/to/mycustomizations.sh > > This will then be packaged in packages as well. > See pkg_create(1) and in particular -i option, as well as grep > _LATE_PKG_ARGS /usr/ports/Mk/bsd.port.mk > > If you wanna do it cleaner, may want to wrap that in: > .if !defined(PKGINSTALL) && !exists(${PKGDIR}/pkg-install) > ... > .else > error: > echo "Omg they killed kenny" > /usr/bin/false > .endif > > So that it errors out, if the port starts providing a post-install =20 > script. Thank you very much for the that tip! It seems that this will fail for scripts that have `postinstall', or =20 more accurately, that changes may have to be versed in this =20 postinstall script, right? --=20 Michi