summaryrefslogtreecommitdiff
path: root/community/snapper
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-11-01 01:14:52 -0700
committerroot <root@rshg054.dnsready.net>2013-11-01 01:14:52 -0700
commit22f873a6e3ac2c585a28a1ab2561eaea9765cdc6 (patch)
tree621d351b79cbea285d91df33b6fa4f041696cf56 /community/snapper
parentb2a6f1b28b7fa31088cab9a90b0f5ab97948534d (diff)
Fri Nov 1 01:13:45 PDT 2013
Diffstat (limited to 'community/snapper')
-rw-r--r--community/snapper/PKGBUILD61
-rw-r--r--community/snapper/libbtrfs.patch13
2 files changed, 74 insertions, 0 deletions
diff --git a/community/snapper/PKGBUILD b/community/snapper/PKGBUILD
new file mode 100644
index 000000000..35f66933d
--- /dev/null
+++ b/community/snapper/PKGBUILD
@@ -0,0 +1,61 @@
+# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
+# Contributor: Tom Kuther <gimpel@sonnenkinder.org>
+
+pkgname=snapper
+pkgver=0.1.7
+pkgrel=1
+pkgdesc="A tool for managing BTRFS and LVM snapshots. It can create, diff and restore snapshots and provides timelined auto-snapping."
+arch=('i686' 'x86_64')
+url="http://snapper.io"
+license=('GPL2')
+depends=('btrfs-progs' 'libxml2' 'dbus' 'boost-libs')
+makedepends=('boost' 'lvm2' 'libxslt' 'docbook-xsl' 'pam' 'git')
+backup=('etc/conf.d/snapper')
+source=("ftp://ftp.suse.com/pub/projects/$pkgname/$pkgname-$pkgver.tar.bz2"
+ 'libbtrfs.patch')
+options=(!libtool)
+
+prepare() {
+ cd "$srcdir/$pkgname-$pkgver"
+ patch -p1 -i "$srcdir"/libbtrfs.patch
+}
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ # rename cron scripts
+ sed -i -e 's@suse.de-@@g' scripts/Makefile.am
+ # fix config location in cron scripts
+ sed -i -e 's@/etc/sysconfig/@/etc/conf.d/@g' scripts/snapper-{daily,hourly}
+
+ # boost fixlets - Arch doesn't use -mt suffix
+ sed -i -e 's@lboost_thread-mt@lboost_thread@g' snapper/Makefile.am
+ sed -i -e 's@lboost_system-mt@lboost_system@g' snapper/Makefile.am
+
+ # fix pam plugin install location
+ sed -i -e 's@shell echo /@shell echo /usr/@g' pam/Makefile.am
+ # Arch all in /usr/bin
+ sed -i -e 's@/usr/sbin@/usr/bin@g' data/org.opensuse.Snapper.service
+
+ aclocal
+ libtoolize --force --automake --copy
+ autoheader
+ automake --add-missing --copy
+ autoconf
+ ./configure --prefix=/usr \
+ --sbindir=/usr/bin \
+ --with-conf=/etc/conf.d \
+ --disable-zypp \
+ --disable-silent-rules
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ make DESTDIR="$pkgdir" install
+ install -Dm644 data/sysconfig.snapper "$pkgdir"/etc/conf.d/snapper
+}
+
+sha256sums=('fcb8d98aa36021970b214a2b6ea85f86aa29e107559bf677226e2e4ade2c6ed0'
+ '0d0289e7448a357c78450f6690d684fef0e889921be152038a73401d37294317')
diff --git a/community/snapper/libbtrfs.patch b/community/snapper/libbtrfs.patch
new file mode 100644
index 000000000..805c36b44
--- /dev/null
+++ b/community/snapper/libbtrfs.patch
@@ -0,0 +1,13 @@
+diff --git a/snapper/Btrfs.cc b/snapper/Btrfs.cc
+index 2c110c3..be9e974 100644
+--- a/snapper/Btrfs.cc
++++ b/snapper/Btrfs.cc
+@@ -982,7 +982,7 @@ namespace snapper
+ {
+ boost::this_thread::interruption_point();
+
+- int r = btrfs_read_and_process_send_stream(fd, &send_ops, &*this);
++ int r = btrfs_read_and_process_send_stream(fd, &send_ops, &*this, 0);
+
+ if (r < 0)
+ {