DESTDIR support.diff -r1.21 -r1.22 pkgsrc/devel/rx/Makefile
(joerg)
@@ -1,33 +1,35 @@ | @@ -1,33 +1,35 @@ | |||
1 | # $NetBSD: Makefile,v 1.21 2006/03/30 03:44:43 jlam Exp $ | 1 | # $NetBSD: Makefile,v 1.22 2008/04/04 15:24:56 joerg Exp $ | |
2 | 2 | |||
3 | DISTNAME= rx-1.5 | 3 | DISTNAME= rx-1.5 | |
4 | PKGREVISION= 1 | 4 | PKGREVISION= 1 | |
5 | CATEGORIES= devel | 5 | CATEGORIES= devel | |
6 | MASTER_SITES= # | 6 | MASTER_SITES= # | |
7 | EXTRACT_SUFX= .tar.bz2 | 7 | EXTRACT_SUFX= .tar.bz2 | |
8 | 8 | |||
9 | MAINTAINER= pkgsrc-users@NetBSD.org | 9 | MAINTAINER= pkgsrc-users@NetBSD.org | |
10 | HOMEPAGE= http://www.gnu.org/software/rx/rx.html | 10 | HOMEPAGE= http://www.gnu.org/software/rx/rx.html | |
11 | COMMENT= Fast replacement for the GNU regex library | 11 | COMMENT= Fast replacement for the GNU regex library | |
12 | 12 | |||
13 | PKG_DESTDIR_SUPPORT= user-destdir | |||
14 | ||||
13 | USE_LIBTOOL= yes | 15 | USE_LIBTOOL= yes | |
14 | GNU_CONFIGURE= yes | 16 | GNU_CONFIGURE= yes | |
15 | INFO_FILES= # PLIST | 17 | INFO_FILES= # PLIST | |
16 | 18 | |||
17 | # When the API changes and breaks binary-compatibility with the previous | 19 | # When the API changes and breaks binary-compatibility with the previous | |
18 | # version, increment the MAJOR by 1 and reset the MINOR to 0. Otherwise, | 20 | # version, increment the MAJOR by 1 and reset the MINOR to 0. Otherwise, | |
19 | # bump the MINOR when a new version comes out. | 21 | # bump the MINOR when a new version comes out. | |
20 | # | 22 | # | |
21 | RX_MAJOR= 0 | 23 | RX_MAJOR= 0 | |
22 | RX_MINOR= 0 | 24 | RX_MINOR= 0 | |
23 | MAKE_ENV+= RX_MAJOR=${RX_MAJOR:Q} RX_MINOR=${RX_MINOR:Q} | 25 | MAKE_ENV+= RX_MAJOR=${RX_MAJOR:Q} RX_MINOR=${RX_MINOR:Q} | |
24 | 26 | |||
25 | INSTALLATION_DIRS= ${PKGINFODIR} | 27 | INSTALLATION_DIRS= ${PKGINFODIR} | |
26 | 28 | |||
27 | post-install: | 29 | post-install: | |
28 | cd ${WRKSRC}/doc; for f in rx.info rx.info-[0-9]*; do \ | 30 | cd ${WRKSRC}/doc; for f in rx.info rx.info-[0-9]*; do \ | |
29 | ${TEST} ! -f "$$f" || \ | 31 | ${TEST} ! -f "$$f" || \ | |
30 | ${INSTALL_DATA} "$$f" ${PREFIX}/${PKGINFODIR}; \ | 32 | ${INSTALL_DATA} "$$f" ${DESTDIR}${PREFIX}/${PKGINFODIR}; \ | |
31 | done | 33 | done | |
32 | 34 | |||
33 | .include "../../mk/bsd.pkg.mk" | 35 | .include "../../mk/bsd.pkg.mk" |
@@ -1,7 +1,7 @@ | @@ -1,7 +1,7 @@ | |||
1 | $NetBSD: distinfo,v 1.5 2005/02/23 22:24:33 agc Exp $ | 1 | $NetBSD: distinfo,v 1.6 2008/04/04 15:24:56 joerg Exp $ | |
2 | 2 | |||
3 | SHA1 (rx-1.5.tar.bz2) = 6f58203315a1ae5e34b629f7413e21801964a48c | 3 | SHA1 (rx-1.5.tar.bz2) = 6f58203315a1ae5e34b629f7413e21801964a48c | |
4 | RMD160 (rx-1.5.tar.bz2) = a68cb446492bd7abda70a7adb68849c600cb0be5 | 4 | RMD160 (rx-1.5.tar.bz2) = a68cb446492bd7abda70a7adb68849c600cb0be5 | |
5 | Size (rx-1.5.tar.bz2) = 415525 bytes | 5 | Size (rx-1.5.tar.bz2) = 415525 bytes | |
6 | SHA1 (patch-aa) = 6dd85891f4593c98b34835b56b0c32e89c7175a7 | 6 | SHA1 (patch-aa) = 6dd85891f4593c98b34835b56b0c32e89c7175a7 | |
7 | SHA1 (patch-ab) = 69abb3d80cdc84d9e59e1abf6c4084292b49e330 | 7 | SHA1 (patch-ab) = 5c38359f4826ae96cc3843b1e4fb90561c1d2c31 |
@@ -1,35 +1,37 @@ | @@ -1,35 +1,37 @@ | |||
1 | $NetBSD: patch-ab,v 1.2 2002/04/16 13:55:30 wiz Exp $ | 1 | $NetBSD: patch-ab,v 1.3 2008/04/04 15:24:56 joerg Exp $ | |
2 | 2 | |||
3 | --- rx/Makefile.in.orig Fri Nov 22 13:47:49 1996 | 3 | --- rx/Makefile.in.orig Fri Nov 22 13:47:49 1996 | |
4 | +++ rx/Makefile.in | 4 | +++ rx/Makefile.in | |
5 | @@ -59,24 +59,23 @@ | 5 | @@ -59,24 +59,23 @@ | |
6 | $(CC) $(ALL_CFLAGS) -DSCM_MAGIC_SNARFER -E $< | grep "^%%%" | sed -e "s/^%%%//" > $@ ; \ | 6 | $(CC) $(ALL_CFLAGS) -DSCM_MAGIC_SNARFER -E $< | grep "^%%%" | sed -e "s/^%%%//" > $@ ; \ | |
7 | 7 | |||
8 | .c.o: | 8 | .c.o: | |
9 | - $(CC) -c $(ALL_CFLAGS) $(DEFS) -I$(srcdir) $< | 9 | - $(CC) -c $(ALL_CFLAGS) $(DEFS) -I$(srcdir) $< | |
10 | + $(LIBTOOL) $(CC) -c $(ALL_CFLAGS) $(DEFS) -I$(srcdir) $< | 10 | + $(LIBTOOL) $(CC) -c $(ALL_CFLAGS) $(DEFS) -I$(srcdir) $< | |
11 | 11 | |||
12 | -all: librx.a | 12 | -all: librx.a | |
13 | +all: librx.la | 13 | +all: librx.la | |
14 | 14 | |||
15 | install: all | 15 | install: all | |
16 | test -d $(libdir) || mkdir $(libdir) | 16 | - test -d $(libdir) || mkdir $(libdir) | |
17 | test -d $(includedir) || mkdir $(includedir) | 17 | - test -d $(includedir) || mkdir $(includedir) | |
18 | + ${BSD_INSTALL_DATA_DIR} ${DESTDIR}$(libdir) | |||
19 | + ${BSD_INSTALL_DATA_DIR} ${DESTDIR}$(includedir) | |||
18 | - $(INSTALL) librx.a $(libdir)/librx.a | 20 | - $(INSTALL) librx.a $(libdir)/librx.a | |
19 | - $(RANLIB) $(libdir)/librx.a | 21 | - $(RANLIB) $(libdir)/librx.a | |
20 | - $(INSTALL) $(srcdir)/inst-rxposix.h $(includedir)/rxposix.h | 22 | - $(INSTALL) $(srcdir)/inst-rxposix.h $(includedir)/rxposix.h | |
21 | + $(LIBTOOL) $(INSTALL) librx.la $(libdir) | 23 | + $(LIBTOOL) $(BSD_INSTALL_LIB) librx.la ${DESTDIR}$(libdir) | |
22 | + $(BSD_INSTALL_DATA) $(srcdir)/inst-rxposix.h $(includedir)/rxposix.h | 24 | + $(BSD_INSTALL_DATA) $(srcdir)/inst-rxposix.h ${DESTDIR}$(includedir)/rxposix.h | |
23 | 25 | |||
24 | 26 | |||
25 | uninstall: | 27 | uninstall: | |
26 | - -rm -f $(libdir)/librx.a | 28 | - -rm -f $(libdir)/librx.a | |
27 | + -$(LIBTOOL) rm -f $(libdir)/librx.la | 29 | + -$(LIBTOOL) rm -f $(libdir)/librx.la | |
28 | -rm -f $(includedir)/rxposix.h | 30 | -rm -f $(includedir)/rxposix.h | |
29 | 31 | |||
30 | clean: | 32 | clean: | |
31 | - -rm -f $(libobjs) librx.a $(opt_objs) | 33 | - -rm -f $(libobjs) librx.a $(opt_objs) | |
32 | + -$(LIBTOOL) rm -f $(libobjs) librx.a $(opt_objs) | 34 | + -$(LIBTOOL) rm -f $(libobjs) librx.a $(opt_objs) | |
33 | 35 | |||
34 | distclean: clean | 36 | distclean: clean | |
35 | -rm Makefile config.status config.log rgx.x | 37 | -rm Makefile config.status config.log rgx.x |