diff options
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 65 |
2 files changed, 31 insertions, 57 deletions
@@ -1,24 +1,17 @@ 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 = 3 + pkgdesc = A tool that will normalize XML and other data inside of a UFO + pkgver = 0.4.2.r1.gd22e855 + pkgrel = 1 url = https://github.com/unified-font-object/ufoNormalizer arch = any - license = unknown + license = BSD 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 + makedepends = python-setuptools-scm depends = python provides = python-ufonormalizer conflicts = python-ufonormalizer + source = git+https://github.com/unified-font-object/ufoNormalizer.git + sha256sums = SKIP -pkgname = python2-ufonormalizer-git - depends = python2 - provides = python2-ufonormalizer - conflicts = python2-ufonormalizer +pkgname = python-ufonormalizer-git @@ -1,52 +1,33 @@ -# Maintainer: William Turner <willtur.will@gmail.com> -pkgbase=python-ufonormalizer-git -pkgname=(python-ufonormalizer-git python2-ufonormalizer-git) +# Maintainer: Caleb Maclenenan <caleb@alerque.com> +# Contributor: William Turner <willtur.will@gmail.com> + +pkgname=python-ufonormalizer-git _pkgname=ufoNormalizer -pkgver=0.1.r178.1ed0111 -pkgrel=3 -pkgdesc='A tool that will normalize the XML and other data inside of a UFO.' +pkgver=0.4.2.r1.gd22e855 +pkgrel=1 +pkgdesc="A tool that will normalize XML and other data inside of a UFO" +url="https://github.com/unified-font-object/$_pkgname" +license=('BSD') 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") +depends=('python') +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +makedepends=('git' 'python-setuptools-scm') +source=("git+$url.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)" + cd "$_pkgname" + git describe --long --tags --abbrev=7 HEAD | + sed 's/\([^-]*-g\)/r\1/;s/-/./g' } -package_python-ufonormalizer-git() { - depends=('python') - provides=('python-ufonormalizer') - conflicts=('python-ufonormalizer') - - cd "${srcdir}/${_pkgname}" - - # build and install the package - python setup.py install --root="${pkgdir}/" --prefix=/usr --optimize=1 - - # remove the installed scripts to prevent conflicts between both packages - rm -r "${pkgdir}/usr/bin" +build() { + cd "$_pkgname" + python setup.py build } -package_python2-ufonormalizer-git() { - depends=('python2') - provides=('python2-ufonormalizer') - conflicts=('python2-ufonormalizer') - - cd "${srcdir}/${_pkgname}" - - # build and install the package - python2 setup.py install --root="$pkgdir/" --prefix=/usr --optimize=1 - - # remove the installed scripts to prevent conflicts between both packages - rm -r "${pkgdir}/usr/bin" +package() { + cd "$_pkgname" + python setup.py install --root="$pkgdir" --optimize=1 --skip-build } |