View | Details | Raw Unified | Return to bug 187976 | Differences between
and this patch

Collapse All | Expand All

(-)sysutils/LPRngTool/Makefile (-45 / +14 lines)
Lines 3-63 Link Here
3
3
4
PORTNAME=	LPRngTool
4
PORTNAME=	LPRngTool
5
PORTVERSION=	1.3.2
5
PORTVERSION=	1.3.2
6
PORTREVISION=	7
6
PORTREVISION=	8
7
CATEGORIES=	sysutils print
7
CATEGORIES=	sysutils print
8
MASTER_SITES=	ftp://ftp.lprng.com/pub/%SUBDIR%/ \
8
MASTER_SITES=	SF/lprng/lprngtool/LRPngTool-${PORTVERSION}
9
		ftp://ftp.cise.ufl.edu/pub/mirrors/%SUBDIR%/ \
10
		ftp://ftp.cs.umn.edu/pub/%SUBDIR%/ \
11
		ftp://ftp.informatik.uni-hamburg.de/pub/os/unix/utils/%SUBDIR%/ \
12
		ftp://ftp.uni-paderborn.de/pub/unix/printer/%SUBDIR%/
13
MASTER_SITE_SUBDIR=	LPRng/LPRngTool
14
EXTRACT_SUFX=	.tgz
15
9
16
MAINTAINER=	ports@FreeBSD.org
10
MAINTAINER=	ports@FreeBSD.org
17
COMMENT=	Configuration Tool for LPRng
11
COMMENT=	Configuration Tool for LPRng
18
12
19
BUILD_DEPENDS=	a2ps:${PORTSDIR}/print/a2ps \
13
LICENSE=	GPLv2
20
		wish:${PORTSDIR}/x11-toolkits/tk-wrapper
21
14
22
#RUN_DEPENDS=	ifhp:${PORTSDIR}/print/ifhp
15
BUILD_DEPENDS=	a2ps:${PORTSDIR}/print/a2ps \
16
		mpage:${PORTSDIR}/print/mpage
23
17
18
USES=		tar:tgz tk
24
USE_GHOSTSCRIPT_BUILD=	yes
19
USE_GHOSTSCRIPT_BUILD=	yes
25
USES=		tk
26
27
.if defined(SYSCONFDIR)
28
PLIST_SUB+=	CWD="" SYSCONFDIR="${SYSCONFDIR:S,^/,,}"
29
.else
30
SYSCONFDIR=	${PREFIX}/etc
31
PLIST_SUB+=	CWD="@comment " SYSCONFDIR="${SYSCONFDIR:S,^${PREFIX}/,,}"
32
.endif
33
34
GNU_CONFIGURE=	yes
20
GNU_CONFIGURE=	yes
21
CONFIGURE_ENV=	ac_cv_path_WISH=${WISH}
22
CONFIGURE_ARGS=	--with-spool_directory=/var/spool/lpd
35
USE_LDCONFIG=	yes
23
USE_LDCONFIG=	yes
36
24
37
CONFIGURE_ARGS+=	--with-spool_directory=/var/spool/lpd \
25
post-patch:
38
			--with-sysconfdir="${SYSCONFDIR}"
26
	@${REINPLACE_CMD} -e \
39
27
		's|=freebsd|=generic|' ${WRKSRC}/Makefile.in
40
MAN1=		lprngtool.1
28
	@${REINPLACE_CMD} -e \
41
29
		'/cp $$p.sample $$p;/d ; \
42
NO_STAGE=	yes
30
		 /chmod 644 $$p;/d' ${WRKSRC}/postinstall.generic.sh
43
pre-everything::
44
	@${ECHO_MSG} "If you want to replace the default printing system with LPRng, use:"
45
	@${ECHO_MSG} "  make PREFIX=/usr SYSCONFDIR=/etc clean all install"
46
	@if [ "${PREFIX}" = "/usr" -a ! -d /usr/man ] ; then \
47
		${ECHO_MSG} "The man pages will be installed in /usr/man." ; \
