arch-pkgs/python-cron-descriptor/PKGBUILD

47 lines
954 B
Text
Raw Normal View History

# Maintainer: George Rawlinson <grawlinson@archlinux.org>
pkgname=python-cron-descriptor
_pkgname="${pkgname#python-}"
pkgver=1.2.28
pkgrel=1
pkgdesc='A Python library that converts cron expressions into human readable strings'
arch=('any')
url='https://github.com/Salamek/cron-descriptor'
license=('MIT')
depends=('python')
makedepends=('git' 'python-setuptools')
_commit='97b40bdc87408474ebafdd8f97bf5eabd2e31628'
source=("$pkgname::git+$url#commit=$_commit")
b2sums=('SKIP')
pkgver() {
cd "$pkgname"
git describe --tags | sed 's/^v//'
}
build() {
cd "$pkgname"
python setup.py build
}
check() {
cd "$pkgname"
python -m unittest
}
package() {
cd "$pkgname"
python setup.py install --root="$pkgdir" --optimize=1
# documentation
install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" README.md
cp -vr examples "$pkgdir/usr/share/doc/$pkgname"
# license
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}