summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfizen2021-08-14 20:55:05 -0700
committerWolfizen2021-08-14 20:55:05 -0700
commita8e22f4b52ae03bf77f9ebe8d1f1916aa78743f8 (patch)
tree6ce3fdf9f6476cdde4dbc63ab72502fcb2ddfd1b
downloadaur-a8e22f4b52ae03bf77f9ebe8d1f1916aa78743f8.tar.gz
Initial commit for DDNSWolf git package
-rw-r--r--.SRCINFO21
-rw-r--r--PKGBUILD59
2 files changed, 80 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..352a791078ef
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = ddnswolf-git
+ pkgdesc = Dynamic DNS updater
+ pkgver = 3
+ pkgrel = 1
+ url = https://github.com/Wolfizen/DDNSWolf
+ arch = any
+ license = GPL3
+ makedepends = git
+ makedepends = python-gitpython
+ makedepends = python-setuptools
+ depends = python>=3.9
+ depends = python-cloudflare
+ depends = python-dnspython-git>=v2.0
+ depends = python-netifaces
+ depends = python-pyhocon
+ depends = python-requests
+ backup = etc/ddnswolf.conf
+ source = git://github.com/Wolfizen/DDNSWolf.git
+ sha256sums = SKIP
+
+pkgname = ddnswolf-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..5bf0e1af9d80
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,59 @@
+# Maintainer: Winona Schroeer-Smith (Wolfizen) <wolfizen@wolfizen.net>
+
+pkgname='ddnswolf-git'
+pkgver=3
+pkgrel=1
+pkgdesc='Dynamic DNS updater'
+arch=('any')
+url='https://github.com/Wolfizen/DDNSWolf'
+license=('GPL3')
+depends=(
+ 'python>=3.9'
+ 'python-cloudflare'
+ # community/python-dnspython is locked to 1.16. ddnswolf needs 2.0
+ 'python-dnspython-git>=v2.0'
+ 'python-netifaces'
+ 'python-pyhocon'
+ 'python-requests'
+)
+makedepends=(
+ 'git'
+ 'python-gitpython'
+ 'python-setuptools'
+)
+source=(
+ # Use local source if present. LOCAL_SOURCE is a directory path to
+ # a (potentially modified) checkout of the DDNSWolf repo.
+ $([ ! -z "${LOCAL_SOURCE}" ] \
+ && echo "DDNSWolf::git+file://${LOCAL_SOURCE}" \
+ || echo 'git://github.com/Wolfizen/DDNSWolf.git')
+)
+sha256sums=(
+ 'SKIP'
+)
+backup=('etc/ddnswolf.conf')
+
+prepare() {
+ # This copy needs to be done a second time because makepkg will do
+ # a "clone" of the local repo, but changes in the working directory
+ # also need to be copied.
+ if [ ! -z "${LOCAL_SOURCE}" ]; then
+ echo "LOCAL_SOURCE present. Copying working directory from '${LOCAL_SOURCE}'"
+ cp -r "${LOCAL_SOURCE}/." "${srcdir}/DDNSWolf"
+ fi
+}
+
+pkgver() {
+ cd "${srcdir}/DDNSWolf"
+ python 'ddnswolf/version.py' | sed 's/-/_/g'
+}
+
+build() {
+ cd "${srcdir}/DDNSWolf"
+ python 'setup.py' build
+}
+
+package() {
+ cd "${srcdir}/DDNSWolf"
+ python 'setup.py' install --skip-build --optimize=1 --root="${pkgdir}" --prefix='usr/'
+}