Thu Mar 13 18:45:05 2008 UTC ()
+ Rename some variables and modify a few definitions so that we match
  the same variables used in rubygem.mk.

+ Use a GENERATE_PLIST statement instead of manually generating a
  PLIST_DYNAMIC file.  This code is copied from RUBYGEM_GENERATE_PLIST
  in rubygem.mk.

+ Use INSTALL_ENV, which is meant to contain the extra environment
  bits for use during installation.


(jlam)
diff -r1.16 -r1.17 pkgsrc/misc/rubygems/Makefile

cvs diff -r1.16 -r1.17 pkgsrc/misc/rubygems/Attic/Makefile (expand / switch to unified diff)

--- pkgsrc/misc/rubygems/Attic/Makefile 2008/03/12 15:07:47 1.16
+++ pkgsrc/misc/rubygems/Attic/Makefile 2008/03/13 18:45:05 1.17
@@ -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
3DISTNAME= rubygems-1.0.1 3DISTNAME= rubygems-1.0.1
4PKGREVISION= 2 4PKGREVISION= 2
5CATEGORIES= misc ruby 5CATEGORIES= misc ruby
6MASTER_SITES= http://rubyforge.org/frs/download.php/29548/ 6MASTER_SITES= http://rubyforge.org/frs/download.php/29548/
7EXTRACT_SUFX= .tgz 7EXTRACT_SUFX= .tgz
8 8
9MAINTAINER= minskim@NetBSD.org 9MAINTAINER= minskim@NetBSD.org
10HOMEPAGE= http://www.rubygems.org/ 10HOMEPAGE= http://www.rubygems.org/
11COMMENT= Ruby standard for publishing and managing third party libraries 11COMMENT= Ruby standard for publishing and managing third party libraries
12 12
13PKG_DESTDIR_SUPPORT= user-destdir 13PKG_DESTDIR_SUPPORT= user-destdir
14 14
15.include "../../mk/bsd.prefs.mk" 15.include "../../mk/bsd.prefs.mk"
16 16
17NO_CONFIGURE= yes 17NO_CONFIGURE= yes
18NO_BUILD= yes 18NO_BUILD= yes
19RUBY_REQD= 1.8.3 19RUBY_REQD= 1.8.3
20 20
21REPLACE_RUBY_DIRS= ${WRKSRC}/bin 21REPLACE_RUBY_DIRS= ${WRKSRC}/bin
22REPLACE_RUBY_PAT= [a-z]* 22REPLACE_RUBY_PAT= [a-z]*
23 23
24GEMS_SUBDIR= lib/ruby/gems/${RUBY_VER_DIR} 24GEM_HOME= ${PREFIX}/lib/ruby/gems/${RUBY_VER_DIR}
25REQD_DIRS= ${GEMS_SUBDIR:H} 25GEM_DOCDIR= ${GEM_HOME}/doc/${DISTNAME}
26REQD_DIRS+= ${GEMS_SUBDIR} 
27REQD_DIRS+= ${GEMS_SUBDIR}/cache 
28REQD_DIRS+= ${GEMS_SUBDIR}/doc 
29REQD_DIRS+= ${GEMS_SUBDIR}/gems 
30REQD_DIRS+= ${GEMS_SUBDIR}/specifications 
31 26
32PLIST_SRC= ${PKGDIR}/PLIST.common 27REQD_DIRS= ${GEM_HOME:H}
33PLIST_SRC+= ${WRKDIR}/PLIST_DYNAMIC 28REQD_DIRS+= ${GEM_HOME}
 29REQD_DIRS+= ${GEM_HOME}/cache
 30REQD_DIRS+= ${GEM_HOME}/doc
 31REQD_DIRS+= ${GEM_HOME}/gems
 32REQD_DIRS+= ${GEM_HOME}/specifications
 33
 34# Generate a dynamic PLIST for the rubygems documentation directory.
 35GENERATE_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#
40MAKE_ENV+= GEM_HOME=${DESTDIR}${PREFIX}/${GEMS_SUBDIR} 48INSTALL_ENV+= GEM_HOME=${DESTDIR}${GEM_HOME}
41 49
42INSTALL_TARGET= install 50INSTALL_TARGET= install
43INSTALL_TARGET+= --format-executable 51INSTALL_TARGET+= --format-executable
44.if ${_USE_DESTDIR} != "no" 52.if ${_USE_DESTDIR} != "no"
45INSTALL_TARGET+= --buildroot=${DESTDIR:Q} 53INSTALL_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#
51do-install: 59do-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 
55post-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"