summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8160c87a40c093d94c6452391f281eb3be161f48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Maintainer: BigfootACA <bigfoot@classfun.cn>

_pyname=xstatic-angular-lrdragndrop
_pycname=XStatic-Angular-lrdragndrop
pkgbase=python-$_pyname
pkgname=(python{,2}-$_pyname)
pkgver=1.0.2.4
pkgrel=1
pkgdesc="Angular-lrdragndrop 1.0.2.4 (XStatic packaging standard)"
arch=(any)
url="https://github.com/lorenzofox3/lrDragNDrop"
license=(MIT)
makedepends=(
	python
	python-xstatic
	python-xstatic-angular
	python-setuptools
	python2
	python2-xstatic
	python2-xstatic-angular
	python2-setuptools
)
source=(https://pypi.io/packages/source/${_pycname::1}/$_pycname/$_pycname-$pkgver.tar.gz)
md5sums=('6c6c7969bfa89701db2b316162b36291')
sha256sums=('5d3cce15a6342814811ddc372c6035bf4026253664c0b72a660b481cb183ae1b')
sha512sums=('5828382536d27cdfaf4eb2e35f0718c3201b10cad939fc086818e9a3052501660f07cddaf8525ca162aab307789243228880cacfe69b9a4acab77017a4b6ba89')

prepare(){
	sed -i '2s/from xstatic.pkg //g' $_pycname-$pkgver/setup.py
	cp -a $_pycname-$pkgver{,-py2}
}

_package_python(){
	depends=(
		python
		python-xstatic
		python-xstatic-angular
	)
	cd $_pycname-$pkgver
	export PYTHONPATH=${PWD}/xstatic/pkg
	python setup.py install --root "$pkgdir" --optimize=1
	find "$pkgdir" -perm -0222 -exec chmod 0644 {} \;
}

_package_python2(){
	depends=(
		python2
		python2-xstatic
		python2-xstatic-angular
	)
	cd $_pycname-$pkgver-py2
	export PYTHONPATH=${PWD}/xstatic/pkg
	python2 setup.py install --root "$pkgdir" --optimize=1
	find "$pkgdir" -perm -0222 -exec chmod 0644 {} \;
}

eval "package_python-${_pyname}(){ _package_python; }"
eval "package_python2-${_pyname}(){ _package_python2; }"