summaryrefslogtreecommitdiff
path: root/mail/mailserv/Makefile
blob: c22a83499b56143b18963b233d5f9c8dfe6535b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# $NetBSD: Makefile,v 1.9 2004/01/20 12:19:43 agc Exp $
#

DISTNAME=	mailserv
PKGNAME=	${DISTNAME}-3.29
CATEGORIES=	mail
MASTER_SITES=	http://www.csicop.org/~fitz/www/mailserv/

MAINTAINER=	tech-pkg@NetBSD.org
HOMEPAGE=	http://www.csicop.org/~fitz/www/mailserv/
COMMENT=	WWW interface to several types of mailing list servers

WRKSRC=		${WRKDIR}
DIST_SUBDIR=	${PKGNAME_NOREV}

USE_PERL5=	YES
USE_PKGINSTALL=	YES
NO_BUILD=	YES

PKG_SYSCONFSUBDIR=	mailserv
EGDIR=		${PREFIX}/share/examples/mailserv
CONF_FILES=
.for cf in listproc listserv mail-list maiser majordomo-admin		\
	majordomo-share majordomo mlp pmdf smartlist subscribe
CONF_FILES+=	${EGDIR}/${cf}.cf ${PKG_SYSCONFDIR}/${cf}.cf
.endfor
.undef cf

do-configure:
.for file in mailserv cgi-lib.pl
	cd ${WRKSRC} &&							\
	${CHMOD} 0755 ${file} &&					\
	${CP} ${file} ${file}.old &&					\
	${SED} < ${file}.old > ${file}					\
		-e "s|@PREFIX@|${PREFIX}|g"				\
		-e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"		\
		-e "s|/usr/local/bin/perl|${PREFIX}/bin/perl|g"		\
		-e "s|/usr/bin/perl|${PREFIX}/bin/perl|g"
.endfor
.undef file

do-install:
	${INSTALL_PROGRAM_DIR} ${PREFIX}/libexec/cgi-bin/mailserv
	${INSTALL_SCRIPT} ${WRKSRC}/mailserv ${PREFIX}/libexec/cgi-bin/mailserv
	${INSTALL_SCRIPT} ${WRKSRC}/cgi-lib.pl ${PREFIX}/libexec/cgi-bin/mailserv
	${INSTALL_DATA_DIR} ${EGDIR}
.for cf in listproc listserv mail-list maiser majordomo-admin		\
	majordomo-share majordomo mlp pmdf smartlist subscribe
	${INSTALL_DATA} ${WRKSRC}/${cf}.cf ${EGDIR}
	cd ${PREFIX}/libexec/cgi-bin/mailserv &&			\
	${LN} -s mailserv ${cf}
.endfor
.undef cf
	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/mailserv
.for doc in ChangeLog LICENSE README
	${INSTALL_DATA} ${WRKSRC}/${doc} ${PREFIX}/share/doc/mailserv
.endfor
.undef doc

.include "../../mk/bsd.pkg.mk"