Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Nov 2013 17:58:38 +0000 (UTC)
From:      Dirk Meyer <dinoex@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r334112 - in head/net/freebsd-uucp: . files
Message-ID:  <201311171758.rAHHwc00099891@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dinoex
Date: Sun Nov 17 17:58:38 2013
New Revision: 334112
URL: http://svnweb.freebsd.org/changeset/ports/334112

Log:
  - use STAGEDIR
  - use OPTIONS_DEFINE
  - remove base-package

Added:
  head/net/freebsd-uucp/files/patch-uucp-sample-Makefile   (contents, props changed)
Modified:
  head/net/freebsd-uucp/Makefile
  head/net/freebsd-uucp/files/patch-Makefile
  head/net/freebsd-uucp/pkg-plist   (contents, props changed)

Modified: head/net/freebsd-uucp/Makefile
==============================================================================
--- head/net/freebsd-uucp/Makefile	Sun Nov 17 17:54:54 2013	(r334111)
+++ head/net/freebsd-uucp/Makefile	Sun Nov 17 17:58:38 2013	(r334112)
@@ -12,14 +12,10 @@ PKGNAMESUFFIX?=	${PAM_SUFFIX}${PKGNAMESU
 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>

Modified: head/net/freebsd-uucp/files/patch-Makefile
==============================================================================
--- head/net/freebsd-uucp/files/patch-Makefile	Sun Nov 17 17:54:54 2013	(r334111)
+++ head/net/freebsd-uucp/files/patch-Makefile	Sun Nov 17 17:58:38 2013	(r334112)
@@ -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)

Added: head/net/freebsd-uucp/files/patch-uucp-sample-Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/freebsd-uucp/files/patch-uucp-sample-Makefile	Sun Nov 17 17:58:38 2013	(r334112)
@@ -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>

Modified: head/net/freebsd-uucp/pkg-plist
==============================================================================
--- head/net/freebsd-uucp/pkg-plist	Sun Nov 17 17:54:54 2013	(r334111)
+++ head/net/freebsd-uucp/pkg-plist	Sun Nov 17 17:58:38 2013	(r334112)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311171758.rAHHwc00099891>