Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 08 Feb 2005 08:49:35 +0500
From:      Boris Kovalenko <boris@ntmk.ru>
To:        "Johnny C. Lam" <jlam@NetBSD.org>, freebsd-ports@freebsd.org
Subject:   Re: We need new feature for pkg_create?
Message-ID:  <420836CF.20404@ntmk.ru>
In-Reply-To: <4207B227.3070600@NetBSD.org>
References:  <42075175.20603@ntmk.ru> <42078CC1.6080709@NetBSD.org> <42079BB9.1020101@ntmk.ru> <4207B227.3070600@NetBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <jlam@NetBSD.org>
> 
> _______________________________________________
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?420836CF.20404>