summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2003-01-03 22:22:09 +0000
committerjmmv <jmmv@pkgsrc.org>2003-01-03 22:22:09 +0000
commit060bbbe7aa50cc45c939e159e97174c0c8ba657b (patch)
tree8783fb7b229a6eb680610e25ec39984027bcbb20
parentfa71a1df12170f68f5a76e4a16658d6cc8045a1e (diff)
downloadpkgsrc-060bbbe7aa50cc45c939e159e97174c0c8ba657b.tar.gz
Make this package install its configuration files under the examples tree
and honor PKG_SYSCONFDIR. Also sync PLIST with reality: manpage is installed uncompressed. Bump PKGREVISION to 1.
-rw-r--r--time/cal/Makefile15
-rw-r--r--time/cal/PLIST10
-rw-r--r--time/cal/distinfo6
-rw-r--r--time/cal/patches/patch-aa28
-rw-r--r--time/cal/patches/patch-ab17
5 files changed, 37 insertions, 39 deletions
diff --git a/time/cal/Makefile b/time/cal/Makefile
index 79e7cf478f7..6fd5b04fca7 100644
--- a/time/cal/Makefile
+++ b/time/cal/Makefile
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.3 2001/02/25 04:18:19 hubertf Exp $
+# $NetBSD: Makefile,v 1.4 2003/01/03 22:22:09 jmmv Exp $
# FreeBSD Id: Makefile,v 1.5 1997/05/12 06:33:23 max Exp
#
DISTNAME= cal-3.5
+PKGREVISION= 1
CATEGORIES= time
MASTER_SITES= ${MASTER_SITE_SUNSITE:=utils/shell/}
@@ -13,12 +14,16 @@ WRKSRC= ${WRKDIR}/cal-3.5/source
MAKEFILE= makefile.unx
ALL_TARGET= cal
+PKG_SYSCONFSUBDIR= cal
+CFLAGS+= -DPKG_SYSCONFDIR=\"\\\"${PKG_SYSCONFDIR}\"\\\"
+EGDIR= ${PREFIX}/share/examples/cal
+# CONF_FILES not used as calcol and caldat are optional.
+
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/cal ${PREFIX}/bin/cal
${INSTALL_MAN} ${WRKSRC}/cal.1 ${PREFIX}/man/man1/cal.1
- @${INSTALL_DATA_DIR} ${PREFIX}/etc/cal
- @${CHMOD} 0755 ${PREFIX}/etc/cal
- if [ ! -f ${PREFIX}/etc/cal/calcol ]; then ${INSTALL_DATA} ${WRKDIR}/cal-3.5/cal.col ${PREFIX}/etc/cal/calcol; fi
- if [ ! -f ${PREFIX}/etc/cal/caldat ]; then ${INSTALL_DATA} ${WRKDIR}/cal-3.5/cal.dat ${PREFIX}/etc/cal/caldat; fi
+ ${INSTALL_DATA_DIR} ${EGDIR}
+ ${INSTALL_DATA} ${WRKDIR}/cal-3.5/cal.col ${EGDIR}/calcol
+ ${INSTALL_DATA} ${WRKDIR}/cal-3.5/cal.dat ${EGDIR}/caldat
.include "../../mk/bsd.pkg.mk"
diff --git a/time/cal/PLIST b/time/cal/PLIST
index 396018f7079..6ccf9188b38 100644
--- a/time/cal/PLIST
+++ b/time/cal/PLIST
@@ -1,6 +1,6 @@
-@comment $NetBSD: PLIST,v 1.1 2001/10/31 22:18:59 zuntum Exp $
+@comment $NetBSD: PLIST,v 1.2 2003/01/03 22:22:10 jmmv Exp $
bin/cal
-etc/cal/calcol
-etc/cal/caldat
-@dirrm etc/cal
-man/man1/cal.1.gz
+man/man1/cal.1
+share/examples/cal/calcol
+share/examples/cal/caldat
+@dirrm share/examples/cal
diff --git a/time/cal/distinfo b/time/cal/distinfo
index 3f2af9f8331..c7a204ea69e 100644
--- a/time/cal/distinfo
+++ b/time/cal/distinfo
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.2 2001/04/18 14:47:11 agc Exp $
+$NetBSD: distinfo,v 1.3 2003/01/03 22:22:10 jmmv Exp $
SHA1 (cal-3.5.tar.gz) = 4be982ce4576db6e2db8f8006b7bffa016d6af9d
Size (cal-3.5.tar.gz) = 47645 bytes
-SHA1 (patch-aa) = 5e1ae6078f101f6875438e4006eb0b86a930b21f
-SHA1 (patch-ab) = 8e0a57e77792f16a9a14b20c81fac5d7eda75593
+SHA1 (patch-aa) = 37beac0349a79cc02851e88efdfa269505f6a64e
+SHA1 (patch-ab) = 32bea36394cf9747bccd52d4c0595a90b27fcf1c
diff --git a/time/cal/patches/patch-aa b/time/cal/patches/patch-aa
index b60ee237228..015ad0294bb 100644
--- a/time/cal/patches/patch-aa
+++ b/time/cal/patches/patch-aa
@@ -1,17 +1,13 @@
-$NetBSD: patch-aa,v 1.1.1.1 2000/12/17 23:32:09 wiz Exp $
+$NetBSD: patch-aa,v 1.2 2003/01/03 22:22:10 jmmv Exp $
-*** makefile.unx.orig Tue Mar 5 06:36:27 1996
---- makefile.unx Mon May 12 15:23:42 1997
-***************
-*** 10,15 ****
---- 10,19 ----
- CC=gcc
- CFLAGS=-O -Wall -DUNIX -DUSE_REMINDER
-
-+ .ifdef PREFIX
-+ CFLAGS+=-DPREFIX="\"${PREFIX}\""
-+ .endif
-+
- BINDIR=/usr/bin
- MANDIR=/usr/man
-
+--- makefile.unx.orig Mon Mar 4 22:36:27 1996
++++ makefile.unx
+@@ -8,7 +8,7 @@
+
+ RM=rm -f
+ CC=gcc
+-CFLAGS=-O -Wall -DUNIX -DUSE_REMINDER
++CFLAGS+=-O -Wall -DUNIX -DUSE_REMINDER
+
+ BINDIR=/usr/bin
+ MANDIR=/usr/man
diff --git a/time/cal/patches/patch-ab b/time/cal/patches/patch-ab
index 538f453a3b7..59fcb26946b 100644
--- a/time/cal/patches/patch-ab
+++ b/time/cal/patches/patch-ab
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.1.1.1 2000/12/17 23:32:10 wiz Exp $
+$NetBSD: patch-ab,v 1.2 2003/01/03 22:22:11 jmmv Exp $
--- cal.c.orig Thu Jul 11 21:36:33 1996
-+++ cal.c Thu Oct 23 14:37:49 1997
-@@ -122,6 +122,7 @@
++++ cal.c
+@@ -122,6 +122,7 @@ BASIC DATA STRUCTURE:
#include <ctype.h>
#include <string.h>
#include <sys/types.h>
@@ -10,7 +10,7 @@ $NetBSD: patch-ab,v 1.1.1.1 2000/12/17 23:32:10 wiz Exp $
#ifndef max
#define max(a,b) (((a)>(b))?(a):(b))
-@@ -130,6 +131,10 @@
+@@ -130,6 +131,10 @@ BASIC DATA STRUCTURE:
/* Note: Other unix systems may require this next re-define to work. */
/* I believe that SCO is one such system. Please send in any fixes */
/* needed to get your system running. */
@@ -21,17 +21,14 @@ $NetBSD: patch-ab,v 1.1.1.1 2000/12/17 23:32:10 wiz Exp $
#ifdef __linux__ /* Make linux compatible with stricmp() */
#define stricmp(a,b) strcasecmp(a,b) /* case-insensitive string comparison */
#endif
-@@ -1401,8 +1406,12 @@
+@@ -1401,8 +1406,8 @@ FILE *efopen(const char *file, const cha
strcpy(str, ".");
strcpy(str, file);
if ((fp = fopen(str, mode)) == NULL) {
- /* If still not found then look in a lib directory */
+- strcpy(str, "/usr/lib/");
+ /* If still not found then look in config directory */
-+#ifdef PREFIX
-+ strcpy(str, PREFIX "/etc/cal/");
-+#else
- strcpy(str, "/usr/lib/");
-+#endif
++ strcpy(str, PKG_SYSCONFDIR "/");
strcat(str,file);
fp = fopen(str, mode);
}