summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudia2018-02-12 07:53:58 +0100
committerClaudia Pellegrino2018-02-12 08:02:40 +0100
commit5dbba5b4677959a916b9d47a2e15ead93f062624 (patch)
tree67f9f3d4de9b6bca1a864ff21996fdb8978b8f5b
downloadaur-5dbba5b4677959a916b9d47a2e15ead93f062624.tar.gz
Initial commit
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD60
2 files changed, 79 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..47003071ef6
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = znapzupport
+ pkgdesc = Collection of CLI helpers for ZnapZend
+ pkgver = 0.0.3
+ pkgrel = 1
+ url = https://github.com/claui/znapzupport
+ arch = any
+ license = custom:ISC
+ depends = bash
+ depends = coreutils
+ depends = sudo
+ depends = zfs
+ optdepends = znapzend
+ noextract = znapzupport-0.0.3.tar.gz
+ options = !strip
+ source = znapzupport-0.0.3.tar.gz::https://github.com/claui/znapzupport/archive/v0.0.3.tar.gz
+ sha512sums = 4ddd3681fb22cb760f10ad6ed492e784d73729f31e82441a8339d8a55cbdd960306f3c0fb5391b380380dece4816a448e7c103c48ac48a0f79c49b26f9b85e0c
+
+pkgname = znapzupport
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..2ca69589662
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,60 @@
+# Maintainer: Claudia Pellegrino <aur ├Ąt cpellegrino.de>
+# Contributor:
+
+pkgname=znapzupport
+pkgver=0.0.3
+pkgrel=1
+pkgdesc='Collection of CLI helpers for ZnapZend'
+arch=('any')
+url='https://github.com/claui/znapzupport'
+license=('custom:ISC')
+depends=('bash' 'coreutils' 'sudo' 'zfs')
+optdepends=('znapzend')
+options=('!strip')
+
+source=(
+ "${pkgname}-${pkgver}.tar.gz::https://github.com/claui/znapzupport/archive/v${pkgver}.tar.gz"
+)
+
+sha512sums=(
+ '4ddd3681fb22cb760f10ad6ed492e784d73729f31e82441a8339d8a55cbdd960306f3c0fb5391b380380dece4816a448e7c103c48ac48a0f79c49b26f9b85e0c'
+)
+
+noextract=("${pkgname}-${pkgver}.tar.gz")
+
+prepare() {
+ mkdir -p "${srcdir}/${pkgname}-${pkgver}"
+ tar -x \
+ -f "${srcdir}/${pkgname}-${pkgver}.tar.gz" -z \
+ -C "${srcdir}/${pkgname}-${pkgver}" \
+ --strip-components=1
+}
+
+
+build() {
+ # Prepare binstub
+ mkdir -p "${srcdir}"
+ printf '#!/bin/bash\n%s\n' > "${srcdir}/binstub" \
+ 'exec "/usr/lib/'"${pkgname}"'/bin/$(basename "${0}")" "$@"'
+}
+
+package() {
+ msg2 'Installing the license'
+ install -D -m 644 -t "${pkgdir}/usr/share/licenses/${pkgname}" \
+ "${srcdir}/${pkgname}-${pkgver}/LICENSE.md"
+
+ msg2 'Installing package files'
+ mkdir -p "${pkgdir}/usr/lib/${pkgname}"
+ cp -r --preserve=mode -t "${pkgdir}/usr/lib/${pkgname}" \
+ "${srcdir}/${pkgname}-${pkgver}/"{bin,libexec}
+
+ msg2 'Installing binstubs'
+ find "${srcdir}/${pkgname}-${pkgver}/bin" \
+ -mindepth 1 \
+ -exec bash -c "install -D -m 755 -T \"${srcdir}\"/binstub`
+ ` \"${pkgdir}\"/usr/bin/\$(basename '{}')" ';'
+
+ msg2 'Installing documentation'
+ install -D -m 644 -t "${pkgdir}/usr/share/doc/${pkgname}" \
+ "${srcdir}/${pkgname}-${pkgver}/README.md"
+}