2006-03-14 02:14:26 +01:00
|
|
|
# $NetBSD: Makefile,v 1.24 2006/03/14 01:14:30 jlam Exp $
|
1999-06-08 19:51:25 +02:00
|
|
|
|
2001-04-13 03:42:32 +02:00
|
|
|
DISTNAME= majordomo-1.94.5
|
2005-07-24 00:56:16 +02:00
|
|
|
PKGREVISION= 1
|
1999-06-08 19:51:25 +02:00
|
|
|
CATEGORIES= mail
|
2001-04-13 03:42:32 +02:00
|
|
|
MASTER_SITES= ftp://ftp.sgi.com/other/majordomo/1.94.5/ \
|
|
|
|
ftp://ftp-europe.sgi.com/other/majordomo/1.94.5/
|
1999-06-08 19:51:25 +02:00
|
|
|
EXTRACT_SUFX= .tgz
|
|
|
|
|
|
|
|
MAINTAINER= packages@biology.nmsu.edu
|
1999-06-08 19:54:25 +02:00
|
|
|
HOMEPAGE= http://www.greatcircle.com/majordomo/
|
2001-02-17 18:52:59 +01:00
|
|
|
COMMENT= The Majordomo mailing list manager
|
1999-06-08 19:51:25 +02:00
|
|
|
|
2001-06-04 23:46:57 +02:00
|
|
|
LICENSE= majordomo-license
|
|
|
|
|
2000-08-18 17:57:47 +02:00
|
|
|
.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
|
1999-06-08 19:51:25 +02:00
|
|
|
|
2006-01-06 03:35:32 +01:00
|
|
|
CONFLICTS+= bounce-*
|
|
|
|
|
2005-07-16 03:19:06 +02:00
|
|
|
USE_TOOLS+= perl:run
|
1999-06-08 19:51:25 +02:00
|
|
|
|
2000-12-28 11:34:03 +01:00
|
|
|
NO_BIN_ON_FTP= requires compiled-in hardcoded uid/gid
|
|
|
|
NO_BIN_ON_CDROM= ${NO_BIN_ON_FTP}
|
1999-06-08 19:51:25 +02:00
|
|
|
|
2004-12-03 16:14:50 +01:00
|
|
|
BUILD_TARGET= wrapper
|
1999-06-08 19:51:25 +02:00
|
|
|
INSTALL_TARGET= install install-wrapper
|
|
|
|
|
2006-03-10 21:08:57 +01:00
|
|
|
DEINSTALL_SRC= ${PKGDIR}/DEINSTALL
|
2006-03-14 02:14:26 +01:00
|
|
|
INSTALL_SRC= ${PKGDIR}/INSTALL
|
1999-06-08 19:51:25 +02:00
|
|
|
MAKEFILE= Makefile.netbsd
|
|
|
|
|
1999-06-08 20:26:02 +02:00
|
|
|
MAJORDOMO_TMPDIR?= /var/tmp
|
|
|
|
MAJORDOMO_HOMEDIR?= /home
|
1999-06-08 19:51:25 +02:00
|
|
|
MAJORDOMO_USER?= majordom
|
|
|
|
MAJORDOMO_GROUP?= majordom
|
|
|
|
|
2006-03-10 21:08:57 +01:00
|
|
|
PLIST_SUBST+= HOME=${MAJORDOMO_HOMEDIR:Q} \
|
2005-12-05 21:49:47 +01:00
|
|
|
MAJORDOMO_USER=${MAJORDOMO_USER:Q}
|
2006-03-10 21:08:57 +01:00
|
|
|
MESSAGE_SUBST+= HOME=${MAJORDOMO_HOMEDIR} \
|
|
|
|
MAJORDOMO_USER=${MAJORDOMO_USER} \
|
2001-01-29 12:34:21 +01:00
|
|
|
MAJORDOMO_GROUP=${MAJORDOMO_GROUP}
|
2006-03-10 21:08:57 +01:00
|
|
|
FILES_SUBST+= HOME=${MAJORDOMO_HOMEDIR:Q} \
|
|
|
|
MAJORDOMO_USER=${MAJORDOMO_USER} \
|
|
|
|
MAJORDOMO_GROUP=${MAJORDOMO_GROUP} \
|
|
|
|
ADDUSER=${ADDUSER} ADDGROUP=${ADDGROUP} \
|
|
|
|
CHGRP=${CHGRP} ID=${ID} TOUCH=${TOUCH} RM=${RM}
|
1999-09-06 10:08:17 +02:00
|
|
|
|
1999-06-08 19:51:25 +02:00
|
|
|
DOCDIR= ${PREFIX}/share/doc/majordomo
|
|
|
|
DOCFILES= Changelog FUTURE INSTALL LICENSE NEWLIST README
|
2000-12-08 11:09:22 +01:00
|
|
|
DOCDOCFILES= FAQ README.sequencer list-owner-info \
|
|
|
|
majordomo-faq.html majordomo.lisa6.ps majordomo.ora
|
1999-06-08 19:51:25 +02:00
|
|
|
|
|
|
|
EXDIR= ${PREFIX}/share/examples/majordomo
|
2000-12-08 11:09:22 +01:00
|
|
|
EXDIRS= archives archives/example-l digests \
|
|
|
|
digests/example-l-digest lists
|
1999-06-08 19:51:25 +02:00
|
|
|
EXFILES= example-l.passwd example-l.info
|
|
|
|
EXLISTS= example-l example-l-digest
|
|
|
|
|
1999-08-18 10:46:53 +02:00
|
|
|
BUILD_DEFS+= MAJORDOMO_USER MAJORDOMO_GROUP MAJORDOMO_TMPDIR
|
|
|
|
|
1999-06-08 20:04:10 +02:00
|
|
|
require-uid:
|
|
|
|
${_PKG_SILENT}${_PKG_DEBUG} \
|
2000-12-08 11:09:22 +01:00
|
|
|
if ! ${ID} ${MAJORDOMO_USER} >/dev/null 2>&1; then \
|
|
|
|
${TOUCH} "/tmp/grouptestmajordomo1.$$"; \
|
|
|
|
if ! ${CHGRP} ${MAJORDOMO_GROUP} \
|
|
|
|
"/tmp/grouptestmajordomo1.$$" >/dev/null 2>&1; then \
|
2001-09-12 13:05:12 +02:00
|
|
|
realtarget="root-require-uid"; \
|
2001-10-01 23:15:11 +02:00
|
|
|
action="create user for"; \
|
2001-09-12 13:05:12 +02:00
|
|
|
${_SU_TARGET}; \
|
2000-12-08 11:09:22 +01:00
|
|
|
fi; \
|
|
|
|
${RM} -f "/tmp/grouptestmajordomo1.$$"; \
|
1999-06-08 20:04:10 +02:00
|
|
|
fi
|
|
|
|
|
2006-03-10 21:08:57 +01:00
|
|
|
root-require-uid: pre-install-script
|
1999-06-08 20:04:10 +02:00
|
|
|
|
2006-03-10 21:08:57 +01:00
|
|
|
do-configure: generate-install-scripts
|
1999-06-08 20:04:10 +02:00
|
|
|
@${MAKE} ${.MAKEFLAGS} require-uid
|
1999-06-08 19:51:25 +02:00
|
|
|
@${SED} \
|
|
|
|
-e 's:@PREFIX@:${PREFIX}:g' \
|
|
|
|
-e 's:@LOCALBASE@:${LOCALBASE}:g' \
|
1999-06-08 20:26:02 +02:00
|
|
|
-e 's|@HOME@|${MAJORDOMO_HOMEDIR}|g' \
|
1999-06-08 19:51:25 +02:00
|
|
|
-e 's:@MAJORDOMO_USER@:${MAJORDOMO_USER}:g' \
|
|
|
|
-e "s:@UID@:`${ID} -ru ${MAJORDOMO_USER}`:g" \
|
|
|
|
-e "s:@GID@:`${ID} -rg ${MAJORDOMO_USER}`:g" \
|
1999-06-08 20:26:02 +02:00
|
|
|
-e 's:@TMPDIR@:${MAJORDOMO_TMPDIR}:g' \
|
1999-06-08 19:51:25 +02:00
|
|
|
< ${WRKSRC}/Makefile > ${WRKSRC}/Makefile.netbsd
|
|
|
|
@${SED} \
|
|
|
|
-e 's:@PREFIX@:${PREFIX}:g' \
|
1999-06-08 20:26:02 +02:00
|
|
|
-e 's:@HOME@:${MAJORDOMO_HOMEDIR}:g' \
|
1999-06-08 19:51:25 +02:00
|
|
|
-e 's:@MAJORDOMO_USER@:${MAJORDOMO_USER}:g' \
|
1999-06-08 20:26:02 +02:00
|
|
|
-e 's:@TMPDIR@:${MAJORDOMO_TMPDIR}:g' \
|
1999-06-08 19:51:25 +02:00
|
|
|
< ${WRKSRC}/sample.cf > ${WRKSRC}/majordomo.cf
|
|
|
|
@${SED} \
|
|
|
|
-e 's:@PREFIX@:${PREFIX}:g' \
|
1999-06-08 20:26:02 +02:00
|
|
|
-e 's:@HOME@:${MAJORDOMO_HOMEDIR}:g' \
|
1999-06-08 19:51:25 +02:00
|
|
|
-e 's:@MAJORDOMO_USER@:${MAJORDOMO_USER}:g' \
|
|
|
|
< ${FILESDIR}/aliases.majordomo > ${WRKSRC}/aliases.majordomo
|
|
|
|
|
|
|
|
post-install:
|
|
|
|
@${LN} -sf archive2.pl ${PREFIX}/libexec/majordomo/archive
|
|
|
|
${INSTALL_DATA_DIR} ${DOCDIR}
|
|
|
|
.for file in ${DOCFILES}
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/${file} ${DOCDIR}/${file}
|
|
|
|
.endfor
|
|
|
|
.for file in ${DOCDOCFILES}
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/Doc/${file} ${DOCDIR}/${file}
|
|
|
|
.endfor
|
2001-01-29 12:34:21 +01:00
|
|
|
@${INSTALL_DATA} ${MESSAGE} ${DOCDIR}/post-install-notes
|
1999-06-08 19:51:25 +02:00
|
|
|
${INSTALL} -d -m 775 -o ${MAJORDOMO_USER} -g ${MAJORDOMO_GROUP} ${EXDIR}
|
|
|
|
.for dir in ${EXDIRS}
|
|
|
|
@${INSTALL} -d -m 775 -o ${MAJORDOMO_USER} -g ${MAJORDOMO_GROUP} ${EXDIR}/${dir}
|
|
|
|
.endfor
|
|
|
|
@${INSTALL_DATA} -o ${MAJORDOMO_USER} -g ${MAJORDOMO_GROUP} \
|
|
|
|
${WRKSRC}/aliases.majordomo ${EXDIR}/aliases.majordomo
|
|
|
|
@${INSTALL_DATA} -o ${MAJORDOMO_USER} -g ${MAJORDOMO_GROUP} \
|
2004-11-04 13:20:18 +01:00
|
|
|
${FILESDIR}/keep_me ${EXDIR}/archives/example-l/.keep_me
|
1999-06-08 19:51:25 +02:00
|
|
|
@${INSTALL_DATA} -o ${MAJORDOMO_USER} -g ${MAJORDOMO_GROUP} \
|
2004-11-04 13:20:18 +01:00
|
|
|
${FILESDIR}/keep_me ${EXDIR}/digests/example-l-digest/.keep_me
|
1999-06-08 19:51:25 +02:00
|
|
|
.for file in ${EXFILES}
|
|
|
|
@${INSTALL_DATA} -o ${MAJORDOMO_USER} -g ${MAJORDOMO_GROUP} \
|
|
|
|
${FILESDIR}/${file} ${EXDIR}/lists/${file}
|
|
|
|
.endfor
|
|
|
|
.for file in ${EXLISTS}
|
|
|
|
@${INSTALL} -m 664 -o ${MAJORDOMO_USER} -g ${MAJORDOMO_GROUP} \
|
|
|
|
/dev/null ${EXDIR}/lists/${file}
|
|
|
|
.endfor
|
|
|
|
@${LN} -sf example-l.info ${EXDIR}/lists/example-l-digest.info
|
|
|
|
@${LN} -sf example-l.passwd ${EXDIR}/lists/example-l-digest.passwd
|
|
|
|
${INSTALL_DATA} -o ${MAJORDOMO_USER} -g ${MAJORDOMO_GROUP} \
|
|
|
|
${WRKSRC}/majordomo.cf ${EXDIR}/majordomo.cf
|
|
|
|
|
|
|
|
# verify installation; requires interaction
|
2001-01-29 12:34:21 +01:00
|
|
|
test: install
|
1999-06-08 19:51:25 +02:00
|
|
|
${PREFIX}/libexec/majordomo/wrapper config-test
|
|
|
|
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|