123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107 |
- # Maintainer: Luke T. Shumaker <lukeshu@parabola.nu>
- # Maintainer (arch): Anatol Pomozov <anatol.pomozov@gmail.com>
- # Maintainer (arch): Andreas 'Segaja' Schleifer <segaja at archlinux dot org>
- # Parabola changes and rationale:
- #
- # FSDG:
- # - Disable default TPPM (rubygems.org, which hosts non-free packages).
- # https://wiki.parabola.nu/TPPM_Liberation_Project
- pkgname=rubygems
- pkgver=3.4.19
- pkgrel=1
- pkgrel+=.parabola1
- pkgdesc='Package management framework for Ruby'
- arch=('any')
- url='https://rubygems.org/'
- license=('MIT')
- depends=(
- ruby
- )
- makedepends=(
- rubygems
- ruby-default-gems-bootstrap # Parabola: which 'rubygems' implementation to use for bootstrapping
- ruby-rdoc
- )
- checkdepends=(
- cmake
- git
- ruby-rake
- ruby-test-unit
- ruby-webrick
- )
- provides=(
- ruby-rubygems
- )
- options=('!emptydirs')
- source=(
- "https://github.com/rubygems/rubygems/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz"
- # https://github.com/rubygems/rubygems/pull/7143
- ruby-3.4-fix-test-install_extension_in_lib.patch
- 0001-FSDG-rubygems-Have-default_sources-be-empty.patch # Parabola
- operating_system.rb)
- sha512sums=('8d0bc225ef01d3cc5e3ad12a1bf0bbb3923349bb9b79b76a9ac58bb8dcf79666a478a871d19919adc15f1aa2599efde5d3938c61801579277117b569e7007656'
- '21ae6a370b0980d75beab168c8ea627dcca661e60ba676bcec8285be989f859eaccbf571e947a26cb275202208c784388cd7d3cb61b49c22ab544e2a44929a2a'
- '490b947841884517ca9c331c0f286b8475d09206781e09f81cbe2874effff2958f6e13d8e73148b7bd13cb8e6eb6fccf78518d5c395b4683469ca65c76715aa1'
- '9d74b5528fc87c78316abdd5423a15a8859aec0cd230b20906c53e7e05d8ba8a156af42dc0f6cff270f0c75196079e622c45cc9f0b2f512fc5311fd54e37ab11')
- b2sums=('adf618f326fa83a8eb7febb9872a71f2bf78048dfa7c4db07343c9813ba5d858c86bcd6e54df1a559e60e458ba8d73d2a7ac82ee5e0cbde6e9d8b45c12793d4c'
- 'b2ad268d3bebdf2e26e2c1b95c5ec890b077d6ee71aae3f507614792d356d99cf494c6429a4df85d8142f866755fc331547d77f41411c68dbaa7a2fdd2cdf1cc'
- '5e5d4ceb6f7688742ae396149430af308d73ac6744017847d67030cb40c78d2e5d6d156ecd377b2e3bcb7c6d65da8b50a92c17165be2d7a80762e313189fffa7'
- '714ce47535ede25cad914002c45c908de7d4ff6eae5b25daf9ab1d3a75e09fffe6e17bc73422f9ba2fe16ae5e120352c536d2ab6152a36431a7f35e9c5466b47')
- prepare() {
- cd "rubygems-${pkgver}"
- sed --in-place --regexp-extended 's|git ls-files|find -type f -not -path "*/\.git/*"|' Rakefile
- patch -Np1 < ../ruby-3.4-fix-test-install_extension_in_lib.patch
- patch -Np1 < ../0001-FSDG-rubygems-Have-default_sources-be-empty.patch # Parabola
- }
- check() {
- cd "rubygems-${pkgver}"
- rake update_manifest test
- }
- package() {
- cd "rubygems-${pkgver}"
- local _gemdir="$(ruby -e 'puts Gem.dir')"
- local _extension_api_version="$(ruby -e 'puts Gem.extension_api_version')"
- export GEM_HOME="${pkgdir}${_gemdir}"
- install --verbose -d --mode=0755 \
- "${GEM_HOME}" \
- "${pkgdir}/usr/lib/ruby/${_extension_api_version}"
- # define the current version as previous version to avoid printing the changelog
- ruby setup.rb \
- --destdir="${pkgdir}" \
- --prefix="/usr" \
- --previous-version="${pkgver}" \
- --verbose
- # fix package structure
- mv --verbose "${pkgdir}/usr/lib/${pkgname}.rb" "${pkgdir}/usr/lib/ruby/${_extension_api_version}"
- mv --verbose "${pkgdir}/usr/lib/${pkgname}" "${pkgdir}/usr/lib/ruby/${_extension_api_version}"
- # cleanup - remove any bundler references as they are provided by https://archlinux.org/packages/community/any/ruby-bundler/
- rm --force --verbose --recursive \
- "${pkgdir}/usr/bin/"{bundle*,rake,rake-compiler,rspec,rdbg,rbs,typeprof,erb} \
- "${pkgdir}/usr/gems" \
- "${pkgdir}/usr/lib/bundler.rb" \
- "${pkgdir}/usr/lib/bundler" \
- "${pkgdir}/usr/specifications"
- install --verbose -D --mode=0644 ../operating_system.rb --target-directory "${pkgdir}/usr/lib/ruby/vendor_ruby/rubygems/defaults"
- install --verbose -D --mode=0644 LICENSE.txt MIT.txt --target-directory "${pkgdir}/usr/share/licenses/${pkgname}"
- install --verbose -D --mode=0644 *.md --target-directory "${pkgdir}/usr/share/doc/${pkgname}"
- }
- # vim: tabstop=2 shiftwidth=2 expandtab:
|