summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Downey2019-01-19 07:32:19 -0600
committerJohn Downey2019-01-19 07:32:19 -0600
commit8c8f15aff4c2670ebeaae1246ac9657da457ab13 (patch)
treea20a4f6544dcd54a4aa9dc22f8bc23a017a216ff
downloadaur-8c8f15aff4c2670ebeaae1246ac9657da457ab13.tar.gz
Add initial build script
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD39
-rw-r--r--nsscache-fix-config-path.patch13
3 files changed, 70 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8ef5916b24da
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = nsscache
+ pkgdesc = Asynchronously synchronise local NSS databases with remote directory services
+ pkgver = 0.37
+ pkgrel = 1
+ url = https://github.com/google/nsscache
+ arch = x86_64
+ license = GPL
+ depends = python2
+ depends = python2-pycurl
+ depends = python2-ldap
+ optdepends = python2-boto3
+ source = https://github.com/google/nsscache/archive/version/0.37.tar.gz
+ source = nsscache-fix-config-path.patch
+ sha256sums = fab735cabb6ea6e46ce2c52e2c9ea9c2938057fa9e3992b3509f31cf5948fff4
+ sha256sums = 1212644452638f75fc6a3ea16c7eb8209d93ba608c9dc34e898fafd3df0630a9
+
+pkgname = nsscache
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..da1075e460e3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+# Maintainer: John Downey <jdowney@gmail.com>
+pkgname=nsscache
+pkgver=0.37
+pkgrel=1
+epoch=
+pkgdesc="Asynchronously synchronise local NSS databases with remote directory services"
+arch=("x86_64")
+url="https://github.com/google/nsscache"
+license=("GPL")
+groups=()
+depends=("python2" "python2-pycurl" "python2-ldap")
+makedepends=()
+checkdepends=()
+optdepends=("python2-boto3")
+provides=()
+conflicts=()
+replaces=()
+backup=()
+options=()
+install=
+changelog=
+source=("https://github.com/google/nsscache/archive/version/0.37.tar.gz" "nsscache-fix-config-path.patch")
+noextract=()
+sha256sums=("fab735cabb6ea6e46ce2c52e2c9ea9c2938057fa9e3992b3509f31cf5948fff4" "1212644452638f75fc6a3ea16c7eb8209d93ba608c9dc34e898fafd3df0630a9")
+validpgpkeys=()
+
+prepare() {
+ patch -Np1 -i "${srcdir}/nsscache-fix-config-path.patch"
+}
+
+build() {
+ cd "$pkgname-version-$pkgver"
+ python2 setup.py build
+}
+
+package() {
+ cd "$pkgname-version-$pkgver"
+ python2 setup.py install --root="$pkgdir/" --optimize=1 --skip-build
+}
diff --git a/nsscache-fix-config-path.patch b/nsscache-fix-config-path.patch
new file mode 100644
index 000000000000..892f738cddb4
--- /dev/null
+++ b/nsscache-fix-config-path.patch
@@ -0,0 +1,13 @@
+diff -ura nsscache.orig/nsscache-version-0.37/nss_cache/caches/files.py nsscache.new/nsscache-version-0.37/nss_cache/caches/files.py
+--- nsscache.orig/nsscache-version-0.37/nss_cache/caches/files.py 2018-10-31 13:27:27.000000000 -0500
++++ nsscache.new/nsscache-version-0.37/nss_cache/caches/files.py 2019-01-18 19:55:57.707376798 -0600
+@@ -52,8 +52,7 @@
+ i = i[14:]
+ parser.read(i)
+ else:
+- # Config in nsscache folder
+- parser.read('nsscache.conf')
++ parser.read('/etc/nsscache.conf')
+ prefix = parser.get('suffix', 'prefix')
+ suffix = parser.get('suffix', 'suffix')
+