archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-jsbeautifier / repos / community-any / PKGBUILD
blob30106e0052fb6e16717edfff3c3589bd7b76755b
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Maintainer: Daniel M. Capella <polyzen@archlinux.org>
4 pkgname=('python-jsbeautifier' 'python-cssbeautifier')
5 pkgbase=python-jsbeautifier
6 pkgver=1.14.7
7 pkgrel=3
8 arch=('any')
9 license=('MIT')
10 url='https://github.com/beautify-web/js-beautify'
11 depends=('python-editorconfig' 'python-six')
12 makedepends=('python-build' 'python-installer' 'python-setuptools'
13              'python-wheel')
14 source=("https://github.com/beautify-web/js-beautify/archive/v$pkgver/js-beautify-v$pkgver.tar.gz")
15 b2sums=('42353a2e7a89006e13c2a505f1cb0d3e379f778c3d874ac3c4824aa287030e2a18129ae26de7d8ad0d54e6506e95587b515d80b7307ca9cda0dc8592c9a41975')
17 prepare() {
18   cd js-beautify-$pkgver
19   cp -a python python-css
22 build() {
23   cd js-beautify-$pkgver/python
24   mv setup-js.py setup.py
25   python -m build --wheel --skip-dependency-check --no-isolation
26   cd ../python-css
27   mv setup-css.py setup.py
28   python -m build --wheel --skip-dependency-check --no-isolation
31 check() {
32   cd js-beautify-$pkgver
33   python python/js-beautify-test.py
36 package_python-jsbeautifier() {
37   pkgdesc='JavaScript unobfuscator and beautifier'
38   cd js-beautify-$pkgver/python
39   python -m installer --destdir="$pkgdir" dist/*.whl
40   install -D -m644 -t "$pkgdir"/usr/share/licenses/"${pkgname[0]}" ../LICENSE
43 package_python-cssbeautifier() {
44   pkgdesc='CSS unobfuscator and beautifier'
45   depends+=('python-jsbeautifier')
46   cd js-beautify-$pkgver/python-css
47   python -m installer --destdir="$pkgdir" dist/*.whl
48   install -D -m644 -t "$pkgdir"/usr/share/licenses/"${pkgname[1]}" ../LICENSE