diff options
author | Stuart Cardall <developer@it-offshore.co.uk> | 2017-04-04 14:10:13 +0000 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-04-21 23:21:23 +0200 |
commit | ce7ebc04468a33e09ed45e813181312a717f7f39 (patch) | |
tree | 6fd28739b18ec8f8b637bf38cdc7d1e54039f377 /community | |
parent | 472c7c7ab5ee8d0739168005be452fcbec9a8d8e (diff) | |
download | aports-ce7ebc04468a33e09ed45e813181312a717f7f39.tar.bz2 aports-ce7ebc04468a33e09ed45e813181312a717f7f39.tar.xz |
testing/py-yuicompressor: move to community
Diffstat (limited to 'community')
-rw-r--r-- | community/py-yuicompressor/APKBUILD | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/community/py-yuicompressor/APKBUILD b/community/py-yuicompressor/APKBUILD new file mode 100644 index 0000000000..ab185d8da3 --- /dev/null +++ b/community/py-yuicompressor/APKBUILD @@ -0,0 +1,55 @@ +# Contributor: Stuart Cardall <developer@it-offshore.co.uk> +# Maintainer: Stuart Cardall <developer@it-offshore.co.uk> +pkgname=py-yuicompressor +_pkgname=${pkgname/py-/} +pkgver=2.4.8 +pkgrel=1 +pkgdesc="YUI Compressor is a JavaScript and CSS minifier written in Java." +url="https://pypi.python.org/pypi/yuicompressor" +arch="noarch" +license="BSD" +depends="openjdk8-jre-base" +makedepends="python2-dev python3-dev py-setuptools" +subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" +source="$pkgname-$pkgver.tar.gz::https://github.com/sprat/yuicompressor/archive/$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" + +build() { + cd "$builddir" + python2 setup.py build || return 1 + python3 setup.py build || return 1 +} + +package() { + mkdir -p "$pkgdir"/usr/bin + + # Create unsuffixed symlinks for executables from py3 subpackage. + local name; for name in yuicompressor; do + ln -s $name-3 "$pkgdir"/usr/bin/$name || return 1 + done +} + +_py2() { + _py python2 +} + +_py3() { + _py python3 +} + +_py() { + local python="$1" + local pyver="${1:6:1}" + pkgdesc="$pkgdesc (for $python)" + depends="$depends $python" ## remove if arch isn't noarch + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" + + # Add version suffix to executable files. + local path; for path in "$subpkgdir"/usr/bin/*; do + mv "$path" "$path-$pyver" || return 1 + done +} +sha512sums="8e5dc2d2a4bea68961cbccad0cf6c5411f607f75b1b1b6f351560d6fa9862a124a5d277f7bf8b62261439e45fd32441cd4555b7c902b6bc48df3d5357e43505e py-yuicompressor-2.4.8.tar.gz" |