summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAdrian Perez de Castro2019-07-20 17:15:10 +0300
committerAdrian Perez de Castro2019-07-20 17:15:10 +0300
commit96e0f6f9358fddeb508a106dc566ac1069226448 (patch)
tree0a497275d10ad85fe9430e6a5a4c907688bd81b3 /PKGBUILD
downloadaur-s3blkdev.tar.gz
Initial import
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD34
1 files changed, 34 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..08706d0db44
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: Adrian Perez de Castro <aperez@igalia.com>
+pkgname=s3blkdev
+pkgdesc='Exposes S3 storage buckets as NBD devices'
+pkgver=0.10
+pkgrel=1
+url='https://ogris.de/s3blkdev/'
+license=(custom:BSD)
+arch=(x86_64)
+depends=(gnutls snappy systemd nbd)
+optdepends=('nodejs: for the s3blkdev.js Web interface')
+source=("${url}/${pkgname}-${pkgver}.tar.bz2")
+sha512sums=('441d20e08ada38bc8d51b8373cc9c8145286d0e1950e53f073a1977520663027620244b9a7e86e7ccbae5752b6221304f2a86ab167071323d4bafc41372aacb4')
+
+prepare () {
+ cd "${pkgname}-${pkgver}"
+ sed -e 's,/usr/local/etc,/etc,' \
+ -e 's,/usr/local/sbin,/usr/bin,' \
+ -e 's,/tmp/s3blkdevd.sock,/run/s3blkdevd.socket,' \
+ -i scripts/*.service s3blkdev.conf.dist s3blkdev.h
+}
+
+build () {
+ make -C "${pkgname}-${pkgver}" \
+ CFLAGS="${CFLAGS} -DUSE_SYSTEMD" \
+ LDFLAGS="${LDFLAGS}"
+}
+
+package () {
+ cd "${pkgname}-${pkgver}"
+ install -Dm755 -t "${pkgdir}/usr/bin" s3blkdevd s3blkdev-sync s3blkdev.js
+ install -Dm644 -t "${pkgdir}/usr/lib/systemd/system" scripts/*.service
+ install -Dm644 -t "${pkgdir}/etc" s3blkdev.conf.dist
+ install -Dm644 LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}