svn commit: r351652 - in head/comms/efax: . files

Adam Weinberger adamw at FreeBSD.org
Sun Apr 20 22:07:48 UTC 2014


Author: adamw
Date: Sun Apr 20 22:07:46 2014
New Revision: 351652
URL: http://svnweb.freebsd.org/changeset/ports/351652
QAT: https://qat.redports.org/buildarchive/r351652/

Log:
  STAGE support, replace pkg-install with some plist
  magic and a pkg-message. Rename patches to avoid
  forbidden characters. Use @sample.

Added:
  head/comms/efax/files/patch-src_Makefile
     - copied unchanged from r351648, head/comms/efax/files/patch-src:Makefile
  head/comms/efax/files/patch-src_fax
     - copied unchanged from r351648, head/comms/efax/files/patch-src:fax
  head/comms/efax/files/pkg-message.in
     - copied, changed from r351648, head/comms/efax/pkg-install
Deleted:
  head/comms/efax/files/patch-src:Makefile
  head/comms/efax/files/patch-src:fax
  head/comms/efax/pkg-install
Modified:
  head/comms/efax/Makefile
  head/comms/efax/pkg-plist

Modified: head/comms/efax/Makefile
==============================================================================
--- head/comms/efax/Makefile	Sun Apr 20 21:41:41 2014	(r351651)
+++ head/comms/efax/Makefile	Sun Apr 20 22:07:46 2014	(r351652)
@@ -3,46 +3,40 @@
 
 PORTNAME=	efax-0.9a
 PORTVERSION=	001114a7
-PORTREVISION=	5
+PORTREVISION=	6
 CATEGORIES=	comms
 MASTER_SITES=	http://shino.pos.to/linux/
 
 MAINTAINER=	ports at FreeBSD.org
 COMMENT=	Fax send/receive program
 
-RUN_DEPENDS=	xloadimage:${PORTSDIR}/x11/xloadimage
+RUN_DEPENDS=xloadimage:${PORTSDIR}/x11/xloadimage
 
-USES=		gmake
-MAN1=		fax.1 \
-		efax.1 \
-		efix.1
 DOCSDIR=	${PREFIX}/share/doc/efax
 PORTDOCS=	COPYING README printcap.sample efax.html fax.html
 MAKE_ENV=	INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
-		INSTALL_SCRIPT="${INSTALL_SCRIPT}" \
-		INSTALL_DATA="${INSTALL_DATA}"
+			INSTALL_SCRIPT="${INSTALL_SCRIPT}" \
+			INSTALL_DATA="${INSTALL_DATA}"
+SUB_FILES=	pkg-message
 
 CONFLICTS=	efax-gtk-*
 
-NO_STAGE=	yes
+post-patch:
+	${REINPLACE_CMD} -e 's,$$(PREFIX),${STAGEDIR}&,g' ${WRKSRC}/Makefile
+
 post-build:
