summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD36
1 files changed, 36 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..1a3f4b5aa11f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Otreblan <otreblain@gmail.com>
+
+pkgname='python-gql-git'
+pkgbase="${pkgname%-git}"
+pkgver=v3.0.0a1.r1.g8fc378d
+pkgrel=1
+pkgdesc="Python GraphQL client"
+arch=('any')
+url="https://github.com/graphql-python/gql"
+license=('MIT')
+depends=('python-six' 'python-graphql-core' 'python-promise' 'python-requests')
+makedepends=('python-setuptools' 'git')
+source=("$pkgname::git+$url.git")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ ( set -o pipefail
+ git describe --tags 2>/dev/null | sed 's/^v-//;s/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+build() {
+ cd "$srcdir/$pkgname"
+
+ python setup.py build
+}
+
+package() {
+ cd "$srcdir/$pkgname"
+
+ python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
+
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}