aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordinoex <dinoex@FreeBSD.org>2013-11-18 01:58:38 +0800
committerdinoex <dinoex@FreeBSD.org>2013-11-18 01:58:38 +0800
commit177854c4e8f7e05ba65af556eafc5640a832c871 (patch)
tree72655b2d109d68cfb54d3fb9b5788ef44bde111a
parentcb315c1446404521e8bbf21269f7e3b20b16585f (diff)
downloadfreebsd-ports-gnome-177854c4e8f7e05ba65af556eafc5640a832c871.tar.gz
freebsd-ports-gnome-177854c4e8f7e05ba65af556eafc5640a832c871.tar.zst
freebsd-ports-gnome-177854c4e8f7e05ba65af556eafc5640a832c871.zip
- use STAGEDIR
- use OPTIONS_DEFINE - remove base-package
-rw-r--r--net/freebsd-uucp/Makefile77
-rw-r--r--net/freebsd-uucp/files/patch-Makefile8
-rw-r--r--net/freebsd-uucp/files/patch-uucp-sample-Makefile10
-rw-r--r--net/freebsd-uucp/pkg-plist15
4 files changed, 61 insertions, 49 deletions
diff --git a/net/freebsd-uucp/Makefile b/net/freebsd-uucp/Makefile
index 390997d0ec70..57fdb61ee75f 100644
--- a/net/freebsd-uucp/Makefile
+++ b/net/freebsd-uucp/Makefile
@@ -12,14 +12,10 @@ PKGNAMESUFFIX?= ${PAM_SUFFIX}${PKGNAMESUFFIX2}
MAINTAINER= dinoex@FreeBSD.org
COMMENT= FreeBSD-modified Taylor UUCP (unix-to-unix copy program)
-NO_STAGE= yes
+NEED_ROOT= yes
USE_BZIP2= yes
-MANCOMPRESSED= yes
-
-MAN1= cu.1 uuconv.1 uucp.1 uulog.1 uuname.1 uupick.1 uustat.1 \
- uuto.1 uux.1
-MAN8= uuchk.8 uucico.8 uusched.8 uuxqt.8 uucpd.8
+PKGMESSAGE= ${WRKDIR}/pkg-message
INFO= uucp
VARLOG= uucp/common_sources/policy.h uucp/uucico/uucico.8 \
uucp/uucp/uucp.1 uucp/uux/uux.1 uucp/uuxqt/uuxqt.8
@@ -31,9 +27,15 @@ BPKGNAME= base-uucp-1.06.1
# fix errros for -std=iso9899:1999 in FreeBSD 5.1
MAKE_ENV+= CSTD=gnu99
-.include <bsd.port.pre.mk>
+OPTIONS_DEFINE=PAM ENCRYPTED_PASSWORDS VAR_LOG
+OPTIONS_DEFAULT=
+NO_OPTIONS_SORT=yes
+ENCRYPTED_PASSWORDS_DESC= use encrypted passwords in etc/uucp/sys
+VAR_LOG_DESC= put logfiles into /var/log
+
+.include <bsd.port.options.mk>
-.if defined(WITH_PAM)
+.if ${PORT_OPTIONS:MPAM}
PAM_SUFFIX= -pam
MAKE_ENV+= WITH_PAM=${WITH_PAM}
CONFLICTS?= freebsd-uucp-1.*
@@ -41,7 +43,7 @@ CONFLICTS?= freebsd-uucp-1.*
CONFLICTS?= freebsd-uucp-pam-1.*
.endif
-.if defined(WITH_UUCP_ENCRYPTED_PASSWORDS)
+.if ${PORT_OPTIONS:MENCRYPTED_PASSWORDS}
MAKE_ENV+= WITH_ENCRYPTED_PASSWORDS=1
.endif
@@ -52,22 +54,17 @@ BUILD_DEPENDS= cvs:${PORTSDIR}/devel/cvs
post-extract:
@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} \
${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} extract)
- ${REINPLACE_CMD} -e 's|doc ||' \
- ${WRKSRC}/uucp/Makefile
+ ${REINPLACE_CMD} -e 's|doc ||' ${WRKSRC}/uucp/Makefile
do-configure:
-.for i in ${FIXME}
${REINPLACE_CMD} -e "s=/usr/local/=${PREFIX}/=" \
- ${WRKSRC}/${i}
-.endfor
-.if defined(WITH_UUCP_VAR_LOG) || defined(UUCP_WITH_VAR_LOG)
-.for i in ${VARLOG}
+ ${FIXME:S,^,${WRKSRC}/,}
+.if ${PORT_OPTIONS:MVAR_LOG}
${REINPLACE_CMD} \
-e "s=/var/spool/uucp/Log=/var/log/uucp/Log=" \
-e "s=/var/spool/uucp/Debug=/var/log/uucp/Debug=" \
-e "s=/var/spool/uucp/Stats=/var/log/uucp/Stats=" \
- ${WRKSRC}/${i}
-.endfor
+ ${VARLOG:S,^,${WRKSRC}/,}
@${ECHO_CMD} " .." >> ${WRKSRC}/uucp.mtree
@${ECHO_CMD} "/set uname=root gname=wheel mode=0755" \
>> ${WRKSRC}/uucp.mtree
@@ -77,19 +74,28 @@ do-configure:
@${ECHO_CMD} " uucp" >> ${WRKSRC}/uucp.mtree
@${ECHO_CMD} " .." >> ${WRKSRC}/uucp.mtree
.endif
-.if defined(WITH_UUCP_ENCRYPTED_PASSWORDS)
+.if ${PORT_OPTIONS:MENCRYPTED_PASSWORDS}
${REINPLACE_CMD} \
-e "s=HAVE_ENCRYPTED_PASSWORDS.*=HAVE_ENCRYPTED_PASSWORDS 1=" \
${WRKSRC}/${POLICY}
.endif
- @(cd ${CONFIGURE_WRKSRC}; ${SETENV} ${MAKE_ENV} \
+ @${CAT} pkg-message > ${WRKDIR}/pkg-message
+.if ${PORT_OPTIONS:MPAM}
+ @${ECHO_MSG} "" >> ${WRKDIR}/pkg-message
+ @${ECHO_MSG} "Add this lines to your pam.conf:" >> ${WRKDIR}/pkg-message
+ @${CAT} ${FILESDIR}/uucp-pam.conf >> ${WRKDIR}/pkg-message
+.endif
+ (cd ${CONFIGURE_WRKSRC}; ${SETENV} ${MAKE_ENV} \
${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} configure)
+pre-install:
+ ${MKDIR} ${STAGEDIR}/var
+
post-install:
- -${MKDIR} ${PREFIX}/info
- ${INSTALL_DATA} ${WRKSRC}/uucp/doc/uucp.info ${PREFIX}/info/
- @${CHOWN} uucp:uucp ${PREFIX}/etc/uucp
- @${CHMOD} 750 ${PREFIX}/etc/uucp
+ -${MKDIR} ${STAGEDIR}${PREFIX}/info
+ ${INSTALL_DATA} ${WRKSRC}/uucp/doc/uucp.info ${STAGEDIR}${PREFIX}/info/
+ ${CHOWN} uucp:uucp ${STAGEDIR}${PREFIX}/etc/uucp
+ ${CHMOD} 750 ${STAGEDIR}${PREFIX}/etc/uucp
@${ECHO_CMD} "updating ${ROOTDIR}/etc/services"
@${CP} ${ROOTDIR}/etc/services ${ROOTDIR}/etc/services.bak
@(grep -v ^suucp ${ROOTDIR}/etc/services.bak; \
@@ -104,30 +110,9 @@ post-install:
@${ECHO_MSG} "Use the 'make upgrade' command to copy your old configuration"
@${ECHO_MSG} "files from /etc/uucp to the new location in ${PREFIX}/etc/uucp"
@${ECHO_MSG}
- @${CAT} ${PKGMESSAGE}
-.if defined(WITH_PAM)
- @${ECHO_MSG} "Add this lines to your pam.conf:"
- @${CAT} ${FILESDIR}/uucp-pam.conf
-.endif
-.if exists(/usr/sbin/uuchk) && !defined(PACKAGE_BUILDING)
- ${MAKE} base-package
-.endif
upgrade:
@${ECHO_MSG} "Copying old configuration files from /etc/uucp to ${PREFIX}/etc/uucp"
@${CP} -rp /etc/uucp ${PREFIX}/etc/uucp
-base-package:
- @if [ ! -d ${PKG_DBDIR}/${BPKGNAME} ]; then \
- ${ECHO_MSG} "===> Registering installation for ${BPKGNAME}"; \
- ${MKDIR} ${PKG_DBDIR}/${BPKGNAME}; \
- ${PKG_CMD} -v -c ${FILESDIR}/pkg-comment \
- -d ${FILESDIR}/pkg-descr -f ${FILESDIR}/pkg-plist \
- -p / -o ${PKGORIGIN} -O ${BPKGNAME} \
- > ${PKG_DBDIR}/${BPKGNAME}/+CONTENTS; \
- ${CP} ${FILESDIR}/pkg-descr ${PKG_DBDIR}/${BPKGNAME}/+DESC; \
- ${CP} ${FILESDIR}/pkg-comment \
- ${PKG_DBDIR}/${BPKGNAME}/+COMMENT; \
- fi
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/net/freebsd-uucp/files/patch-Makefile b/net/freebsd-uucp/files/patch-Makefile
index 6d2179e8e662..eb884bd8d3ef 100644
--- a/net/freebsd-uucp/files/patch-Makefile
+++ b/net/freebsd-uucp/files/patch-Makefile
@@ -1,5 +1,5 @@
--- Makefile.orig 2003-06-17 08:08:21.000000000 +0200
-+++ Makefile 2009-03-27 20:32:40.000000000 +0100
++++ Makefile 2013-11-17 10:23:16.000000000 +0100
@@ -1,21 +1,21 @@
PREFIX?= /usr/local
@@ -12,11 +12,13 @@
+ (cd etc && ${MAKE} all)
install: uucp uucpd etc
- mtree -deU -f uucp.mtree -p /var
- mtree -deU -f local.mtree -p ${PREFIX}
+- mtree -deU -f uucp.mtree -p /var
+- mtree -deU -f local.mtree -p ${PREFIX}
- cd uucp && make install
- cd uucpd && make install
- cd etc && make install
++ mtree -deU -f uucp.mtree -p ${DESTDIR}/var
++ mtree -deU -f local.mtree -p ${DESTDIR}${PREFIX}
+ (cd uucp && ${MAKE} install)
+ (cd uucpd && ${MAKE} install)
+ (cd etc && ${MAKE} install)
diff --git a/net/freebsd-uucp/files/patch-uucp-sample-Makefile b/net/freebsd-uucp/files/patch-uucp-sample-Makefile
new file mode 100644
index 000000000000..b353fd33e41b
--- /dev/null
+++ b/net/freebsd-uucp/files/patch-uucp-sample-Makefile
@@ -0,0 +1,10 @@
+--- uucp/sample/Makefile.orig 2002-07-22 07:02:07.000000000 +0200
++++ uucp/sample/Makefile 2013-11-17 13:31:15.000000000 +0100
+@@ -12,6 +12,6 @@
+
+ install:
+ ${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 440 ${FILES} \
+- ${PREFIX}/etc/uucp
++ ${DESTDIR}${PREFIX}/etc/uucp
+
+ .include <bsd.prog.mk>
diff --git a/net/freebsd-uucp/pkg-plist b/net/freebsd-uucp/pkg-plist
index defc1873f05e..8713624e0e01 100644
--- a/net/freebsd-uucp/pkg-plist
+++ b/net/freebsd-uucp/pkg-plist
@@ -16,6 +16,20 @@ etc/uucp/passwd.sample
etc/uucp/port.sample
etc/uucp/sys1.sample
etc/uucp/sys2.sample
+man/man1/cu.1.gz
+man/man1/uuconv.1.gz
+man/man1/uucp.1.gz
+man/man1/uulog.1.gz
+man/man1/uuname.1.gz
+man/man1/uupick.1.gz
+man/man1/uustat.1.gz
+man/man1/uuto.1.gz
+man/man1/uux.1.gz
+man/man8/uuchk.8.gz
+man/man8/uucico.8.gz
+man/man8/uusched.8.gz
+man/man8/uuxqt.8.gz
+man/man8/uucpd.8.gz
@exec chown uucp:uucp %D/etc/uucp
@exec chmod 750 %D/etc/uucp
libexec/uucpd
@@ -33,5 +47,6 @@ sbin/uuconv
@dirrm etc/periodic
@dirrm etc/uucp
@dirrm libexec/uucp
+@exec pw usermod uucp -s %D/libexec/uucp/uucico
@exec echo "updating /etc/services"; cp /etc/services /etc/services.bak; (grep -v ^suucp /etc/services.bak ; echo "suucp 4031/tcp #UUCP over SSL"; echo "suucp 4031/udp #UUCP over SSL") > /etc/services
@unexec echo "updating /etc/services"; cp /etc/services /etc/services.bak; (grep -v ^suucp /etc/services.bak ) > /etc/services