-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5749 from JPeterMugaas/rake-compiler
ruby-rake-compiler - 1.0.7 - new package - Rake-based Ruby Extension …
- Loading branch information
Showing
1 changed file
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net> | ||
|
||
_realname=rake-compiler | ||
pkgbase="mingw-w64-ruby-${_realname}" | ||
pkgname="${MINGW_PACKAGE_PREFIX}-ruby-${_realname}" | ||
pkgver=1.0.7 | ||
pkgrel=1 | ||
pkgdesc="Rake-based Ruby Extension (C, Java) task generator (mingw-w64)" | ||
arch=('any') | ||
url='https://github.com/rake-compiler/rake-compiler' | ||
license=('MIT') | ||
depends=("${MINGW_PACKAGE_PREFIX}-ruby") | ||
makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") | ||
source=(https://rubygems.org/downloads/${_realname}-${pkgver}.gem) | ||
noextract=(${_realname}-$pkgver.gem) | ||
sha256sums=('755de500565a06900d7f4286f1c761f5681a88c2420f64a27db4f2dd6e0a14dd') | ||
|
||
check() { | ||
local _gemdir="$(ruby -e 'puts Gem.default_dir')" | ||
_gemdir="$(cygpath -u ${_gemdir})" | ||
|
||
${MINGW_PREFIX}/bin/gem check --verbose \ | ||
"${_realname}-${pkgver}.gem" | ||
} | ||
|
||
package() { | ||
local _gemdir="$(${MINGW_PREFIX}/bin/ruby -e 'puts Gem.default_dir')" | ||
_gemdir="$(cygpath -u ${_gemdir})" | ||
|
||
${MINGW_PREFIX}/bin/gem install --ignore-dependencies --no-user-install --verbose \ | ||
-i "${pkgdir}/${_gemdir}" -n "${pkgdir}${MINGW_PREFIX}/bin" \ | ||
"${_realname}-${pkgver}.gem" | ||
|
||
local _ruby_exe=$(cygpath -m ${MINGW_PREFIX}/bin/ruby.exe) | ||
|
||
#for this conversion, we want the fully qualified ruby .exe path | ||
#so that we can be sure that we are calling the correct one. | ||
sed -e "s|${_ruby_exe}|${MINGW_PREFIX}/bin/ruby|g" \ | ||
-i ${pkgdir}${MINGW_PREFIX}/bin/${_realname} | ||
|
||
#for Win32 .bat files, we want to drop the path references as the path | ||
#refs are not needed since it's involved from the same dir. If we did | ||
#need fully-qualified pathes, they would have to be fully-qualified and | ||
# in DOS format. | ||
local _inst_dir=$(cygpath -m ${pkgdir}/${MINGW_PREFIX}/bin/) | ||
local _w_ruby_exe=$(cygpath -w ${MINGW_PREFIX}/bin/ruby.exe | sed 's/\\/\\\\/g') | ||
sed -e "s|${_w_ruby_exe}|ruby.exe|g" \ | ||
-e "s|${_inst_dir}||g" \ | ||
-i ${pkgdir}${MINGW_PREFIX}/bin/${_realname}.bat | ||
|
||
# install -Dm644 "${pkgdir}/${_gemdir}/gems/${_realname}-${pkgver}/man/${_realname}.1" \ | ||
# "${pkgdir}${MINGW_PREFIX}/share/man/man1/${_realname}.1" | ||
|
||
rm "${pkgdir}/${_gemdir}/cache/${_realname}-${pkgver}.gem" | ||
rm -rf "${pkgdir}${MINGW_PREFIX}/${_gemdir}/gems/${_realname}-${pkgver}/man" | ||
} |