48
		${ECHO_MSG} "You should make a symbolic link /usr/share/man from /usr/man"; \
49
		${ECHO_MSG} "   ln -s /usr/share/man /usr/man"; \
50
		${ECHO_MSG} "If you do not, you will retain the old FreeBSD man pages."; \
51
		${ECHO_MSG} "See the hier(7) man page for details of the FreeBSD file system"; \
52
		${ECHO_MSG} "layout.  Configure is not equipped to determine the location of"; \
53
		${ECHO_MSG} 'man pages and defaults to $${PREFIX}/man, which is incorrect for FreeBSD.'; \
54
		exit 1; \
55
	fi
56
	@${ECHO_MSG} "Configuring with '${CONFIGURE_ARGS}'"
57
58
post-install:
59
	@if [ ! -f ${SYSCONFDIR}/lprngtool.conf ]; then \
60
		${CP} ${SYSCONFDIR}/lprngtool.conf.sample ${SYSCONFDIR}/lprngtool.conf; \
61
	fi
62
31
63
.include <bsd.port.mk>
32
.include <bsd.port.mk>
(-)sysutils/LPRngTool/pkg-descr (+2 lines)
Lines 8-10 Link Here
8
    enable and disable spooling to print queues
8
    enable and disable spooling to print queues
9
- configure print filters such as IFHP and the RedHat
9
- configure print filters such as IFHP and the RedHat
10
    print filters
10
    print filters
11
12
WWW: http://lprng.sourceforge.net/
(-)sysutils/LPRngTool/pkg-install (-99 lines)
Lines 1-99 Link Here
1
#!/bin/sh
2
PREFIX=/usr
3
SYSCONFDIR=/usr/etc
4
LPRNGTOOL_CONF=/usr/etc/lprngtool.conf
5
MANDIR=/usr/man
6
VERSION=1.3.1
7
#
8
# -- START --
9
# $FreeBSD: head/sysutils/LPRngTool/pkg-install 340719 2014-01-22 15:52:06Z mat $
10
# $Id: postinstall.freebsd.sh,v 1.8 2000/11/27 20:09:31 papowell Exp papowell $
11
#
12
#  If you are building a PORT, see the
13
#  DISTRIBUTIONS/Freebsd directory for a complete port
14
#  building package.
15
# 
16
# This is the shell script that does the postinstall
17
# dynamic fixup
18
#  It needs to be massaged with the information for
19
#  various paths.
20
# If you are building a package,  then you do NOT want
21
#  to have this executed - it will put the sample files
22
#  in place.  You need to do this during the postinstall
23
#  step in the package installation.
24
#
25
echo RUNNING postinstall.freebsd.sh MAKEPACKAGE="$MAKEPACKAGE" MAKEINSTALL="$MAKEINSTALL" PREFIX="$PREFIX" cwd `pwd`
26
if [ "$VERBOSE_INSTALL" != "" ] ; then set -x; fi
27
fix () {
28
	v=`echo $1 | sed -e 's/[:;].*//'`;
29
    p=`echo $2 | sed -e 's/:.*//'`; d=`dirname $p`;
30
	if expr "$p" : "\|" >/dev/null ; then
31
		echo "$v is a filter '$p'" 
32
		exit 0
33
	fi
34
    echo "Putting $p in $d, using $v.sample"
35
	if [ ! -d "$d" ] ; then
36
		echo "Directory $d does not exist!"
37
		mkdir -p $d
38
	fi
39
	if [ -f $v.sample ] ; then
40
		if [ $v.sample != $p.sample ] ; then cp $v.sample $p.sample; fi
41
	elif [ -f $v ] ; then
42
		if [ $v != $p.sample ] ; then cp $v $p.sample; fi
43
	else
44
		echo "Do not have $v.sample or $v"
45
	fi
46
	if [ ! -f $p.sample ] ; then
47
		echo "Do not have $p.sample"
48
	else
49
		if [ -f $p ] ; then
50
			date=`date | awk '{ print $6, $2, $3, $4;}' | sed -e 's/  */_/g' `
51
			echo "Saving $p in $p.$date"
52
			mv $p $p.$date
53
		fi
54
		chmod 644 $p.sample
55
		cp $p.sample $p;
56
		chmod 644 $p;
57
	fi;
58
}
59
# we use the /usr/local/etc/rc.d method to start
60
# lpd
61
# we have to take them from one place and put in another
62
if [ "X$MAKEPACKAGE" = "XYES" ] ; then
63
	hold=${DESTDIR}${PREFIX}/etc
