tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Packages without DESTDIR support
On Wed, 9 Dec 2009, Joerg Sonnenberger wrote:
> http://www.netbsd.org/~joerg/missing-destdir
> has a list of all packages that currently lack DESTDIR support.
> Please help with reducing that less as far as possible.
So here's a patch for mail/procmail
--
Steven
1: Linux - will work for fish.
2: The Linux penguin - looks stuffed to the brim with herring.
( make your own conclusions )
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/mail/procmail/Makefile,v
retrieving revision 1.43
diff -u -p -r1.43 Makefile
--- Makefile 18 Jul 2009 03:15:18 -0000 1.43
+++ Makefile 19 Dec 2009 10:07:36 -0000
@@ -10,6 +10,8 @@ MAINTAINER= kim%tac.nyc.ny.us@localhost
HOMEPAGE= http://www.procmail.org/
COMMENT= Local mail delivery agent
+PKG_DESTDIR_SUPPORT= destdir
+
PKG_INSTALLATION_TYPES= overwrite pkgviews
MAKE_JOBS_SAFE= no
@@ -45,14 +47,14 @@ pre-configure:
do-install:
cd ${WRKSRC}/new; \
for f in procmail formail lockfile; do \
- ${INSTALL_PROGRAM} $$f ${PREFIX}/bin/$$f; \
+ ${INSTALL_PROGRAM} $$f ${DESTDIR}${PREFIX}/bin/$$f; \
done; \
- ${INSTALL_SCRIPT} mailstat ${PREFIX}/bin/mailstat; \
+ ${INSTALL_SCRIPT} mailstat ${DESTDIR}${PREFIX}/bin/mailstat; \
for f in procmail.1 formail.1 lockfile.1; do \
- ${INSTALL_MAN} $$f ${PREFIX}/${PKGMANDIR}/man1/$$f;
\
+ ${INSTALL_MAN} $$f ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/$$f; \
done; \
for f in procmailex.5 procmailrc.5 procmailsc.5; do \
- ${INSTALL_MAN} $$f ${PREFIX}/${PKGMANDIR}/man5/$$f;
\
+ ${INSTALL_MAN} $$f ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5/$$f; \
done
${SH} ${WRKSRC}/suid.sh
.endif
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/mail/procmail/distinfo,v
retrieving revision 1.12
diff -u -p -r1.12 distinfo
--- distinfo 18 Jul 2009 03:15:18 -0000 1.12
+++ distinfo 19 Dec 2009 10:07:36 -0000
@@ -6,8 +6,8 @@ Size (procmail-3.22.tar.gz) = 226817 byt
SHA1 (patch-aa) = 6e29885f53d24662c5c69ac906ccc36a26665be2
SHA1 (patch-ab) = 5233a6033198dc2baec135a6fba987e7e2b89ff2
SHA1 (patch-ac) = fe2350e704546c2262d546bb615175dd0591ba8b
-SHA1 (patch-ad) = 569d357c6afb9d7644c8094878aec08d22ae609d
-SHA1 (patch-ae) = 91a3f83d41ba84e218a14c8bfc262fdbb1bc252c
+SHA1 (patch-ad) = b35d6d508a15b8e70734ac7ccd58c19db31717ab
+SHA1 (patch-ae) = b5ac027b337c8d9cf9c6096a48ef534315e18250
SHA1 (patch-af) = 889f937f50561308c644d5a4bd836eccabbb2938
SHA1 (patch-ag) = 66ae907f1b7ccfa10b5278443a9d9b0277923e61
SHA1 (patch-ba) = 5b0d2513e5320de26696cfaad9475f462579dae3
Index: patches/patch-ad
===================================================================
RCS file: /cvsroot/pkgsrc/mail/procmail/patches/patch-ad,v
retrieving revision 1.3
diff -u -p -r1.3 patch-ad
--- patches/patch-ad 26 Aug 2000 14:26:58 -0000 1.3
+++ patches/patch-ad 19 Dec 2009 10:07:36 -0000
@@ -1,8 +1,8 @@
$NetBSD: patch-ad,v 1.3 2000/08/26 14:26:58 wiz Exp $
---- src/recommend.c.orig Thu Nov 25 04:13:36 1999
+--- src/recommend.c.orig 1999-10-20 04:47:45.000000000 +0000
+++ src/recommend.c
-@@ -19,7 +19,6 @@
+@@ -19,7 +19,6 @@ int main(argc,argv)const int argc;const
{ fprintf(stderr,"Please run this program via 'make recommend'\n");
return EX_USAGE;
}
@@ -10,3 +10,29 @@ $NetBSD: patch-ad,v 1.3 2000/08/26 14:26
for(p=checkf;*p;p++)
if(!stat(*p,&stbuf)&&stbuf.st_mode&S_ISGID)
{ if(stbuf.st_mode&S_ISGID)
+@@ -36,19 +35,19 @@ int main(argc,argv)const int argc;const
+ }
+ if(gid!=stbuf.st_gid)
+ sgid=0;
+- printf("chown root %s\n",argv[1]);
++ printf("chown root ${DESTDIR}%s\n",argv[1]);
+ if(sgid)
+ if(grp=getgrgid(gid))
+- printf("chgrp %s %s %s\n",grp->gr_name,argv[1],argv[2]);
++ printf("chgrp %s ${DESTDIR}%s
${DESTDIR}%s\n",grp->gr_name,argv[1],argv[2]);
+ else
+- printf("chgrp %u %s %s\n",(unsigned)gid,argv[1],argv[2]);
+- printf("chmod %lo %s\n",(unsigned long)(sgid|S_ISUID|PERMIS),argv[1]);
++ printf("chgrp %u ${DESTDIR}%s
${DESTDIR}%s\n",(unsigned)gid,argv[1],argv[2]);
++ printf("chmod %lo ${DESTDIR}%s\n",(unsigned
long)(sgid|S_ISUID|PERMIS),argv[1]);
+ if(sgid)
+- printf("chmod %lo %s\n",(unsigned long)(sgid|PERMIS),argv[2]);
++ printf("chmod %lo ${DESTDIR}%s\n",(unsigned long)(sgid|PERMIS),argv[2]);
+ else if(chmdir==1)
+ goto nogchmod;
+ if(chmdir)
+- printf("chmod %c+w %s/.\n",chmdir==1?'g':'a',mailspooldir);
++ printf("chmod %c+w ${DESTDIR}%s/.\n",chmdir==1?'g':'a',mailspooldir);
+ nogchmod:
+ return EXIT_SUCCESS;
+ }
Index: patches/patch-ae
===================================================================
RCS file: /cvsroot/pkgsrc/mail/procmail/patches/patch-ae,v
retrieving revision 1.6
diff -u -p -r1.6 patch-ae
--- patches/patch-ae 20 Jan 2003 22:55:44 -0000 1.6
+++ patches/patch-ae 19 Dec 2009 10:07:36 -0000
@@ -2,30 +2,75 @@ $NetBSD: patch-ae,v 1.6 2003/01/20 22:55
If the ``Housekeeping'' lines stay, `make install; make deinstall; make
install' fails.
---- Makefile.1.orig Tue Sep 11 00:53:09 2001
-+++ Makefile.1 Mon Jan 20 17:21:22 2003
-@@ -88,7 +88,7 @@
- @-$(MKDIRS) $(MAN1DIR) 2>$(DEVNULL); exit 0
- @-test -d $(MAN5DIR) || $(RM) $(MAN5DIR); exit 0
- @-$(MKDIRS) $(MAN5DIR) 2>$(DEVNULL); exit 0
+--- Makefile.1.orig 2001-09-11 04:53:09.000000000 +0000
++++ Makefile.1
+@@ -73,49 +73,47 @@ suid.sh: recommend
+ install-suid: suid.sh install.bin
+ @cat suid.sh
+ @$(SHELL) ./suid.sh
+- @cd $(BINDIR); echo Installed in $(BINDIR); ls -l $(BINSS)
++ @cd ${DESTDIR}$(BINDIR); echo Installed in ${DESTDIR}$(BINDIR); ls -l
$(BINSS)
+
+ $(MANS): mans
+
+ $(BINS): bins
+
+-$(BASENAME):
+- $(MKDIRS) $(BASENAME)
++${DESTDIR}$(BASENAME):
++ $(MKDIRS) ${DESTDIR}$(BASENAME)
+
+ install.man: $(MANS) $(BASENAME)
+- @-$(MKDIRS) $(MANDIR) 2>$(DEVNULL); exit 0
+- @-test -d $(MAN1DIR) || $(RM) $(MAN1DIR); exit 0
+- @-$(MKDIRS) $(MAN1DIR) 2>$(DEVNULL); exit 0
+- @-test -d $(MAN5DIR) || $(RM) $(MAN5DIR); exit 0
+- @-$(MKDIRS) $(MAN5DIR) 2>$(DEVNULL); exit 0
- @chmod 0644 $(MANS)
++ @-$(MKDIRS) ${DESTDIR}$(MANDIR) 2>$(DEVNULL); exit 0
++ @-test -d ${DESTDIR}$(MAN1DIR) || $(RM) ${DESTDIR}$(MAN1DIR); exit 0
++ @-$(MKDIRS) ${DESTDIR}$(MAN1DIR) 2>$(DEVNULL); exit 0
++ @-test -d ${DESTDIR}$(MAN5DIR) || $(RM) ${DESTDIR}$(MAN5DIR); exit 0
++ @-$(MKDIRS) ${DESTDIR}$(MAN5DIR) 2>$(DEVNULL); exit 0
+ @${CHMOD} 0644 $(MANS)
@for a in $(MANS1S); \
- do $(INSTALL) new/$$a.1 $(MAN1DIR)/$$a.$(MAN1SUFFIX) || exit 1; \
+- do $(INSTALL) new/$$a.1 $(MAN1DIR)/$$a.$(MAN1SUFFIX) || exit 1; \
++ do $(INSTALL) new/$$a.1 ${DESTDIR}$(MAN1DIR)/$$a.$(MAN1SUFFIX) || exit 1; \
+ if test "X$(MANCOMPRESS)" != "X"; \
+- then $(MANCOMPRESS) -c new/$$a.1 >$(MAN1DIR)/$$a.$(MAN1SUFFIX); \
++ then $(MANCOMPRESS) -c new/$$a.1
>${DESTDIR}$(MAN1DIR)/$$a.$(MAN1SUFFIX); \
+ else :; fi; \
+ done
+ @for a in $(MANS5S); \
+- do $(INSTALL) new/$$a.5 $(MAN5DIR)/$$a.$(MAN5SUFFIX) || exit 1; \
++ do $(INSTALL) new/$$a.5 ${DESTDIR}$(MAN5DIR)/$$a.$(MAN5SUFFIX) || exit 1; \
if test "X$(MANCOMPRESS)" != "X"; \
-@@ -101,14 +101,12 @@
- then $(MANCOMPRESS) -c new/$$a.5 >$(MAN5DIR)/$$a.$(MAN5SUFFIX); \
+- then $(MANCOMPRESS) -c new/$$a.5 >$(MAN5DIR)/$$a.$(MAN5SUFFIX); \
++ then $(MANCOMPRESS) -c new/$$a.5
>${DESTDIR}$(MAN5DIR)/$$a.$(MAN5SUFFIX); \
else :; fi; \
done
- echo Housekeeping file >install.man
install.bin: $(BINS) $(BASENAME)
- @-$(MKDIRS) $(BINDIR) 2>$(DEVNULL); exit 0
+- @-$(MKDIRS) $(BINDIR) 2>$(DEVNULL); exit 0
- @chmod 0755 $(BINS)
-+ @${CHMOD} 0755 $(BINS)
- $(INSTALL) $(BINS) $(BINDIR)
- @-dirname / >$(DEVNULL) || $(INSTALL) examples/dirname $(BINDIR)
+- $(INSTALL) $(BINS) $(BINDIR)
+- @-dirname / >$(DEVNULL) || $(INSTALL) examples/dirname $(BINDIR)
- echo Housekeeping file >install.bin
++ @-$(MKDIRS) ${DESTDIR}$(BINDIR) 2>$(DEVNULL); exit 0
++ @${CHMOD} 0755 $(BINS)
++ $(INSTALL) $(BINS) ${DESTDIR}$(BINDIR)
++ @-dirname / >$(DEVNULL) || $(INSTALL) examples/dirname
${DESTDIR}$(BINDIR)
install:
@$(MAKE) install.man install.bin
+ @echo
+- @cd $(BINDIR); echo Installed in $(BINDIR); ls -l $(BINSS)
+- @cd $(MAN1DIR); echo Installed in $(MAN1DIR); ls -l $(MANS1)
+- @cd $(MAN5DIR); echo Installed in $(MAN5DIR); ls -l $(MANS5)
++ @cd ${DESTDIR}$(BINDIR); echo Installed in ${DESTDIR}$(BINDIR); ls -l
$(BINSS)
++ @cd ${DESTDIR}$(MAN1DIR); echo Installed in ${DESTDIR}$(MAN1DIR); ls -l
$(MANS1)
++ @cd ${DESTDIR}$(MAN5DIR); echo Installed in ${DESTDIR}$(MAN5DIR); ls -l
$(MANS5)
+ @$(MAKE) recommend
+
+ deinstall:
Home |
Main Index |
Thread Index |
Old Index