community/py-django-compressor: modernize abuild

This commit is contained in:
Roberto Oliveira 2018-04-14 15:25:51 +00:00
parent 85812ec2d5
commit 5d641c58e7

View File

@ -1,34 +1,26 @@
# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
pkgname=py-django-compressor
_pkgname=django_compressor
pkgver=2.2
pkgrel=0
pkgrel=1
pkgdesc="JavaScript and CSS compressor for Django"
url=https://github.com/django-compressor/django-compressor
arch=noarch
url="https://github.com/django-compressor/django-compressor"
arch="noarch"
license="MIT and Apache-2.0 and BSD"
depends="py-django py-django-appconf"
makedepends=py-setuptools
source="https://files.pythonhosted.org/packages/source/d/django_compressor/django_compressor-$pkgver.tar.gz"
makedepends="py-setuptools"
source="https://files.pythonhosted.org/packages/source/d/$_pkgname/$_pkgname-$pkgver.tar.gz"
_builddir=$srcdir/django_compressor-$pkgver
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
}
builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$_builddir"
cd "$builddir"
python2 setup.py build
}
package() {
cd "$_builddir"
cd "$builddir"
python2 setup.py install --root "$pkgdir"
}