diff options
author | William Turner | 2017-01-04 21:25:59 -0500 |
---|---|---|
committer | William Turner | 2017-01-04 21:25:59 -0500 |
commit | 0a7a33be94a5883f2fb31fbcdd302af10137a2da (patch) | |
tree | cfa01b98150facdf5d5e2e4435f2f06ddae628d2 /PKGBUILD | |
download | aur-0a7a33be94a5883f2fb31fbcdd302af10137a2da.tar.gz |
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..aa679ec87540 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: William Turner <willtur.will@gmail.com> +pkgbase=python-ufonormalizer-git +pkgname=(python-ufonormalizer-git python2-ufonormalizer-git) +_pkgname=ufoNormalizer +pkgver=0.1.r178.1ed0111 +pkgrel=1 +pkgdesc='A tool that will normalize the XML and other data inside of a UFO.' +arch=('any') +url='https://github.com/unified-font-object/ufoNormalizer' +license=('unknown') +makedepends=('git' 'python-setuptools' 'python2-setuptools') +options=(!emptydirs) +source=("git+https://github.com/unified-font-object/${_pkgname}.git") +sha256sums=('SKIP') + +pkgver() { + cd "${srcdir}/${_pkgname}" + + # generate version using the one in setup.py, the commit count and the commit hash + printf "%s.r%s.%s" \ + "$(grep -oP '(?<=version=")[^"]+' setup.py)" \ + "$(git rev-list --count HEAD)" \ + "$(git rev-parse --short HEAD)" +} + +package_python-ufonormalizer-git() { + depends=('python') + provides=('python-ufonormalizer-git') + conflicts=('python-ufonormalizer') + + cd "${srcdir}/${_pkgname}" + + # build and install the package + python setup.py install --root="$pkgdir/" --prefix=/usr --optimize=1 +} + +package_python2-ufonormalizer-git() { + depends=('python2') + provides=('python2-ufonormalizer-git') + conflicts=('python2-ufonormalizer') + + cd "${srcdir}/${_pkgname}" + + # build and install the package + python2 setup.py install --root="$pkgdir/" --prefix=/usr --optimize=1 +} |