pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: improve DESTDIR?



> We can detect broken patch, failed to patch, try to install out of
> DESTDIR, missing PLIST entries, and so on.  For custom do-install
> target, no chance to do it.

Double patching fixed.

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/benchmarks/ubench/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- Makefile    4 Mar 2006 21:29:01 -0000       1.5
+++ Makefile    25 Nov 2008 17:33:39 -0000
@@ -12,14 +12,10 @@
 
 BUILD_TARGET=  ubench
 INSTALLATION_DIRS=     bin ${PKGMANDIR}/man8 share/doc/ubench
-
-SUBST_CLASSES+=                path
-SUBST_STAGE.path=      post-configure
-SUBST_FILES.path=      Makefile
-SUBST_SED.path=                -e "s,/usr/local,${PREFIX},"
+PKG_DESTDIR_SUPPORT=   user-destdir
 
 post-install:
-       ${INSTALL_MAN} ${WRKSRC}/ubench.8 ${PREFIX}/${PKGMANDIR}/man8
-       ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/ubench
+       ${INSTALL_MAN} ${WRKSRC}/ubench.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
+       ${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/ubench
 
 .include "../../mk/bsd.pkg.mk"
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/benchmarks/ubench/distinfo,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 distinfo
--- distinfo    3 Sep 2005 05:57:45 -0000       1.1.1.1
+++ distinfo    25 Nov 2008 17:33:39 -0000
@@ -3,4 +3,4 @@
 SHA1 (ubench-0.32.tar.gz) = 749ae490c95b9fe95753b47b5711cbeb9bdb3a29
 RMD160 (ubench-0.32.tar.gz) = 33a2e7b869af1e7c81eb2211b3ee4946e97933d2
 Size (ubench-0.32.tar.gz) = 9341 bytes
-SHA1 (patch-aa) = 07a31eccb56a50b6a5261a6db7b4d37bdc57a3a6
+SHA1 (patch-aa) = 28852b0dec3d322caea6188e73d9426eb61369cb
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/benchmarks/ubench/patches/patch-aa,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 patch-aa
--- patches/patch-aa    3 Sep 2005 05:57:45 -0000       1.1.1.1
+++ patches/patch-aa    25 Nov 2008 17:33:39 -0000
@@ -1,13 +1,13 @@
-$NetBSD: patch-aa,v 1.1.1.1 2005/09/03 05:57:45 xtraeme Exp $
+$NetBSD$
 
---- Makefile.orig      2005-09-03 07:50:21.000000000 +0200
-+++ Makefile   2005-09-03 07:51:42.000000000 +0200
+--- Makefile.orig      2000-08-05 21:53:24.000000000 +0300
++++ Makefile
 @@ -8,11 +8,11 @@
  
###############################################################################
  
  #DEFINES=-DDEBUG
 -INSTALLDIR= /usr/local/bin
-+INSTALLDIR=/usr/local/bin
++INSTALLDIR=${DESTDIR}${PREFIX}/bin
  
 -CC = gcc
 -CFLAGS = -O2 -m486 -Wall -malign-loops=2 -malign-jumps=2 -malign-functions=2 
-fomit-frame-pointer

-- 
Best regards, Aleksey Cheusov.


Home | Main Index | Thread Index | Old Index