summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle McNally2016-03-29 13:22:43 -0400
committerKyle McNally2016-03-29 13:22:43 -0400
commitb15a62aa55a5fdf147864b2c1e8951ea25759f71 (patch)
treee0dda9194854298435286e9b603e425920868c25
downloadaur-b15a62aa55a5fdf147864b2c1e8951ea25759f71.tar.gz
Add to AUR4 and upstream update
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD88
-rw-r--r--greyhole.install16
-rw-r--r--greyhole.service14
4 files changed, 140 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..737b3673cf4d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = greyhole
+ pkgdesc = Application that uses Samba to create a storage pool of all your available hard drives and allows you to create redundant copies of the files you store, in order to prevent data loss when part of your hardware fails.
+ pkgver = 0.9.65
+ pkgrel = 1
+ url = https://www.greyhole.net/
+ install = greyhole.install
+ arch = x86_64
+ license = GPL3
+ depends = php-intl>=5
+ depends = samba>3.4.3
+ depends = mysql
+ depends = rsync
+ depends = lsof
+ depends = sysstat
+ backup = etc/greyhole.conf
+ source = https://greyhole.net/releases/greyhole-0.9.65.tar.gz
+ source = greyhole.service
+ md5sums = fb227f9849e705ed9dbd2ce8407a2859
+ md5sums = 667531c2298d018f8487bfbb58f0a94d
+
+pkgname = greyhole
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..802e1ab02eb1
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,88 @@
+# Maintainer: Kyle McNally <kyle@kmcnally.net>
+# Contributor: Robert Holak <rholak@gmail.com>
+# Contributor: Christopher Krooß <didi2002@web.de>
+
+pkgname=greyhole
+pkgver=0.9.65
+pkgrel=1
+pkgdesc="Application that uses Samba to create a storage pool of all your available hard drives and allows you to create redundant copies of the files you store, in order to prevent data loss when part of your hardware fails."
+arch=('x86_64')
+url="https://www.greyhole.net/"
+license=('GPL3')
+depends=('php-intl>=5' 'samba>3.4.3' 'mysql' 'rsync' 'lsof' 'sysstat')
+backup=('etc/greyhole.conf')
+install='greyhole.install'
+source=("https://greyhole.net/releases/$pkgname-$pkgver.tar.gz"
+ "greyhole.service")
+md5sums=('fb227f9849e705ed9dbd2ce8407a2859'
+ '667531c2298d018f8487bfbb58f0a94d')
+
+package() {
+ cd "$pkgname-$pkgver"
+
+ mkdir -p "$pkgdir/var/spool/greyhole"
+ chmod 777 "$pkgdir/var/spool/greyhole"
+ mkdir -p "$pkgdir/usr/share/greyhole"
+ install -m 0755 -D -p greyhole "$pkgdir/usr/bin/greyhole"
+ install -m 0755 -D -p greyhole-dfree "$pkgdir/usr/bin/greyhole-dfree"
+ install -m 0755 -D -p greyhole-dfree.php "$pkgdir/usr/share/greyhole"
+ install -m 0644 -D -p logrotate.greyhole "$pkgdir/etc/logrotate.d/greyhole"
+ install -m 0644 -D -p greyhole.cron.d "$pkgdir/etc/cron.d/greyhole"
+ install -m 0644 -D -p greyhole.example.conf "$pkgdir/etc/greyhole.conf"
+ install -m 0755 -D -p greyhole.cron.weekly "$pkgdir/etc/cron.weekly/greyhole"
+ install -m 0755 -D -p greyhole.cron.daily "$pkgdir/etc/cron.daily/greyhole"
+ install -m 0644 -D -p docs/greyhole.1.gz "$pkgdir/usr/share/man/man1/greyhole.1.gz"
+ install -m 0644 -D -p docs/greyhole-dfree.1.gz "$pkgdir/usr/share/man/man1/greyhole-dfree.1.gz"
+ install -m 0644 -D -p docs/greyhole.conf.5.gz "$pkgdir/usr/share/man/man5/greyhole.conf.5.gz"
+ install -m 0644 -D -p USAGE "$pkgdir/usr/share/greyhole/USAGE"
+ install -m 0644 -D -p schema-mysql.sql "$pkgdir/usr/share/greyhole/schema-mysql.sql"
+
+ install -m 0644 -D -p "$srcdir/greyhole.service" "$pkgdir/usr/lib/systemd/system/greyhole.service"
+
+ _vfs_file=greyhole-x86_64.so
+
+ _smb_ver="`smbd --version | awk '{print $2}' | awk -F'-' '{print $1}' | awk -F'.' '{print $1$2}'`"
+
+ mkdir -p "$pkgdir/usr/lib/greyhole"
+ mkdir -p "$pkgdir/usr/lib/samba/vfs"
+
+ case $_smb_ver in
+ 34 )
+ install -m 644 "samba-module/bin/3.4/$_vfs_file" "$pkgdir/usr/lib/greyhole/greyhole-samba34.so"
+ ln -s "/usr/lib/greyhole/greyhole-samba34.so" "$pkgdir/usr/lib/samba/vfs/greyhole.so"
+ ;;
+ 35 )
+ install -m 644 "samba-module/bin/3.5/$_vfs_file" $pkgdir/usr/lib/greyhole/greyhole-samba35.so"
+ ln -s "/usr/lib/greyhole/greyhole-samba35.so" $pkgdir/usr/lib/samba/vfs/greyhole.so"
+ ;;
+ 36 )
+ install -m 644 "samba-module/bin/3.6/$_vfs_file" $pkgdir/usr/lib/greyhole/greyhole-samba36.so"
+ ln -s "/usr/lib/greyhole/greyhole-samba36.so" $pkgdir/usr/lib/samba/vfs/greyhole.so"
+ ;;
+ 40 )
+ install -m 644 "samba-module/bin/4.0/$_vfs_file" $pkgdir/usr/lib/greyhole/greyhole-samba40.so"
+ ln -s "/usr/lib/greyhole/greyhole-samba40.so" $pkgdir/usr/lib/samba/vfs/greyhole.so"
+ ;;
+ 41 )
+ install -m 644 "samba-module/bin/4.1/$_vfs_file" $pkgdir/usr/lib/greyhole/greyhole-samba41.so"
+ ln -s "/usr/lib/greyhole/greyhole-samba41.so" $pkgdir/usr/lib/samba/vfs/greyhole.so"
+ ;;
+ 42 )
+ install -m 644 "samba-module/bin/4.2/$_vfs_file" $pkgdir/usr/lib/greyhole/greyhole-samba42.so"
+ ln -s "/usr/lib/greyhole/greyhole-samba42.so" $pkgdir/usr/lib/samba/vfs/greyhole.so"
+ ;;
+ 43 )
+ install -m 644 "samba-module/bin/4.3/$_vfs_file" $pkgdir/usr/lib/greyhole/greyhole-samba43.so"
+ ln -s "/usr/lib/greyhole/greyhole-samba43.so" $pkgdir/usr/lib/samba/vfs/greyhole.so"
+ ;;
+ 44 )
+ install -m 644 "samba-module/bin/4.4/$_vfs_file" "$pkgdir/usr/lib/greyhole/greyhole-samba44.so"
+ ln -s "/usr/lib/greyhole/greyhole-samba44.so" "$pkgdir/usr/lib/samba/vfs/greyhole.so"
+ ;;
+ * )
+ echo "Incompatible Samba version: Please see https://github.com/gboudreau/Greyhole/blob/master/INSTALL for manual build directions"
+ echo " You can still install this package, but it will not work until you add a greyhole-samba##.so file to /usr/lib/greyhole/"
+ ;;
+ esac
+
+}
diff --git a/greyhole.install b/greyhole.install
new file mode 100644
index 000000000000..5a97935482ff
--- /dev/null
+++ b/greyhole.install
@@ -0,0 +1,16 @@
+post_install() {
+ systemctl restart smbd nmbd
+
+ echo "Manual Steps:"
+ echo "- Edit /etc/samba/smb.conf and make sure the following two options are set:"
+ echo " unix extensions = no"
+ echo " wide links = yes"
+ echo "- Create a \"greyhole\" database and import /usr/share/greyhole/schema-mysql.sql"
+ echo "- Read /usr/share/greyhole/USAGE and the documents at "
+ echo " https://github.com/gboudreau/Greyhole/wiki to configure your installation"
+ echo " Also see: https://wiki.archlinux.org/index.php/Greyhole#Configuration"
+}
+
+post_upgrade() {
+ systemctl restart smbd nmbd
+}
diff --git a/greyhole.service b/greyhole.service
new file mode 100644
index 000000000000..9478b9a85874
--- /dev/null
+++ b/greyhole.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Greyhole
+Requires=mysqld.service
+After=syslog.target network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/greyhole -D
+ExecReload=/usr/bin/kill -HUP $MAINPID
+Restart=always
+RestartSec=5
+
+[Install]
+WantedBy=multi-user.target