Improve package a bit:

- s/INSTALL_*/BSD_INSTALL_*/ in patch-aa, remove unnecessary MAKE_ENV
- use PKG_SYSCONFDIR and use bsd.pkg.install.mk for configuration file
- fix /etc -> PKG_SYSCONFDIR in documentation
- install more documentation

Bump PKGREVISION.
This commit is contained in:
salo 2003-01-19 08:45:38 +00:00
parent 480a55521d
commit 14294bfccb
4 changed files with 43 additions and 25 deletions

View file

@ -1,7 +1,8 @@
# $NetBSD: Makefile,v 1.3 2002/05/12 10:16:50 abs Exp $
# $NetBSD: Makefile,v 1.4 2003/01/19 08:45:38 salo Exp $
#
DISTNAME= pnm2ppa-1.04
PKGREVISION= 1
CATEGORIES= print converters graphics
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pnm2ppa/}
@ -9,9 +10,25 @@ MAINTAINER= kei@netbsd.org
HOMEPAGE= http://pnm2ppa.sourceforge.net/
COMMENT= filter to convert PNM file to PPA used by some HP DJ printer
MAKE_ENV+= ECHO="${ECHO}"
MAKE_ENV+= INSTALL_DATA="${INSTALL_DATA}"
MAKE_ENV+= INSTALL_MAN="${INSTALL_MAN}"
MAKE_ENV+= INSTALL_PROGRAM="${INSTALL_PROGRAM}"
CONF_FILES+= ${PREFIX}/share/examples/pnm2ppa/pnm2ppa.conf.default \
${PKG_SYSCONFDIR}/pnm2ppa.conf
post-build:
for f in \
${WRKSRC}/docs/en/CALIBRATION.txt \
${WRKSRC}/docs/en/COLOR.txt \
${WRKSRC}/docs/en/pnm2ppa.1 ; \
do \
${CP} $$f $$f.orig ; \
${SED} 's|/etc/pnm2ppa|${PKG_SYSCONFDIR}/pnm2ppa|g' \
$$f.orig > $$f ; \
done
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/pnm2ppa
cd ${WRKSRC} && \
${INSTALL_DATA} docs/en/CALIBRATION.txt docs/en/COLOR.txt \
${PREFIX}/share/doc/pnm2ppa
.include "../../mk/bsd.pkg.install.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -1,5 +1,9 @@
@comment $NetBSD: PLIST,v 1.1 2001/10/31 23:27:58 zuntum Exp $
etc/pnm2ppa.conf.default
@comment $NetBSD: PLIST,v 1.2 2003/01/19 08:45:38 salo Exp $
bin/calibrate_ppa
bin/pnm2ppa
man/man1/pnm2ppa.1
share/doc/pnm2ppa/CALIBRATION.txt
share/doc/pnm2ppa/COLOR.txt
share/examples/pnm2ppa/pnm2ppa.conf.default
@dirrm share/examples/pnm2ppa
@dirrm share/doc/pnm2ppa

View file

@ -1,5 +1,5 @@
$NetBSD: distinfo,v 1.2 2002/07/02 13:02:02 wiz Exp $
$NetBSD: distinfo,v 1.3 2003/01/19 08:45:38 salo Exp $
SHA1 (pnm2ppa-1.04.tar.gz) = a3cd26788779bc80fa6c8265f3b2aacaaa5acd92
Size (pnm2ppa-1.04.tar.gz) = 163851 bytes
SHA1 (patch-aa) = f84882fabfc69053dffac11d3e2f62d91deabf0a
SHA1 (patch-aa) = c9b392694659d4c9a2674725d28a9caa81ca208a

View file

