From owner-freebsd-ports@FreeBSD.ORG Tue Feb 8 03:49:38 2005 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C6DDF16A4CE for ; Tue, 8 Feb 2005 03:49:38 +0000 (GMT) Received: from mail.ntmk.ru (mail.ntmk.ru [217.114.241.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id A6E0F43D31 for ; Tue, 8 Feb 2005 03:49:37 +0000 (GMT) (envelope-from boris@ntmk.ru) Received: from boris.nikom.ru ([10.1.16.195]) by mail.ntmk.ru with esmtp (Exim 4.34) id 1CyMNc-00039T-2N; Tue, 08 Feb 2005 08:49:36 +0500 Message-ID: <420836CF.20404@ntmk.ru> Date: Tue, 08 Feb 2005 08:49:35 +0500 From: Boris Kovalenko User-Agent: Mozilla Thunderbird 1.0 (X11/20050203) X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Johnny C. Lam" , freebsd-ports@freebsd.org References: <42075175.20603@ntmk.ru> <42078CC1.6080709@NetBSD.org> <42079BB9.1020101@ntmk.ru> <4207B227.3070600@NetBSD.org> In-Reply-To: <4207B227.3070600@NetBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: We need new feature for pkg_create? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Feb 2005 03:49:38 -0000 Johnny C. Lam wrote: Hello! I already have pkg-install which do all I need. INSTALL/DEINSTALL script for pkg_add is created automaticaly by "make package" from my pkg-install script. So, if I create my own INSTALL file, it will be overwritted in process. > > You can create a .../quagga/INSTALL file that looks like (there's more > to making a nice INSTALL script but the idea is there): > > #!/bin/sh > case $2 in > POST-INSTALL) > [ -f /etc/rc.d/quagga ] || > cp ${PKG_PREFIX}/share/quagga/quagga.sh /etc/rc.d/quagga > ;; > esac > > and then also a DEINSTALL script that looks like: > > #!/bin/sh > case $w in > DEINSTALL) > [ -f /etc/rc.d/quagga ] && rm -f /etc/rc.d/quagga > ;; > esac > > When this package is added with pkg_add, then the INSTALL script will be > invoked as per the pkg_add man page, and will copy the rc.d script into > place at post-install time. The DEINSTALL script will remove it during > deinstallation. > > I hope this helps! > > Cheers, > > -- Johnny Lam > > _______________________________________________ > freebsd-ports@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org" > -- Regards, Boris