summaryrefslogtreecommitdiff
path: root/sysutils/amanda-common
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-06-14 21:54:35 +0000
committerjlam <jlam@pkgsrc.org>2001-06-14 21:54:35 +0000
commit73823d7723543ce6ca9a917d6f2b21a7fd895692 (patch)
tree6fecf45920c1d9223cd8581e17ff3277b345ba66 /sysutils/amanda-common
parent5e56dbb4d7d94958bf62383252077f3991dac2d6 (diff)
downloadpkgsrc-73823d7723543ce6ca9a917d6f2b21a7fd895692.tar.gz
- Migrate BUILD_DEFS to Makefile.common
- Apply the patch from pkg/13188 by Ron Roskens <roskens@elfin.net> to fix problems with hard-coding /var/amanda. - Remove USE_X11 from amanda-server since amanda-plot has already been split out. - Don't explicitly look for headers in ${PREFIX}/include.
Diffstat (limited to 'sysutils/amanda-common')
-rw-r--r--sysutils/amanda-common/Makefile38
-rw-r--r--sysutils/amanda-common/Makefile.common22
-rw-r--r--sysutils/amanda-common/pkg/DEINSTALL46
-rw-r--r--sysutils/amanda-common/pkg/INSTALL25
4 files changed, 96 insertions, 35 deletions
diff --git a/sysutils/amanda-common/Makefile b/sysutils/amanda-common/Makefile
index 603b7efeef0..0426af97181 100644
--- a/sysutils/amanda-common/Makefile
+++ b/sysutils/amanda-common/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.15 2001/06/11 06:34:49 jlam Exp $
+# $NetBSD: Makefile,v 1.16 2001/06/14 21:54:36 jlam Exp $
# FreeBSD Id: Makefile,v 1.9 1997/03/08 05:00:11 gpalmer Exp
#
@@ -18,6 +18,7 @@ INSTALL_FILE= ${WRKDIR}/INSTALL
.include "../../sysutils/amanda-common/Makefile.common"
.if ${OPSYS} == "NetBSD"
+CPPFLAGS= # empty
.if exists(/usr/sbin/user)
ADDUSER= /usr/sbin/useradd
ADDGROUP= /usr/sbin/groupadd
@@ -43,22 +44,31 @@ CONFIGURE_ENV+= ac_cv_lib_ncurses_tgetent=no
CONFIGURE_ENV+= ac_cv_lib_ncurses_tgetent=no
CONFIGURE_ENV+= ac_cv_lib_readline_readline=no
-CPPFLAGS= # empty
+INSTALL_SUBST+= AMUSER=${AMANDA_USER}
+INSTALL_SUBST+= AMGROUP=${AMANDA_GROUP}
+INSTALL_SUBST+= AMVAR=${AMANDA_VAR}
-BUILD_DEFS+= AMANDA_USER AMANDA_SMB AMANDA_VAR
+INSTALL_SUBST+= ADDUSER=${ADDUSER:Q}
+INSTALL_SUBST+= ADDGROUP=${ADDGROUP:Q}
+INSTALL_SUBST+= CAT=${CAT:Q}
+INSTALL_SUBST+= CHGRP=${CHGRP:Q}
+INSTALL_SUBST+= CHMOD=${CHMOD:Q}
+INSTALL_SUBST+= CHOWN=${CHOWN:Q}
+INSTALL_SUBST+= ID=${ID:Q}
+INSTALL_SUBST+= MKDIR=${MKDIR:Q}
+INSTALL_SUBST+= RM=${RM:Q}
+INSTALL_SUBST+= RMDIR=${RMDIR:Q}
+INSTALL_SUBST+= TOUCH=${TOUCH:Q}
+INSTALL_SUBST+= TRUE=${TRUE:Q}
+
+INSTALL_SUBST_SED= ${INSTALL_SUBST:S/=/@!/:S/$/!g/:S/^/ -e s!@/}
pre-install:
- ${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' \
- -e 's|@CHGRP@|${CHGRP}|g' \
- -e 's|@ID@|${ID}|g' \
- -e 's|@TOUCH@|${TOUCH}|g' \
- -e 's|@RM@|${RM}|g' \
- < ${PKGDIR}/INSTALL > ${INSTALL_FILE}
+ ${SED} ${INSTALL_SUBST_SED} ${PKGDIR}/DEINSTALL > ${DEINSTALL_FILE}
+ ${SED} ${INSTALL_SUBST_SED} ${PKGDIR}/INSTALL > ${INSTALL_FILE}
PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} PRE-INSTALL
+post-install:
+ PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
+
.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/amanda-common/Makefile.common b/sysutils/amanda-common/Makefile.common
index 66850f5bd45..69b3d5cf46d 100644
--- a/sysutils/amanda-common/Makefile.common
+++ b/sysutils/amanda-common/Makefile.common
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.4 2000/09/15 15:59:33 skrll Exp $
+# $NetBSD: Makefile.common,v 1.5 2001/06/14 21:54:36 jlam Exp $
#
# common make file fragment shared by all amanda-* pkgs.
#
@@ -12,15 +12,17 @@ AMANDA_GROUP= sysadmin
AMANDA_USER?= backup
AMANDA_VAR?= /var/amanda
+BUILD_DEFS+= AMANDA_USER AMANDA_GROUP AMANDA_SMB AMANDA_VAR
+
USE_LIBTOOL= yes
LTCONFIG_OVERRIDE= ${WRKSRC}/config/ltconfig
+
GNU_CONFIGURE= yes
-CONFIGURE_ARGS+= --with-user=${AMANDA_USER} \
- --with-group=${AMANDA_GROUP} \
- --with-owner=root \
- --with-mmap --with-amandahosts \
- --with-includes=${PREFIX}/include \
- --with-libraries=${PREFIX}/lib \
- --localstatedir=${AMANDA_VAR} \
- --with-gnutar-listdir=${AMANDA_VAR}/gnutar-lists \
- --with-dump-honor-nodump
+CONFIGURE_ARGS+= --with-user=${AMANDA_USER}
+CONFIGURE_ARGS+= --with-group=${AMANDA_GROUP}
+CONFIGURE_ARGS+= --with-owner=root
+CONFIGURE_ARGS+= --with-mmap
+CONFIGURE_ARGS+= --with-amandahosts
+CONFIGURE_ARGS+= --localstatedir=${AMANDA_VAR}
+CONFIGURE_ARGS+= --with-gnutar-listdir=${AMANDA_VAR}/gnutar-lists
+CONFIGURE_ARGS+= --with-dump-honor-nodump
diff --git a/sysutils/amanda-common/pkg/DEINSTALL b/sysutils/amanda-common/pkg/DEINSTALL
index e0456852ffa..a9939d18e20 100644
--- a/sysutils/amanda-common/pkg/DEINSTALL
+++ b/sysutils/amanda-common/pkg/DEINSTALL
@@ -1,26 +1,62 @@
#!/bin/sh
#
-# $NetBSD: DEINSTALL,v 1.1 2000/08/17 02:26:30 wiz Exp $
+# $NetBSD: DEINSTALL,v 1.2 2001/06/14 21:54:36 jlam Exp $
#
PKGNAME=$1
STAGE=$2
USER=@AMUSER@
+AMVAR=@AMVAR@
+
+CAT="@CAT@"
+RMDIR="@RMDIR@"
+TRUE="@TRUE@"
case ${STAGE} in
DEINSTALL)
;;
+
POST-DEINSTALL)
- cat << EOF
+ ${RMDIR} ${AMVAR}/gnutar-lists 2>/dev/null || ${TRUE}
+ ${RMDIR} ${AMVAR} 2>/dev/null || ${TRUE}
+
+ existing_dirs=''
+ for dir in ${AMVAR}/gnutar-lists ${AMVAR}
+ do
+ if [ -d ${dir} ]
+ then
+ existing_dirs="${existing_dirs} ${dir}"
+ fi
+ done
+
+ ${CAT} << EOF
===========================================================================
-If you won't be using ${PKGNAME} any longer, you may want to
-remove the \`${USER}' user.
+If you won't be using ${PKGNAME} any longer, you may want to remove:
+
+ * the \`${USER}' user
+EOF
+
+ if [ -n "${existing_dirs}" ]
+ then
+ ${CAT} << EOF
+
+ * the following directories:
+
+EOF
+ for dir in ${existing_dirs}
+ do
+ echo " ${dir}"
+ done
+ fi
+
+ ${CAT} << EOF
===========================================================================
EOF
;;
+
*)
- echo "Unexpected argument: $2"
+ echo "Unexpected argument: ${STAGE}"
exit 1
;;
esac
diff --git a/sysutils/amanda-common/pkg/INSTALL b/sysutils/amanda-common/pkg/INSTALL
index c8116845627..5c35dda2330 100644
--- a/sysutils/amanda-common/pkg/INSTALL
+++ b/sysutils/amanda-common/pkg/INSTALL
@@ -1,18 +1,22 @@
#!/bin/sh
#
-# $NetBSD: INSTALL,v 1.3 2000/09/03 12:03:17 veego Exp $
+# $NetBSD: INSTALL,v 1.4 2001/06/14 21:54:36 jlam Exp $
PKGNAME=$1
STAGE=$2
AMUSER=@AMUSER@
AMGROUP=@AMGROUP@
+AMVAR=@AMVAR@
ADDUSER=@ADDUSER@
ADDGROUP=@ADDGROUP@
-CHGRP=@CHGRP@
-ID=@ID@
-TOUCH=@TOUCH@
-RM=@RM@
+CHGRP="@CHGRP@"
+CHMOD="@CHMOD@"
+CHOWN="@CHOWN@"
+ID="@ID@"
+MKDIR="@MKDIR@"
+RM="@RM@"
+TOUCH="@TOUCH@"
case ${STAGE} in
PRE-INSTALL)
@@ -39,10 +43,19 @@ PRE-INSTALL)
echo "Done."
fi
;;
+
POST-INSTALL)
+ ${MKDIR} ${AMVAR}
+ ${CHMOD} 700 ${AMVAR}
+ ${CHOWN} ${AMUSER}:${AMGROUP} ${AMVAR}
+
+ ${MKDIR} ${AMVAR}/gnutar-lists
+ ${CHMOD} 700 ${AMVAR}/gnutar-lists
+ ${CHOWN} ${AMUSER}:${AMGROUP} ${AMVAR}/gnutar-lists
;;
+
*)
- echo "Unexpected argument: $2"
+ echo "Unexpected argument: ${STAGE}"
exit 1
;;
esac