scour: add package
This commit is contained in:
47
mingw-w64-scour/PKGBUILD
Normal file
47
mingw-w64-scour/PKGBUILD
Normal file
@@ -0,0 +1,47 @@
|
||||
# Maintainer: Biswapriyo Nath <nathbappai@gmail.com>
|
||||
|
||||
_realname=scour
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
pkgver=0.37
|
||||
pkgrel=1
|
||||
pkgdesc="An SVG scrubber (mingw-w64)"
|
||||
arch=('any')
|
||||
url='https://github.com/codedread/scour'
|
||||
license=('Apache')
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-python"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-setuptools"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-six")
|
||||
source=("${_realname}-${pkgver}.tar.gz"::"https://github.com/scour-project/scour/archive/v${pkgver}.tar.gz")
|
||||
sha256sums=('4fcb961586d8a6d98ac9343ca5647421b98fdc79b51d81a1d3d18576b7908823')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}"
|
||||
cp -r ${_realname}-${pkgver} python-build-${CARCH}
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/python-build-${CARCH}"
|
||||
${MINGW_PREFIX}/bin/python setup.py build
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "${srcdir}/python-build-${CARCH}"
|
||||
${MINGW_PREFIX}/bin/python setup.py check
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/python-build-${CARCH}"
|
||||
MSYS2_ARG_CONV_EXCL="--prefix=;--install-scripts=;--install-platlib=" \
|
||||
${MINGW_PREFIX}/bin/python setup.py install --prefix=${MINGW_PREFIX} \
|
||||
--root "${pkgdir}" --optimize=1 --skip-build
|
||||
|
||||
install -Dm644 "${srcdir}/${_realname}-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/python-${_realname}/LICENSE"
|
||||
|
||||
local PREFIX_WIN=$(cygpath -wm ${MINGW_PREFIX})
|
||||
# fix python command in files
|
||||
for _f in "${pkgdir}${MINGW_PREFIX}"/bin/*.py; do
|
||||
sed -e "s|/usr/bin/env |${MINGW_PREFIX}|g" \
|
||||
-e "s|${PREFIX_WIN}|${MINGW_PREFIX}|g" -i ${_f}
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user