| @@ -1,67 +1,63 @@ | | | @@ -1,67 +1,63 @@ |
1 | # $NetBSD: Makefile,v 1.16 2008/03/12 15:07:47 jlam Exp $ | | 1 | # $NetBSD: Makefile,v 1.17 2008/03/13 18:45:05 jlam Exp $ |
2 | | | 2 | |
3 | DISTNAME= rubygems-1.0.1 | | 3 | DISTNAME= rubygems-1.0.1 |
4 | PKGREVISION= 2 | | 4 | PKGREVISION= 2 |
5 | CATEGORIES= misc ruby | | 5 | CATEGORIES= misc ruby |
6 | MASTER_SITES= http://rubyforge.org/frs/download.php/29548/ | | 6 | MASTER_SITES= http://rubyforge.org/frs/download.php/29548/ |
7 | EXTRACT_SUFX= .tgz | | 7 | EXTRACT_SUFX= .tgz |
8 | | | 8 | |
9 | MAINTAINER= minskim@NetBSD.org | | 9 | MAINTAINER= minskim@NetBSD.org |
10 | HOMEPAGE= http://www.rubygems.org/ | | 10 | HOMEPAGE= http://www.rubygems.org/ |
11 | COMMENT= Ruby standard for publishing and managing third party libraries | | 11 | COMMENT= Ruby standard for publishing and managing third party libraries |
12 | | | 12 | |
13 | PKG_DESTDIR_SUPPORT= user-destdir | | 13 | PKG_DESTDIR_SUPPORT= user-destdir |
14 | | | 14 | |
15 | .include "../../mk/bsd.prefs.mk" | | 15 | .include "../../mk/bsd.prefs.mk" |
16 | | | 16 | |
17 | NO_CONFIGURE= yes | | 17 | NO_CONFIGURE= yes |
18 | NO_BUILD= yes | | 18 | NO_BUILD= yes |
19 | RUBY_REQD= 1.8.3 | | 19 | RUBY_REQD= 1.8.3 |
20 | | | 20 | |
21 | REPLACE_RUBY_DIRS= ${WRKSRC}/bin | | 21 | REPLACE_RUBY_DIRS= ${WRKSRC}/bin |
22 | REPLACE_RUBY_PAT= [a-z]* | | 22 | REPLACE_RUBY_PAT= [a-z]* |
23 | | | 23 | |
24 | GEMS_SUBDIR= lib/ruby/gems/${RUBY_VER_DIR} | | 24 | GEM_HOME= ${PREFIX}/lib/ruby/gems/${RUBY_VER_DIR} |
25 | REQD_DIRS= ${GEMS_SUBDIR:H} | | 25 | GEM_DOCDIR= ${GEM_HOME}/doc/${DISTNAME} |
26 | REQD_DIRS+= ${GEMS_SUBDIR} | | | |
27 | REQD_DIRS+= ${GEMS_SUBDIR}/cache | | | |
28 | REQD_DIRS+= ${GEMS_SUBDIR}/doc | | | |
29 | REQD_DIRS+= ${GEMS_SUBDIR}/gems | | | |
30 | REQD_DIRS+= ${GEMS_SUBDIR}/specifications | | | |
31 | | | 26 | |
32 | PLIST_SRC= ${PKGDIR}/PLIST.common | | 27 | REQD_DIRS= ${GEM_HOME:H} |
33 | PLIST_SRC+= ${WRKDIR}/PLIST_DYNAMIC | | 28 | REQD_DIRS+= ${GEM_HOME} |
| | | 29 | REQD_DIRS+= ${GEM_HOME}/cache |
| | | 30 | REQD_DIRS+= ${GEM_HOME}/doc |
| | | 31 | REQD_DIRS+= ${GEM_HOME}/gems |
| | | 32 | REQD_DIRS+= ${GEM_HOME}/specifications |
| | | 33 | |
| | | 34 | # Generate a dynamic PLIST for the rubygems documentation directory. |
| | | 35 | GENERATE_PLIST+= \ |
| | | 36 | ${ECHO} "@comment The following lines are automatically generated." && \ |
| | | 37 | ( cd ${DESTDIR}${PREFIX} && \ |
| | | 38 | ${FIND} ${GEM_DOCDIR:S|${PREFIX}/||} \! -type d -print | \ |
| | | 39 | ${SORT} && \ |
| | | 40 | ${FIND} ${GEM_DOCDIR:S|${PREFIX}/||} -type d -print | \ |
| | | 41 | ${SORT} -r | ${SED} -e "s,^,@dirrm ," ); |
34 | | | 42 | |
35 | .include "../../lang/ruby/modules.mk" | | 43 | .include "../../lang/ruby/modules.mk" |
36 | | | 44 | |
37 | # Force the Gem repository to be under ${DESTDIR}. This is harmless | | 45 | # Force the Gem repository to be under ${DESTDIR}. This is harmless |
38 | # because this packages depends on no other gems. | | 46 | # because this packages depends on no other gems. |
39 | # | | 47 | # |
40 | MAKE_ENV+= GEM_HOME=${DESTDIR}${PREFIX}/${GEMS_SUBDIR} | | 48 | INSTALL_ENV+= GEM_HOME=${DESTDIR}${GEM_HOME} |
41 | | | 49 | |
42 | INSTALL_TARGET= install | | 50 | INSTALL_TARGET= install |
43 | INSTALL_TARGET+= --format-executable | | 51 | INSTALL_TARGET+= --format-executable |
44 | .if ${_USE_DESTDIR} != "no" | | 52 | .if ${_USE_DESTDIR} != "no" |
45 | INSTALL_TARGET+= --buildroot=${DESTDIR:Q} | | 53 | INSTALL_TARGET+= --buildroot=${DESTDIR:Q} |
46 | .endif | | 54 | .endif |
47 | | | 55 | |
48 | # rubygem's setup.rb is not the typical setup.rb -- manually run the | | 56 | # rubygem's setup.rb is not the typical setup.rb -- manually run the |
49 | # command to install. | | 57 | # command to install. |
50 | # | | 58 | # |
51 | do-install: | | 59 | do-install: |
52 | cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${RUBY} setup.rb \ | | 60 | cd ${WRKSRC} && ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} \ |
53 | ${INSTALL_TARGET} | | 61 | ${RUBY} setup.rb ${INSTALL_TARGET} |
54 | | | | |
55 | post-install: | | | |
56 | ${RM} -f ${WRKDIR}/PLIST_DYNAMIC | | | |
57 | cd ${DESTDIR}${PREFIX} && \ | | | |
58 | ${FIND} ${GEMS_SUBDIR}/doc/${DISTNAME} \! -type d -print \ | | | |
59 | | ${SORT} \ | | | |
60 | >> ${WRKDIR}/PLIST_DYNAMIC | | | |
61 | cd ${DESTDIR}${PREFIX} && \ | | | |
62 | ${FIND} ${GEMS_SUBDIR}/doc/${DISTNAME} -type d -print \ | | | |
63 | | ${SORT} -r \ | | | |
64 | | ${SED} -e "s/^/@dirrm /" \ | | | |
65 | >> ${WRKDIR}/PLIST_DYNAMIC | | | |
66 | | | 62 | |
67 | .include "../../mk/bsd.pkg.mk" | | 63 | .include "../../mk/bsd.pkg.mk" |