Mainly switching from HTTP to HTTPS where the HTTP URL is a redirect to the HTTPS URL, but also fixing a few broken links.
61 lines
2.2 KiB
Bash
61 lines
2.2 KiB
Bash
# Maintainer: J. Peter Mugaas <jpmugaas@suddenlink.net>
|
|
|
|
_realname=rdiscount
|
|
pkgbase="mingw-w64-ruby-${_realname}"
|
|
pkgname="${MINGW_PACKAGE_PREFIX}-ruby-${_realname}"
|
|
pkgver=2.2.7.3
|
|
pkgrel=2
|
|
pkgdesc="Fast Implementation of Gruber's Markdown in C (mingw-w64)"
|
|
arch=('any')
|
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
url='https://dafoster.net/projects/rdiscount/'
|
|
msys2_repository_url='https://github.com/davidfstr/rdiscount'
|
|
msys2_references=(
|
|
'purl: pkg:gem/rdiscount'
|
|
)
|
|
license=('spdx:MIT')
|
|
depends=("${MINGW_PACKAGE_PREFIX}-ruby")
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-cc")
|
|
source=(https://rubygems.org/downloads/${_realname}-${pkgver}.gem)
|
|
noextract=(${_realname}-${pkgver}.gem)
|
|
sha256sums=('8a4844f930916fc7215dc369932626be85f2da13cdf48185b836055b63126113')
|
|
|
|
check() {
|
|
local _gemdir="$(ruby -e 'puts Gem.default_dir')"
|
|
_gemdir="$(cygpath -u ${_gemdir})"
|
|
|
|
gem check --verbose "${_realname}-${pkgver}.gem"
|
|
}
|
|
|
|
package() {
|
|
local _gemdir="$(ruby -e 'puts Gem.default_dir')"
|
|
_gemdir="$(cygpath -u ${_gemdir})"
|
|
|
|
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/rdiscount
|
|
|
|
# For Win32 .bat files, we want to drop the path references as the path
|
|
# refs are not needed since it's invoked from the same dir. If we did
|
|
# need fully-qualified paths, 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/rdiscount.bat
|
|
|
|
install -Dm644 "${pkgdir}/${_gemdir}/gems/${_realname}-${pkgver}/man/rdiscount.1" \
|
|
"${pkgdir}${MINGW_PREFIX}/share/man/man1/rdiscount.1"
|
|
|
|
rm "${pkgdir}/${_gemdir}/cache/${_realname}-${pkgver}.gem"
|
|
rm -rf "${pkgdir}/${_gemdir}/gems/${_realname}-${pkgver}/man"
|
|
}
|