diff options
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 46 |
2 files changed, 70 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..af06144248f5 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = python-ufonormalizer-git + pkgdesc = A tool that will normalize the XML and other data inside of a UFO. + pkgver = 0.1.r178.1ed0111 + pkgrel = 1 + url = https://github.com/unified-font-object/ufoNormalizer + arch = any + license = unknown + makedepends = git + makedepends = python-setuptools + makedepends = python2-setuptools + options = !emptydirs + source = git+https://github.com/unified-font-object/ufoNormalizer.git + sha256sums = SKIP + +pkgname = python-ufonormalizer-git + depends = python + provides = python-ufonormalizer-git + conflicts = python-ufonormalizer + +pkgname = python2-ufonormalizer-git + depends = python2 + provides = python2-ufonormalizer-git + conflicts = python2-ufonormalizer + 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 +} |