Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / misc / rubygems / Makefile
blobf56d2550ed4bd84c2981e6ce39d27b794809dc11
1 # $NetBSD: Makefile,v 1.49 2012/10/08 09:57:36 asau Exp $
3 DISTNAME= rubygems-1.8.25
4 CATEGORIES= misc ruby
5 MASTER_SITES= http://production.cf.rubygems.org/rubygems/ \
6 http://rubyforge.org/frs/download.php/75309/
7 EXTRACT_SUFX= .tgz
9 MAINTAINER= taca@NetBSD.org
10 HOMEPAGE= http://www.rubygems.org/
11 COMMENT= Ruby standard for publishing and managing third party libraries
12 LICENSE= gnu-gpl-v2 OR ruby-license
14 CONFLICTS+= rubygems-[0-9]*
16 .include "../../mk/bsd.prefs.mk"
18 NO_CONFIGURE= yes
19 NO_BUILD= yes
21 REPLACE_RUBY_DIRS= bin
22 REPLACE_RUBY_PAT= [a-z]*
24 GEM_DOCDIR= ${GEM_HOME}/doc/${DISTNAME}
26 REQD_DIRS= ${GEM_HOME:H}
27 REQD_DIRS+= ${GEM_HOME}
28 REQD_DIRS+= ${GEM_HOME}/cache
29 REQD_DIRS+= ${GEM_HOME}/doc
30 REQD_DIRS+= ${GEM_HOME}/gems
31 REQD_DIRS+= ${GEM_HOME}/specifications
33 SUBST_CLASSES+= conf
34 SUBST_STAGE.conf= pre-install
35 SUBST_FILES.conf= lib/rubygems/config_file.rb
36 SUBST_SED.conf= -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
37 SUBST_MESSAGE.conf= Fixing configuration files.
39 FILES_SUBST+= RUBYGEM_NAME=${RUBYGEM_NAME}
41 # Generate a dynamic PLIST for the rubygems documentation directory.
42 GENERATE_PLIST+= \
43 ${ECHO} "@comment The following lines are automatically generated." && \
44 cd ${DESTDIR}${PREFIX} && \
45 if [ -d ${GEM_DOCDIR:S|${PREFIX}/||} ]; then \
46 ${FIND} ${GEM_DOCDIR:S|${PREFIX}/||} \! -type d -print | \
47 ${SORT}; \
48 else \
49 :; \
52 # Force the Gem repository to be under ${DESTDIR}. This is harmless
53 # because this package depends on no other gems.
55 INSTALL_ENV+= GEM_HOME=${DESTDIR}${PREFIX}/${GEM_HOME}
56 INSTALL_ENV+= GEM_PATH=${DESTDIR}${PREFIX}/${GEM_HOME}
58 INSTALL_TARGET= install
59 INSTALL_TARGET+= --vendor --no-rdoc --no-ri
60 .if ${_USE_DESTDIR} != "no"
61 INSTALL_TARGET+= --destdir=${DESTDIR:Q}
62 .endif
64 # rubygem's setup.rb is not the typical setup.rb -- manually run the
65 # command to install.
67 do-install:
68 if [ -f ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME} ]; then \
69 ${MV} ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME} \
70 ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME}.orig; \
72 cd ${WRKSRC} && ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} \
73 ${RUBY} setup.rb ${INSTALL_TARGET}
74 ${MV} ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME} \
75 ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME}.new
76 if [ -f ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME}.orig ]; then \
77 ${MV} ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME}.orig \
78 ${DESTDIR}${PREFIX}/bin/${RUBYGEM_NAME}; \
81 .include "../../lang/ruby/modules.mk"
82 .include "../../mk/bsd.pkg.mk"