summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorChris Oelmueller2021-05-01 23:10:17 +0200
committerChris Oelmueller2021-05-01 23:10:17 +0200
commita1b562f0bbc09abb23d6e93a89eba96564cd65a5 (patch)
treee245a5409823b993f148b52d9b98fb575ec261bc /PKGBUILD
parente3280f36a59bb522517e74787628c1155e09ccb4 (diff)
downloadaur-a1b562f0bbc09abb23d6e93a89eba96564cd65a5.tar.gz
python2-cssmin: Modernize PKGBUILD (no functional changes intended)
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD29
1 files changed, 18 insertions, 11 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 622faf75540e..7b186dbe4a88 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,29 +1,36 @@
# Maintainer: Chris Oelmueller <chris.oelmueller@gmail.com>
pkgname=python2-cssmin
-_pythonname=cssmin
+_name=${pkgname#python2-}
pkgver=0.2.0
-pkgrel=1
+pkgrel=2
arch=('any')
license=('MIT' 'BSD')
-pkgdesc='Python port of the YUI CSS compression algorithm.'
+pkgdesc='Python port of the YUI CSS compression algorithm. No longer maintained.'
depends=('python2')
url='https://github.com/zacharyvoase/cssmin'
-source=("http://pypi.python.org/packages/source/c/${_pythonname}/${_pythonname}-${pkgver}.tar.gz"
- "https://raw.github.com/zacharyvoase/${_pythonname}/v${pkgver}/LICENSE")
+source=("https://pypi.python.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz"
+ "https://raw.github.com/zacharyvoase/${_name}/v${pkgver}/LICENSE")
md5sums=('c2798658a4f69663365a3e70c3b8250b'
'7f9dbc2d22a3975e22fd6ce0f3d6268f')
+PYTHON='python2'
+
prepare() {
- cd $srcdir/${_pythonname}-${pkgver}
+ cd "${srcdir}/${_name}-${pkgver}"
# necessary in cssmin.py
- find -name '*\.py' -exec sed -e 's@#!\(\s\)*/usr/bin/env python@&2@' -i {} \;
+ find -name '*\.py' -exec sed -e 's@#!\(\s\)*/usr/bin/env python$@&2@' -i {} \;
}
-package() {
- cd $srcdir/${_pythonname}-${pkgver}
- python2 setup.py install --prefix=/usr --root=$pkgdir --optimize=1
+build() {
+ cd "${srcdir}/${_name}-${pkgver}"
+ $PYTHON setup.py build
+}
+package() {
+ cd "${srcdir}/${_name}-${pkgver}"
+ $PYTHON setup.py install --root="$pkgdir" --optimize=1 --skip-build
# this package contains BSD-licensed parts
- install -D -m 644 $srcdir/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
+ install -D -m 644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
+