summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames An2018-03-16 11:46:59 -0400
committerJames An2018-03-16 11:46:59 -0400
commitd4486f0d462ab716d62b105a4516fe80bce860ad (patch)
treec2d829a64f424ddcdc6449bbd42a1ac9d2d74035
downloadaur-d4486f0d462ab716d62b105a4516fe80bce860ad.tar.gz
Initial commit with working PKGBUILD.
-rw-r--r--.SRCINFO15
-rw-r--r--.gitignore27
-rw-r--r--PKGBUILD40
3 files changed, 82 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..0e5dc874cdfc
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = python2-ntplib
+ pkgdesc = Python NTP library
+ pkgver = 0.3.3
+ pkgrel = 1
+ url = http://code.google.com/p/$_pkgname
+ arch = any
+ license = MIT
+ makedepends = python2
+ makedepends = python2-setuptools
+ depends = python2
+ source = https://files.pythonhosted.org/packages/source/n/ntplib/ntplib-0.3.3.tar.gz
+ md5sums = c7cc8e9b09f40c84819859d70b7784ca
+
+pkgname = python2-ntplib
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..43316bc3c124
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,27 @@
+# From: https://github.com/github/gitignore/blob/master/ArchLinuxPackages.gitignore
+
+*.tar
+*.tar.*
+*.zip
+*.tgz
+*.log
+*.log.*
+*.sig
+
+# makepkg working folders
+pkg
+src
+
+#
+# Additional ignore patterns:
+#
+
+# Source files
+*.deb
+*.gem
+*.out
+*.rpm
+*.html
+
+# Ignore package source folders
+*/*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6d1f3a47dee1
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: James An <james@jamesan.ca>
+
+pkgname=python2-ntplib
+_pkgname=${pkgname#python2-}
+pkgver=0.3.3
+pkgrel=1
+pkgdesc="Python NTP library"
+arch=('any')
+url='http://code.google.com/p/$_pkgname'
+license=('MIT')
+depends=('python2')
+makedepends=('python2' 'python2-setuptools')
+
+source=("https://files.pythonhosted.org/packages/source/n/ntplib/ntplib-0.3.3.tar.gz")
+md5sums=('c7cc8e9b09f40c84819859d70b7784ca')
+
+prepare() {
+ cd "$_pkgname-$pkgver"
+
+ sed -n '/^# Copyright/,/^# SOFTWARE/{s/^# \?//;p}' ntplib.py > ../LICENSE
+}
+
+build() {
+ cd "$_pkgname-$pkgver"
+
+ python2 setup.py build
+}
+
+check() {
+ cd "$_pkgname-$pkgver"
+
+ python2 test_ntplib.py
+}
+
+package() {
+ cd "$_pkgname-$pkgver"
+
+ python2 setup.py install --root="$pkgdir" --optimize=1
+ install -D -m644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}