Difference between revisions of "APKBUILD examples:Ruby"

From Alpine Linux
Jump to: navigation, search
m
m
 
(3 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
<tt>gem</tt> is the standard way to install Ruby packages.
 
<tt>gem</tt> is the standard way to install Ruby packages.
 
+
<pre>
 
build() {
 
build() {
 
         mkdir -p "$_builddir" || return 1
 
         mkdir -p "$_builddir" || return 1
Line 6: Line 6:
 
         gem install $_realname -v $pkgver -i "$_builddir"$_gemdir \
 
         gem install $_realname -v $pkgver -i "$_builddir"$_gemdir \
 
--ignore-dependencies --verbose \
 
--ignore-dependencies --verbose \
--no-rdoc --no-ri || return 1
+
--no-rdoc \
 +
--no-ri \
 +
|| return 1
 
rm -rf "$_builddir"$_gemdir/cache/
 
rm -rf "$_builddir"$_gemdir/cache/
 
}
 
}
Line 14: Line 16:
 
         cp -ra "$_builddir"/* "$pkgdir"/ || return 1
 
         cp -ra "$_builddir"/* "$pkgdir"/ || return 1
 
}
 
}
 +
</pre>
 +
 +
[[Category:Development]] [[Category:Ruby]]

Latest revision as of 13:25, 20 January 2013

gem is the standard way to install Ruby packages.

build() {
        mkdir -p "$_builddir" || return 1
        local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')"
        gem install $_realname -v $pkgver -i "$_builddir"$_gemdir \
		--ignore-dependencies --verbose \
		--no-rdoc \
		--no-ri \
		|| return 1
	rm -rf "$_builddir"$_gemdir/cache/
}

package() {
        mkdir -p "$pkgdir" || return 1
        cp -ra "$_builddir"/* "$pkgdir"/ || return 1
}