mirror of
https://github.com/void-linux/void-packages.git
synced 2025-09-05 11:33:12 +02:00
build-style/gem: allow multiple version of gem
This commit is contained in:
parent
64aa7998d7
commit
770cbc65cf
1 changed files with 4 additions and 3 deletions
|
@ -3,11 +3,12 @@
|
||||||
#
|
#
|
||||||
do_install() {
|
do_install() {
|
||||||
: ${gem_cmd:=gem}
|
: ${gem_cmd:=gem}
|
||||||
|
: ${gemname:=${pkgname#ruby-}}
|
||||||
|
|
||||||
local _GEMDIR _INSTDIR
|
local _GEMDIR _INSTDIR
|
||||||
|
|
||||||
_GEMDIR=$($gem_cmd env gemdir)
|
_GEMDIR=$($gem_cmd env gemdir)
|
||||||
_INSTDIR=${DESTDIR}/${_GEMDIR}/gems/${pkgname#ruby-}-${version}
|
_INSTDIR=${DESTDIR}/${_GEMDIR}/gems/${gemname}-${version}
|
||||||
|
|
||||||
$gem_cmd install \
|
$gem_cmd install \
|
||||||
--local \
|
--local \
|
||||||
|
@ -16,7 +17,7 @@ do_install() {
|
||||||
--ignore-dependencies \
|
--ignore-dependencies \
|
||||||
--no-document \
|
--no-document \
|
||||||
--verbose \
|
--verbose \
|
||||||
${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname#ruby-}-${version}.gem
|
${XBPS_SRCDISTDIR}/${pkgname}-${version}/${gemname}-${version}.gem
|
||||||
|
|
||||||
# Remove cache
|
# Remove cache
|
||||||
rm -rf ${DESTDIR}/${_GEMDIR}/cache
|
rm -rf ${DESTDIR}/${_GEMDIR}/cache
|
||||||
|
@ -64,5 +65,5 @@ do_install() {
|
||||||
|
|
||||||
# Ignore the ~> operator, replace it with >=
|
# Ignore the ~> operator, replace it with >=
|
||||||
sed 's|~>|>=|g' \
|
sed 's|~>|>=|g' \
|
||||||
-i ${DESTDIR}/${_GEMDIR}/specifications/${pkgname#ruby-}-${version}.gemspec
|
-i ${DESTDIR}/${_GEMDIR}/specifications/${gemname}-${version}.gemspec
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue