diff options
author | wiz <wiz@pkgsrc.org> | 2000-08-17 02:26:26 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2000-08-17 02:26:26 +0000 |
commit | 1b6dd0619e5d308d9038af1fbf458fedff4a29da (patch) | |
tree | a97eb9d7f99b2c40ea0fef10d31edb2bc03c3341 /sysutils/amanda-common | |
parent | 4bf506aa3573cb0c76a2d422869319993ccc73be (diff) | |
download | pkgsrc-1b6dd0619e5d308d9038af1fbf458fedff4a29da.tar.gz |
USE_PKGLIBTOOL -> USE_LIBTOOL.
While I'm here, convert it from addnerd to user.
Diffstat (limited to 'sysutils/amanda-common')
-rw-r--r-- | sysutils/amanda-common/Makefile | 31 | ||||
-rw-r--r-- | sysutils/amanda-common/Makefile.common | 4 | ||||
-rw-r--r-- | sysutils/amanda-common/pkg/DEINSTALL | 27 | ||||
-rw-r--r-- | sysutils/amanda-common/pkg/INSTALL | 45 | ||||
-rw-r--r-- | sysutils/amanda-common/pkg/PLIST | 4 |
5 files changed, 99 insertions, 12 deletions
diff --git a/sysutils/amanda-common/Makefile b/sysutils/amanda-common/Makefile index 53c8899999b..8a2a74728c3 100644 --- a/sysutils/amanda-common/Makefile +++ b/sysutils/amanda-common/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2000/02/05 06:51:44 wiz Exp $ +# $NetBSD: Makefile,v 1.10 2000/08/17 02:26:28 wiz Exp $ # FreeBSD Id: Makefile,v 1.9 1997/03/08 05:00:11 gpalmer Exp # @@ -10,15 +10,25 @@ MASTER_SITES= ftp://ftp.cs.umd.edu/pub/amanda/ MAINTAINER= packages@netbsd.org HOMEPAGE= http://www.amanda.org/ +DEINSTALL_FILE= ${WRKDIR}/DEINSTALL +INSTALL_FILE= ${WRKDIR}/INSTALL + .include "../../mk/bsd.prefs.mk" .include "../../sysutils/amanda-common/Makefile.common" .if ${OPSYS} == "NetBSD" -DEPENDS+= addnerd-1.6:../../sysutils/addnerd -ADDUSER_PROG= ${PREFIX}/sbin/addnerd +.if exists(/usr/sbin/user) +ADDUSER= /usr/sbin/useradd +ADDGROUP= /usr/sbin/groupadd +.else +DEPENDS+= user>=20000313:../../sysutils/user +ADDUSER= ${LOCALBASE}/sbin/useradd +ADDGROUP= ${LOCALBASE}/sbin/groupadd +.endif .elif ${OPSYS} == "SunOS" -ADDUSER_PROG= useradd MAKE_ENV+= CPPFLAGS=-D_LARGEFILE64_SOURCE +ADDUSER= useradd +ADDGROUP= groupadd .endif CONFIGURE_ARGS+= --without-server --without-restore --without-client @@ -28,10 +38,13 @@ CPPFLAGS= # empty BUILD_DEFS+= AMANDA_USER AMANDA_SMB AMANDA_VAR pre-install: - case `${GREP} -c '^${AMANDA_USER}:' /etc/passwd || ${TRUE}` in \ - 0) \ - ${SETENV} ${MAKE_ENV} ${ADDUSER_PROG} -g ${AMANDA_GROUP} ${AMANDA_USER} \ - ;; \ - esac + ${SED} -e 's|@AMUSER@|${AMANDA_USER}|g' \ + < ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE} + ${SED} -e 's|@AMUSER@|${AMANDA_USER}|g' \ + -e 's|@AMGROUP@|${AMANDA_GROUP}|g' \ + -e 's|@ADDUSER@|${ADDUSER}|g' \ + -e 's|@ADDGROUP@|${ADDGROUP}|g' \ + < ${PKGDIR}/INSTALL > ${INSTALL_FILE} + PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL .include "../../mk/bsd.pkg.mk" diff --git a/sysutils/amanda-common/Makefile.common b/sysutils/amanda-common/Makefile.common index 4b7cb69ac43..8ebf1ecfee3 100644 --- a/sysutils/amanda-common/Makefile.common +++ b/sysutils/amanda-common/Makefile.common @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.common,v 1.2 2000/06/01 11:23:41 rh Exp $ +# $NetBSD: Makefile.common,v 1.3 2000/08/17 02:26:29 wiz Exp $ # # common make file fragment shared by all amanda-* pkgs. # @@ -12,7 +12,7 @@ AMANDA_GROUP= sysadmin AMANDA_USER?= backup AMANDA_VAR?= /var/amanda -USE_PKGLIBTOOL= yes +USE_LIBTOOL= yes GNU_CONFIGURE= yes CONFIGURE_ARGS+= --with-user=${AMANDA_USER} \ --with-group=${AMANDA_GROUP} \ diff --git a/sysutils/amanda-common/pkg/DEINSTALL b/sysutils/amanda-common/pkg/DEINSTALL new file mode 100644 index 00000000000..e0456852ffa --- /dev/null +++ b/sysutils/amanda-common/pkg/DEINSTALL @@ -0,0 +1,27 @@ +#!/bin/sh +# +# $NetBSD: DEINSTALL,v 1.1 2000/08/17 02:26:30 wiz Exp $ +# + +PKGNAME=$1 +STAGE=$2 + +USER=@AMUSER@ + +case ${STAGE} in +DEINSTALL) + ;; +POST-DEINSTALL) + cat << EOF +=========================================================================== +If you won't be using ${PKGNAME} any longer, you may want to +remove the \`${USER}' user. +=========================================================================== +EOF + ;; +*) + echo "Unexpected argument: $2" + exit 1 + ;; +esac +exit 0 diff --git a/sysutils/amanda-common/pkg/INSTALL b/sysutils/amanda-common/pkg/INSTALL new file mode 100644 index 00000000000..16c5f6d16b6 --- /dev/null +++ b/sysutils/amanda-common/pkg/INSTALL @@ -0,0 +1,45 @@ +#!/bin/sh +# +# $NetBSD: INSTALL,v 1.1 2000/08/17 02:26:31 wiz Exp $ + +PKGNAME=$1 +STAGE=$2 + +AMUSER=@AMUSER@ +AMGROUP=@AMGROUP@ +ADDUSER=@ADDUSER@ +ADDGROUP=@ADDGROUP@ + +case ${STAGE} in +PRE-INSTALL) + # Group... the default's shipped with NetBSD + # We need to check that ${AMGROUP} exists before adding the user. + # + if grep "^${AMGROUP}:" /etc/group + then + echo "Group '${AMGROUP}' already exists...proceeding." + else + echo "Creating '${AMGROUP}' group..." + ${ADDGROUP} ${AMGROUP} + echo "Done." + fi + + # use finger to be able to use NIS, ... + # + if finger ${AMUSER} 2>&1 | grep >/dev/null "no such user" + then + echo "Creating '${AMUSER}' user..." + ${ADDUSER} -c "Amanda User" -g ${AMGROUP} -s /bin/sh ${AMUSER} + echo "Done." + else + echo "User '${AMUSER}' already exists...proceeding." + fi + ;; +POST-INSTALL) + ;; +*) + echo "Unexpected argument: $2" + exit 1 + ;; +esac +exit 0 diff --git a/sysutils/amanda-common/pkg/PLIST b/sysutils/amanda-common/pkg/PLIST index 4a2264d31ec..8f990d0dec8 100644 --- a/sysutils/amanda-common/pkg/PLIST +++ b/sysutils/amanda-common/pkg/PLIST @@ -1,7 +1,9 @@ -@comment $NetBSD: PLIST,v 1.2 1999/04/04 23:34:46 tron Exp $ +@comment $NetBSD: PLIST,v 1.3 2000/08/17 02:26:32 wiz Exp $ lib/libamanda.a +lib/libamanda.la lib/libamanda-2.4.1p1.so.0.0 lib/libamtape.a +lib/libamtape.la lib/libamtape-2.4.1p1.so.0.0 libexec/versionsuffix man/man8/amanda.8 |