aboutsummaryrefslogtreecommitdiff
path: root/print/alignmargins
diff options
context:
space:
mode:
authorMichael Nottebrock <lofi@FreeBSD.org>2005-01-28 10:49:14 +0000
committerMichael Nottebrock <lofi@FreeBSD.org>2005-01-28 10:49:14 +0000
commitb4334e3825f85f0b242dede567b17c9148361eec (patch)
treeb832fdf41b64d7617b03e745c0534f14e2b5bb1d /print/alignmargins
parenta2ca357e34113af2ab7c7b8086ae2c67a1b9d637 (diff)
downloadports-b4334e3825f85f0b242dede567b17c9148361eec.tar.gz
ports-b4334e3825f85f0b242dede567b17c9148361eec.zip
Add alignmargins, a utility script to generate custom margins in PPDs for
CUPS.
Notes
Notes: svn path=/head/; revision=127541
Diffstat (limited to 'print/alignmargins')
-rw-r--r--print/alignmargins/Makefile43
-rw-r--r--print/alignmargins/distinfo4
-rw-r--r--print/alignmargins/files/patch-alignmargins25
-rw-r--r--print/alignmargins/pkg-descr5
-rw-r--r--print/alignmargins/pkg-plist3
5 files changed, 80 insertions, 0 deletions
diff --git a/print/alignmargins/Makefile b/print/alignmargins/Makefile
new file mode 100644
index 000000000000..aa5ec2e6fcb0
--- /dev/null
+++ b/print/alignmargins/Makefile
@@ -0,0 +1,43 @@
+# New ports collection makefile for: alignmargins
+# Date created: 2005-01-28
+# Whom: Michael Nottebrock <lofi@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= alignmargins
+PORTVERSION= 1.0
+CATEGORIES= print
+MASTER_SITES= http://people.freebsd.org/~lofi/ \
+ http://www.linuxprinting.org/download/printing/
+DISTFILES= alignmargins align.ps
+
+MAINTAINER= lofi@FreeBSD.org
+COMMENT= Utility script to generate custom margins in PPDs for CUPS
+
+NO_BUILD= yes
+USE_PERL= yes
+USE_REINPLACE= yes
+
+do-extract:
+ @${RM} -rf ${WRKDIR}
+ @${MKDIR} ${WRKDIR}
+ @${MKDIR} ${WRKSRC}
+ @for distfile in ${EXTRACT_ONLY}; do \
+ if ! (cd ${WRKDIR} && ${CP} ${_DISTDIR}/$$distfile ${WRKSRC});\
+ then \
+ exit 1; \
+ fi \
+ done
+
+post-patch:
+ ${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+ -e 's|%%DATADIR%%|${DATADIR}|g' \
+ ${WRKSRC}/alignmargins
+
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/alignmargins ${LOCALBASE}/bin
+ ${MKDIR} ${DATADIR}
+ ${INSTALL_DATA} ${WRKSRC}/align.ps ${DATADIR}
+
+.include <bsd.port.mk>
diff --git a/print/alignmargins/distinfo b/print/alignmargins/distinfo
new file mode 100644
index 000000000000..9fb8b552e796
--- /dev/null
+++ b/print/alignmargins/distinfo
@@ -0,0 +1,4 @@
+MD5 (alignmargins) = 3a6c4d03f1cd02e9adb47e4197c8549c
+SIZE (alignmargins) = 8089
+MD5 (align.ps) = a41ca958bf2c7073cf12f980c2231eb5
+SIZE (align.ps) = 5352
diff --git a/print/alignmargins/files/patch-alignmargins b/print/alignmargins/files/patch-alignmargins
new file mode 100644
index 000000000000..20983d8a631f
--- /dev/null
+++ b/print/alignmargins/files/patch-alignmargins
@@ -0,0 +1,25 @@
+--- alignmargins.orig Fri Jan 28 11:19:27 2005
++++ alignmargins Fri Jan 28 11:22:34 2005
+@@ -1,17 +1,17 @@
+ #! /usr/bin/perl
+ $0 =~ m!^(.*)/[^/]+$!;
+ my $programpath = $1;
+-my $printcommand = '/usr/bin/lpr -P ';
+-my $egrep = '/bin/egrep';
++my $printcommand = '%%LOCALBASE%%/bin/lpr -P ';
++my $egrep = '/usr/bin/egrep';
+ my $cat = '/bin/cat';
+ my $cut = '/usr/bin/cut';
+ my $head = '/usr/bin/head';
+ my $tail = '/usr/bin/tail';
+ my $wc = '/usr/bin/wc';
+ my $adjustmentpagename = 'align.ps';
+-my $adjustmentpagepath = ($programpath ? "${programpath}:" : "") . '.:~:/usr/share/alignmargins:/usr/local/share/alignmargins:/usr/share:/usr/local/share:/usr/share/printer-testpages:/usr/local/share/printer-testpages:/usr/share/ghostscript/*/lib:/usr/local/share/ghostscript/*/lib';
+-my $ppddir = '/etc/cups/ppd';
+-my $printerconffile = '/etc/cups/printers.conf';
++my $adjustmentpagepath = ($programpath ? "${programpath}:" : "") . '.:~:%%DATADIR%%:/usr/share/alignmargins:/usr/local/share/alignmargins:/usr/share:/usr/local/share:/usr/share/printer-testpages:/usr/local/share/printer-testpages:/usr/share/ghostscript/*/lib:/usr/local/share/ghostscript/*/lib';
++my $ppddir = '%%LOCALBASE%%/etc/cups/ppd';
++my $printerconffile = '%%LOCALBASE%%/etc/cups/printers.conf';
+
+ # Find "ælign.ps"
+
diff --git a/print/alignmargins/pkg-descr b/print/alignmargins/pkg-descr
new file mode 100644
index 000000000000..fb2206c6ba93
--- /dev/null
+++ b/print/alignmargins/pkg-descr
@@ -0,0 +1,5 @@
+Utility script which allows you to interactively adjust the default printer
+margin settings with the help of a special test page and saves them into a PPD
+for CUPS.
+
+WWW: http://www.linuxprinting.org
diff --git a/print/alignmargins/pkg-plist b/print/alignmargins/pkg-plist
new file mode 100644
index 000000000000..bada46007f73
--- /dev/null
+++ b/print/alignmargins/pkg-plist
@@ -0,0 +1,3 @@
+bin/alignmargins
+%%DATADIR%%/align.ps
+@dirrm %%DATADIR%%