Fixup fromcvs/togit conversion
[pkgsrcv2.git] / misc / rubygems / Makefile
1 # $NetBSD: Makefile,v 1.29 2009/09/25 16:09:00 minskim Exp $
2
3 DISTNAME=       rubygems-1.3.5
4 PKGREVISION=    2
5 CATEGORIES=     misc ruby
6 MASTER_SITES=   http://rubyforge.org/frs/download.php/60718/
7 EXTRACT_SUFX=   .tgz
8
9 MAINTAINER=     minskim@NetBSD.org
10 HOMEPAGE=       http://www.rubygems.org/
11 COMMENT=        Ruby standard for publishing and managing third party libraries
12
13 PKG_DESTDIR_SUPPORT=    user-destdir
14
15 .include "../../mk/bsd.prefs.mk"
16
17 NO_CONFIGURE=   yes
18 NO_BUILD=       yes
19 RUBY_REQD=      1.8.7
20
21 REPLACE_RUBY_DIRS=      bin
22 REPLACE_RUBY_PAT=       [a-z]*
23
24 GEM_HOME=       ${PREFIX}/lib/ruby/gems/${RUBY_VER_DIR}
25 GEM_DOCDIR=     ${GEM_HOME}/doc/${DISTNAME}
26
27 REQD_DIRS=      ${GEM_HOME:H}
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 SUBST_CLASSES+=         conf
35 SUBST_STAGE.conf=       pre-install
36 SUBST_FILES.conf=       lib/rubygems/config_file.rb
37 SUBST_SED.conf=         -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
38 SUBST_MESSAGE.conf=     Fixing configuration files.
39
40
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           ${FIND} ${GEM_DOCDIR:S|${PREFIX}/||} \! -type d -print | \
46                 ${SORT};
47
48 .include "../../lang/ruby/modules.mk"
49
50 # Force the Gem repository to be under ${DESTDIR}.  This is harmless
51 # because this package depends on no other gems.
52 #
53 INSTALL_ENV+=           GEM_HOME=${DESTDIR}${GEM_HOME}
54 INSTALL_ENV+=           GEM_PATH=${DESTDIR}${GEM_HOME}
55
56 INSTALL_TARGET=         install
57 INSTALL_TARGET+=        --vendor
58 INSTALL_TARGET+=        --no-format-executable  # "bin/gem", not "bin/gem18"
59 .if ${_USE_DESTDIR} != "no"
60 INSTALL_TARGET+=        --destdir=${DESTDIR:Q}
61 .endif
62
63 # rubygem's setup.rb is not the typical setup.rb -- manually run the
64 # command to install.
65 #
66 do-install:
67         cd ${WRKSRC} && ${SETENV} ${INSTALL_ENV} ${MAKE_ENV} \
68                 ${RUBY} setup.rb ${INSTALL_TARGET}
69
70 .include "../../mk/bsd.pkg.mk"