diff options
author | lester | 2014-08-26 01:22:27 +0800 |
---|---|---|
committer | lester | 2014-08-26 01:22:27 +0800 |
commit | 9b25c02d76c562d3b8e2e8b4c49a32c0f794adbb (patch) | |
tree | b4ba0a1c6fd490733ed655c14ca5974069095f2b | |
download | aur-9b25c02d76c562d3b8e2e8b4c49a32c0f794adbb.tar.gz |
Create VCS PKGBUILD for pyhamcrest
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 32 |
2 files changed, 48 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..77ed455733d1 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = pyhamcrest + pkgdesc = A framework for writing matcher objects, allowing you to declaratively define "match" rules + pkgver = 1.8.0.r5.gf2786ca + pkgrel = 1 + url = https://github.com/hamcrest/PyHamcrest + arch = any + license = BSD + makedepends = python2-setuptools + makedepends = python-setuptools + source = git+https://github.com/hamcrest/PyHamcrest.git + md5sums = SKIP + +pkgname = python2-hamcrest-git + +pkgname = python-hamcrest-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..82197547bd65 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,32 @@ +# Maintainer: lestb <tkhdlstfl dot l plus aur at gmail dot com> + +_pkgname=PyHamcrest +pkgbase=${_pkgname,,} +pkgname=(python{2,}-hamcrest-git) +pkgver=1.8.0.r5.gf2786ca +pkgrel=1 +pkgdesc='A framework for writing matcher objects, allowing you to declaratively define "match" rules' +arch=('any') +url="https://github.com/hamcrest/PyHamcrest" +license=('BSD') +makedepends=(python{2,}-setuptools) +source=("git+https://github.com/hamcrest/${_pkgname}.git") +md5sums=('SKIP') + +pkgver() { + cd "${_pkgname}" + git describe --tags --long | sed -r 's/([^-]*-g)/r\1/;s/-/./g;s/^V//' +} + +_package() { + pybin=$1 + depends=(${pybin}) + cd "${srcdir}/${_pkgname}" + ${pybin} setup.py install --root="${pkgdir}" --optimize=1 + install -D -m644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} + +for _name in "${pkgname[@]}"; do + _splitname=(${_name//-/ }) # For retriving the python version needed + eval "package_${_name}() { _package ${_splitname[0]}; }" +done |