1 # $NetBSD: Makefile,v 1.15 2012/10/23 17:19:16 asau Exp $
6 MASTER_SITES
= ${MASTER_SITE_GNU
:=uucp
/}
8 MAINTAINER
= pkgsrc-users@NetBSD.org
10 HOMEPAGE
= http
://www.airs.com
/ian
/uucp.html
12 USE_TOOLS
+= mkdir
:run pwd
:run rmdir
:run
15 .
include "../../mk/bsd.prefs.mk"
17 PKG_SYSCONFSUBDIR
= uucp
19 CONFIGURE_ARGS
+= --with-user
=${UUCP_USER}
20 CONFIGURE_ARGS
+= --with-newconfigdir
=${PKG_SYSCONFDIR
:Q
}
21 CONFIGURE_ARGS
+= --with-oldconfigdir
=${PKG_SYSCONFDIR
:Q
}
22 CONFIGURE_ENV
+= MKDIR_PROGRAM
=${TOOLS_MKDIR
:Q
}
23 CONFIGURE_ENV
+= PWD_PROGRAM
=${TOOLS_PWD_CMD
:Q
}
24 CONFIGURE_ENV
+= RMDIR_PROGRAM
=${TOOLS_RMDIR
:Q
}
26 PKG_GROUPS
= ${UUCP_GROUP}
27 PKG_USERS
= ${UUCP_USER}:${UUCP_GROUP}
29 PKG_GROUPS_VARS
+= UUCP_GROUP
30 PKG_USERS_VARS
+= UUCP_USER
32 PKG_GECOS.
${UUCP_USER}= UNIX-to-UNIX Copy
33 PKG_HOMES.
${UUCP_USER}= ${UUCP_PUBDIR}
34 PKG_SHELL.
${UUCP_USER}= ${PREFIX}/sbin
/uucico
38 # UUCP installs many set-uid "uucp" binaries.
39 SPECIAL_PERMS
+= bin
/cu
${UUCP_USER} ${BINGRP} 4555
40 SPECIAL_PERMS
+= bin
/uucp
${UUCP_USER} ${BINGRP} 4555
41 SPECIAL_PERMS
+= bin
/uuname
${UUCP_USER} ${BINGRP} 4555
42 SPECIAL_PERMS
+= bin
/uustat
${UUCP_USER} ${BINGRP} 4555
43 SPECIAL_PERMS
+= bin
/uux
${UUCP_USER} ${BINGRP} 4555
44 SPECIAL_PERMS
+= sbin
/uucico
${UUCP_USER} ${BINGRP} 4555
45 SPECIAL_PERMS
+= sbin
/uuxqt
${UUCP_USER} ${BINGRP} 4555
47 SENDMAIL?
= /usr
/sbin
/sendmail
49 UUCP_MAIL_PROGRAM?
= ${SENDMAIL} -t
50 UUCP_CMDPATH?
= /bin
/usr
/bin
${PREFIX}/bin
51 UUCP_LOCKDIR?
= ${VARBASE}/spool
/lock
52 UUCP_SPOOLDIR?
= ${VARBASE}/spool
/uucp
53 UUCP_PUBDIR?
= ${UUCP_SPOOLDIR}public
54 UUCP_LOGFILE?
= ${UUCP_SPOOLDIR}/Log
55 UUCP_STATFILE?
= ${UUCP_SPOOLDIR}/Stats
56 UUCP_DEBUGFILE?
= ${UUCP_SPOOLDIR}/Debug
58 OWN_DIRS_PERMS
= ${UUCP_LOCKDIR} ${UUCP_USER} ${UUCP_GROUP} 0755
59 OWN_DIRS_PERMS
+= ${UUCP_SPOOLDIR} ${UUCP_USER} ${UUCP_GROUP} 0755
60 OWN_DIRS_PERMS
+= ${UUCP_PUBDIR} ${UUCP_USER} ${UUCP_GROUP} 1777
63 SUBST_STAGE.nbsd
= post-configure
64 SUBST_MESSAGE.nbsd
= Fixing Makefiles for rmail and uucpd.
65 SUBST_FILES.nbsd
= rmail
/Makefile uucpd
/Makefile
66 SUBST_FILES.nbsd
+= uucpd
/pathnames.h uucpd
/uucpd
.8
67 SUBST_VARS.nbsd
= PREFIX PKGMANDIR UUCPD_CPPFLAGS UUCPD_LIBS \
68 INSTALL_PROGRAM INSTALL_MAN
70 # The necessary libraries and compiler flags for building uucpd are
73 UUCPD_CPPFLAGS.
${OPSYS}= # empty
74 .if exists
(/usr
/include/utmp.h
)
75 UUCPD_CPPFLAGS.
${OPSYS}+= -DSUPPORT_UTMP
77 .if exists
(/usr
/include/utmpx.h
)
78 UUCPD_CPPFLAGS.
${OPSYS}+= -DSUPPORT_UTMPX
80 UUCPD_CPPFLAGS.Darwin
= -DSUPPORT_UTMP
81 UUCPD_CPPFLAGS.
*= # empty
82 UUCPD_LIBS.Darwin
= # empty
83 UUCPD_LIBS.
*= -lcrypt
-lutil
84 OPSYSVARS
+= UUCPD_CPPFLAGS UUCPD_LIBS
86 INSTALLATION_DIRS
= bin libexec
${PKGMANDIR}/man8 share
/examples
/uucp
89 ${CP} -R
${FILESDIR}/rmail
${WRKSRC}
90 ${CP} -R
${FILESDIR}/uucpd
${WRKSRC}
92 # Generate a policy_local.h header file that holds the paths used by UUCP.
94 @
${RM} -f
${WRKSRC}/policy_local.h
95 .for _var_ in MAIL_PROGRAM CMDPATH LOCKDIR \
96 SPOOLDIR PUBDIR LOGFILE \
98 @
${ECHO} "#define ${_var_} \""${UUCP_
${_var_}:Q
}"\"" \
99 >> ${WRKSRC}/policy_local.h
103 cd
${FILESDIR}/etc
; for f in
[a-z
]*; do \
104 ${TEST} -f
$$f || continue
; \
105 ${INSTALL_DATA} $$f ${DESTDIR}${PREFIX}/share
/examples
/uucp
; \
108 .
include "../../mk/bsd.pkg.mk"