64
	echo "Setting up configuration files path for package creation" ${hold}
65
    if [ ! -d ${hold} ] ; then mkdir -p ${hold} ; fi;
66
    cp lprngtool.conf ${hold}/lprngtool.conf.sample
67
elif [ X$MAKEINSTALL = XYES ] ; then
68
	# we have the port pre-install operation
69
	if [ "$MANDIR" = "/usr/man" -a ! -d ${DESTDIR}/usr/man ] ; then
70
		# we have the dreaded standard installation
71
		# try to make a symbolic link to 
72
		echo "Creating symbolic link from /usr/man to /usr/share/man"
73
		v=`ln -s ${DESTDIR}/usr/share/man ${DESTDIR}/usr/man`;
74
	fi
75
	hold=${DESTDIR}${PREFIX}/etc
76
	echo "Setting up configuration files path for installation" ${hold}
77
    if [ ! -d ${hold} ] ; then mkdir -p ${hold} ; fi;
78
    cp lprngtool.conf ${hold}/lprngtool.conf.sample
79
    fix lprngtool.conf "${DESTDIR}${LPRNGTOOL_CONF}"
80
elif [ "X$2" = "XPOST-INSTALL" ] ; then
81
	# when doing an install from a package we get the file from the package
82
	hold=etc
83
    if [ -f ${hold}/lprngtool.conf.sample ] ; then
84
        fix ${hold}/lprngtool.conf "${LPRNGTOOL_CONF}"
85
    else
86
        echo "WARNING: configuration files missing from package! CWD " `pwd`
87
		ls
88
		exit 1
89
    fi
90
elif [ "X$2" = "XPRE-INSTALL" ] ; then
91
	# we have the port pre-install operation
92
	if [ "$MANDIR" = "/usr/man" -a ! -d /usr/man ] ; then
93
		# we have the dreaded standard installation
94
		# try to make a symbolic link to 
95
		echo "Creating symbolic link from /usr/man to /usr/share/man"
96
		v=`ln -s /usr/share/man /usr/man`;
97
	fi
98
fi
99
exit 0
(-)sysutils/LPRngTool/pkg-plist (-5 / +3 lines)
Lines 1-13 Link Here
1
bin/lprngtool
1
bin/lprngtool
2
@sample etc/lprngtool.conf.sample
2
libexec/filters/atalkprint
3
libexec/filters/atalkprint
3
libexec/filters/ncpprint
4
libexec/filters/ncpprint
4
libexec/filters/smbprint
5
libexec/filters/printerdb
5
libexec/filters/printerdb
6
libexec/filters/smbprint
6
libexec/filters/testpage.asc
7
libexec/filters/testpage.asc
7
libexec/filters/testpage.ps
8
libexec/filters/testpage.ps
8
libexec/filters/testpage-a4.ps
9
libexec/filters/testpage-a4.ps
10
man/man1/lprngtool.1.gz
9
@dirrmtry libexec/filters
11
@dirrmtry libexec/filters
10
%%CWD%%@cwd /
11
@unexec if cmp -s %D/%%SYSCONFDIR%%/lprngtool.conf %D/%%SYSCONFDIR%%/lprngtool.conf.sample; then rm -f %D/%%SYSCONFDIR%%/lprngtool.conf; fi
12
%%SYSCONFDIR%%/lprngtool.conf.sample
13
@exec [ -f %B/lprngtool.conf ] || cp %B/%f %B/lprngtool.conf

Return to bug 187976