-	${MV} ${WRKSRC}/fax ${WRKSRC}/fax.orig
-	${CAT} ${WRKSRC}/fax.orig | ${SED} -e s!%%PREFIX%%!${PREFIX}!g > \
-		${WRKSRC}/fax
+	${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/fax
 
 OPTIONS_DEFINE=	DOCS
 
-.include <bsd.port.options.mk>
-
 post-install:
-	${INSTALL_DATA} ${WRKSRC}/efax.rc.sample ${PREFIX}/etc
-	${INSTALL_DATA} ${WRKSRC}/efax.rc.sample.ja ${PREFIX}/etc
-.if ${PORT_OPTIONS:MDOCS}
-	@${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${DOCSDIR}
-.endif
-	@${ECHO_CMD}
-	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-	@${ECHO_CMD}
+	${INSTALL_DATA} ${WRKSRC}/efax.rc.sample ${STAGEDIR}${PREFIX}/etc
+	${INSTALL_DATA} ${WRKSRC}/efax.rc.sample.ja ${STAGEDIR}${PREFIX}/etc/efax.rc.ja.sample
+	@${MKDIR} ${STAGEDIR}/var/spool/fax/incoming
+	${TOUCH} ${STAGEDIR}/var/spool/fax/incoming/.keepme
+	@${MKDIR} ${STAGEDIR}/var/spool/fax/outgoing
+	${TOUCH} ${STAGEDIR}/var/spool/fax/outgoing/lock
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
 
 .include <bsd.port.mk>

Copied: head/comms/efax/files/patch-src_Makefile (from r351648, head/comms/efax/files/patch-src:Makefile)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/comms/efax/files/patch-src_Makefile	Sun Apr 20 22:07:46 2014	(r351652, copy of r351648, head/comms/efax/files/patch-src:Makefile)
@@ -0,0 +1,41 @@
+--- Makefile.orig	Wed Jun 28 19:01:22 2000
++++ Makefile	Sun Oct 20 03:06:13 2002
+@@ -3,20 +3,17 @@
+ # Change the following to the name of your ANSI C compiler
+ # (normally gcc).
+ 
+-CC=gcc
++CC?=cc
+ 
+ # Compile/load options. Add -DNO_STRERROR to CFLAGS if _strerror
+ # is undefined
+ 
+-CFLAGS=
+-LDFLAGS=
+-
+ # Change the following to the destination directories for
+ # binaries and man pages. Probably /usr/bin and /usr/man on
+ # Linux, /usr/local/{bin,man} on other systems.
+ 
+-BINDIR=/usr/bin
+-MANDIR=/usr/man
++BINDIR=$(PREFIX)/bin
++MANDIR=$(PREFIX)/man
+ 
+ .c.o:
+ 	$(CC) $(CFLAGS) -c $<
+@@ -32,11 +29,9 @@
+ 	strip efix
+ 
+ install:
+-	cp fax efax efix $(BINDIR)
+-	chmod 755 $(BINDIR)/fax $(BINDIR)/efax $(BINDIR)/efix
+-	cp fax.1 efax.1 efix.1 $(MANDIR)/man1
+-	chmod 644 $(MANDIR)/man1/fax.1 $(MANDIR)/man1/efax.1  \
+-		$(MANDIR)/man1/efix.1
++	$(INSTALL_PROGRAM) efax efix $(BINDIR)
++	$(INSTALL_SCRIPT)  fax $(BINDIR)
++	$(INSTALL_DATA) fax.1 efax.1 efix.1 $(MANDIR)/man1
+ 
+ clean:	
+ 	rm -f efax efix efax.o efix.o efaxlib.o efaxio.o efaxos.o efaxmsg.o

Copied: head/comms/efax/files/patch-src_fax (from r351648, head/comms/efax/files/patch-src:fax)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/comms/efax/files/patch-src_fax	Sun Apr 20 22:07:46 2014	(r351652, copy of r351648, head/comms/efax/files/patch-src:fax)
@@ -0,0 +1,73 @@
+--- fax.orig	Sat May 11 12:39:37 2002
++++ fax	Sat May 11 13:42:33 2002
+@@ -24,7 +24,7 @@
+ #  - do not put spaces before or after the equal (=) signs.
+ #
+ #  - variables can also be set on the command line, for example:
+-#       fax DEV=cua0 send file.ps
++#       fax DEV=cuaa0 send file.ps
+ #    or in a configuration file (see CONFIGFILES below)
+ #
+ 
+@@ -36,16 +36,16 @@
+ EFIX=efix
+ 
+ # The device to which the fax modem is connected (e.g. ttya for
+-# /dev/ttya).  Use a dial-out (cua) device if available.  If
++# /dev/ttya).  Use a dial-out (cuaa) device if available.  If
+ # there are links to this device then all programs must use same
+ # name or the UUCP locking mechanism will fail.  For example, if
+-# /dev/modem is a link to /dev/cua1, then getty, uucp, kermit,
+-# pppd, dip, etc. must *all* use either /dev/modem or /dev/cua1.
++# /dev/modem is a link to /dev/cuaa1, then getty, uucp, kermit,
++# pppd, dip, etc. must *all* use either /dev/modem or /dev/cuaa1.
+ 
+ # 19 Aug 2001 changed by Masaki Shinomiya, 
+ # because 'man efax' sais the default is /dev/modem.
+ DEV=modem
+-#DEV=cua1
++#DEV=cuaa1
+ 
+ # Your fax number in international format, 20 characters maximum.
+ # Use only digits, spaces, and the "+" character.
+@@ -98,7 +98,8 @@
+ # conventions. Protect with single quotes for delayed evaluation.
+ # Add a leading '#' to the file name to use binary format.
+ 
+-LOCK='-x /var/lock/LCK..$DEV' 			# modern systems
++LOCK='-x /var/spool/lock/LCK..$DEV'		# FreeBSD
++# LOCK='-x /var/lock/LCK..$DEV' 		# modern systems
+ # LOCK='-x /usr/spool/uucp/LCK..$DEV'		# older systems
+ # LOCK='-x /var/lock/LCK..$DEV -x /var/spool/uucp/LCK..$DEV' # both
+ # LOCK='-x #/usr/spool/uucp/LCK..$DEV'		# binary format
+@@ -124,7 +125,7 @@
+ # out if you don't need to use config files. Warning: any type of
+ # shell command in these files will be executed.
+ 
+-CONFIGFILES="/etc/efax.rc ${HOME:-~}/.efaxrc ./.efaxrc"
++CONFIGFILES="%%PREFIX%%/etc/efax.rc ${HOME:-~}/.efaxrc ./.efaxrc"
+ 
+ # A command that will generate unique names for logs and received
+ # files.  'date +%m%d%H%M%S' works on most systems.  Protect with
+@@ -421,9 +422,9 @@
+ # efax even if a previous process (e.g. login) has changed it.
+ # Comment out if you don't need to reset device ownership.
+ 
+-OWNER=root.tty		# typical
+-MODE=666		# anybody
+-# MODE=660		# only owner & group
++OWNER=uucp:dialer		# typical
++#MODE=666		# anybody
++MODE=660		# only owner & group
+ 
+ # Regular expression for efax exit codes in log files that will
+ # *not* be saved.  For example, use [145] to ignore exits due to
+@@ -1101,7 +1102,7 @@
+ 
+  if given no arguments, answers the phone and receives a fax.
+ 
+- use VAR=value to set variables (e.g. "fax DEV=cua2 receive")
++ use VAR=value to set variables (e.g. "fax DEV=cuaa2 receive")
+ 
+  session logs are written to a file with the date/time as the
+  file name and extension of .log (except for automatic reception).

Copied and modified: head/comms/efax/files/pkg-message.in (from r351648, head/comms/efax/pkg-install)
==============================================================================
--- head/comms/efax/pkg-install	Sun Apr 20 21:00:52 2014	(r351648, copy source)
+++ head/comms/efax/files/pkg-message.in	Sun Apr 20 22:07:46 2014	(r351652)
@@ -1,10 +1,5 @@
-#!/bin/sh
-if [ "$2" != "POST-INSTALL" ]; then exit 0; fi
-/bin/mkdir -p /var/spool/fax/incoming
-/usr/sbin/chown uucp:dialer /var/spool/fax/incoming
-/bin/mkdir -p /var/spool/fax/outgoing
-/usr/sbin/chown uucp:dialer /var/spool/fax/outgoing
-/usr/bin/touch /var/spool/fax/outgoing/lock
-/usr/sbin/chown uucp:dialer /var/spool/fax/outgoing/lock
-/bin/echo "Copy \${PREFIX}/etc/efax.rc.sample(.ja) to \${PREFIX}/etc/efax.rc"
-/bin/echo "and edit. At least you should modify DEV=, FROM=, and NAME="
+Edit %%PREFIX%%/etc/efax.rc (or replace it with
+%%PREFIX%%/etc/efax.rc.ja first) before using
+efax.
+
+You should at least modify DEV=, FROM=, and NAME=.

Modified: head/comms/efax/pkg-plist
==============================================================================
--- head/comms/efax/pkg-plist	Sun Apr 20 21:41:41 2014	(r351651)
+++ head/comms/efax/pkg-plist	Sun Apr 20 22:07:46 2014	(r351652)
@@ -1,11 +1,17 @@
 bin/fax
 bin/efax
 bin/efix
-etc/efax.rc.sample
-etc/efax.rc.sample.ja
- at cwd /
-var/spool/fax/outgoing/lock
- at dirrmtry var/spool/fax/incoming
- at dirrmtry var/spool/fax/outgoing
- at dirrmtry var/spool/fax
- at cwd
+ at sample etc/efax.rc.sample
+ at sample etc/efax.rc.ja.sample
+man/man1/fax.1.gz
+man/man1/efax.1.gz
+man/man1/efix.1.gz
+ at owner uucp
+ at group dialer
+/var/spool/fax/incoming/.keepme
+/var/spool/fax/outgoing/lock
+ at dirrmtry /var/spool/fax/outgoing
+ at dirrmtry /var/spool/fax/incoming
+ at dirrmtry /var/spool/fax
+ at group
+ at owner


More information about the svn-ports-all mailing list