@ -1,7 +1,7 @@
$NetBSD: patch-aa,v 1.1.1.1 2001/04/28 03:10:59 kei Exp $
$NetBSD: patch-aa,v 1.2 2003/01/19 08:45:39 salo Exp $
--- Makefile.orig Fri Nov 3 03:33:08 2000
+++ Makefile Fri Apr 27 17:00:51 2001
--- Makefile.orig Thu Nov 2 19:33:08 2000
+++ Makefile Sun Jan 19 09:01:19 2003
@@ -2,16 +2,17 @@
# Makefile for pnm2ppa
#
@ -10,7 +10,7 @@ $NetBSD: patch-aa,v 1.1.1.1 2001/04/28 03:10:59 kei Exp $
-CONFDIR=/etc
-MANDIR=/usr/local/man/man1
+INSTALLDIR=${PREFIX}/bin
+CONFDIR=${PREFIX}/etc
+CONFDIR=${PKG_SYSCONFDIR}
+MANDIR=${PREFIX}/man/man1
-CC=gcc
@ -19,37 +19,34 @@ $NetBSD: patch-aa,v 1.1.1.1 2001/04/28 03:10:59 kei Exp $
+#INSTALL=install
# production build
-CFLAGS=-Wall -pedantic -O2 -g -DNDEBUG
-LDFLAGS=-lm
+CPPFLAGS=-I${PREFIX}/include
+CFLAGS=-Wall -pedantic -O2 -g -DNDEBUG
CFLAGS=-Wall -pedantic -O2 -g -DNDEBUG
-LDFLAGS=-lm
+LDFLAGS=-lm #-L${PREFIX}/lib -R${PREFIX}/lib
OBJS = pnm2ppa.o syslog.o ppa.o image.o dither.o cutswath.o hash_ink.o gamma.o
SRC = pnm2ppa.c syslog.c ppa.c image.c dither.c cutswath.c hash_ink.c gamma.c
@@ -89,23 +90,23 @@
@@ -89,23 +90,21 @@
install: pnm2ppa calibrate_ppa
- $(INSTALL) -m 755 pnm2ppa $(INSTALLDIR)
- $(INSTALLD) $(MANDIR)
- $(INSTALL) -m 644 docs/en/pnm2ppa.1 $(MANDIR)
+ ${INSTALL_PROGRAM} -m 755 pnm2ppa $(INSTALLDIR)
+ ${INSTALL_MAN} -m 644 docs/en/pnm2ppa.1 $(MANDIR)
+ ${BSD_INSTALL_PROGRAM} -m 755 pnm2ppa $(INSTALLDIR)
+ ${BSD_INSTALL_MAN} -m 644 docs/en/pnm2ppa.1 $(MANDIR)
# development only - allows root to edit
- $(INSTALL) -m 644 pnm2ppa.conf $(CONFDIR)
+ ${INSTALL_DATA} -m 644 pnm2ppa.conf $(CONFDIR)/pnm2ppa.conf.default
+ ${BSD_INSTALL_DATA_DIR} $(PREFIX)/share/examples/pnm2ppa
+ ${BSD_INSTALL_DATA} -m 644 pnm2ppa.conf $(PREFIX)/share/examples/pnm2ppa/pnm2ppa.conf.default
# calibration tool
- $(INSTALL) -m 755 calibrate_ppa $(INSTALLDIR)
+ ${INSTALL_PROGRAM} -m 755 calibrate_ppa $(INSTALLDIR)
+ ${BSD_INSTALL_PROGRAM} -m 755 calibrate_ppa $(INSTALLDIR)
# final production - much tighter
-# $(INSTALL) -m 444 pnm2ppa.conf $(CONFDIR)
- @@echo
- @@echo Now, edit /etc/pnm2ppa.conf to choose your printer
+# ${INSTALL_DATA} -m 444 pnm2ppa.conf $(CONFDIR)/pnm2ppa.conf.default
+ @${ECHO}
+ @${ECHO} Now, copy ${CONFDIR}/pnm2ppa.conf.default to /etc/pnm2ppa.conf
+ @${ECHO} and edit to choose your printer
+# ${BSD_INSTALL_DATA} -m 444 pnm2ppa.conf $(CONFDIR)/pnm2ppa.conf.default
uninstall:
rm -f $(INSTALLDIR)/pnm2ppa