diff options
author | Thomas Kuther | 2015-07-30 18:56:54 +0200 |
---|---|---|
committer | Thomas Kuther | 2015-07-30 18:56:54 +0200 |
commit | 7e05c0c38665d039dd6625cd7299d7b5a5f12fd8 (patch) | |
tree | 002b6e2dcc70c9f7f54738e57c66d54a98669613 | |
download | aur-7e05c0c38665d039dd6625cd7299d7b5a5f12fd8.tar.gz |
commit to aur4
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 83 | ||||
-rw-r--r-- | snapper.install | 15 |
4 files changed, 128 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..41110c1b8af2 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,26 @@ +pkgbase = snapper-git + pkgdesc = A tool for managing BTRFS and LVM snapshots. It can create, diff and restore snapshots and provides timelined auto-snapping. + pkgver = 0.2.7.git.1070.29b76bb + pkgrel = 1 + url = http://snapper.io + install = snapper.install + arch = i686 + arch = x86_64 + license = GPL2 + makedepends = lvm2 + makedepends = libxslt + makedepends = docbook-xsl + makedepends = git + depends = btrfs-progs + depends = libxml2 + depends = dbus + depends = boost + depends = pam + provides = snapper + conflicts = snapper + backup = etc/conf.d/snapper + source = snapper::git+https://github.com/openSUSE/snapper.git + md5sums = SKIP + +pkgname = snapper-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..c3fde878f4b5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +pkg/ +src/ +snapper/ +*.xz diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..a8fc682b2c02 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,83 @@ +# Maintainer: Tom Kuther <archlinux@kuther.net> + +pkgname=snapper-git +_gitname=snapper +pkgver=0.2.7.git.1070.29b76bb +pkgrel=1 +pkgdesc="A tool for managing BTRFS and LVM snapshots. It can create, diff and restore snapshots and provides timelined auto-snapping." +provides=('snapper') +conflicts=('snapper') +arch=('i686' 'x86_64') +url="http://snapper.io" +license=('GPL2') +depends=('btrfs-progs' 'libxml2' 'dbus' 'boost' 'pam') +makedepends=('lvm2' 'libxslt' 'docbook-xsl' 'git') +install=snapper.install +backup=('etc/conf.d/snapper') +source=('snapper::git+https://github.com/openSUSE/snapper.git') +md5sums=('SKIP') + +pkgver() { + cd "$_gitname" + echo $(cat VERSION).git.$(git rev-list --count HEAD).$(git rev-parse --short master) +} + +prepare() { + cd "$_gitname" + + ## Build fixes + # boost fixlets - Arch doesn't use -mt suffix + sed -e 's@lboost_thread-mt@lboost_thread@g' \ + -e 's@lboost_system-mt@lboost_system@g' \ + -i snapper/Makefile.am + + ## Location/naming fixes + # fix pam plugin install location + sed -i -e 's@shell echo /@shell echo /usr/@g' pam/Makefile.am + # all in /usr/bin + sed -i -e 's@/usr/sbin@/usr/bin@g' data/org.opensuse.Snapper.service + # NTP drift file location + sed -i -e 's@/var/lib/ntp/drift/ntp.drift@/var/lib/ntp/ntp.drift@' \ + data/base.txt + # man pages sysconfig location + sed -i -e 's@/etc/sysconfig@/etc/conf.d@g' doc/* + + # systemd timer stuff (>= systemd-212) + sed ':a;N;$!ba;s/\[Timer\]\nOnCalendar=hourly\n\n/\[Timer\]\nOnCalendar=hourly\nPersistent=true\n\n/g' \ + -i data/timeline.timer + sed '/cron./d' -i scripts/Makefile.am + sed -e 's@noinst_PROGRAMS@libexec_PROGRAMS@g' -i client/Makefile.am +} + +build() { + cd "$_gitname" + + aclocal + libtoolize --force --automake --copy + autoheader + automake --add-missing --copy + autoconf + ./configure --prefix=/usr \ + --sbindir=/usr/bin \ + --libexecdir=/usr/lib/snapper \ + --with-conf=/etc/conf.d \ + --disable-zypp \ + --disable-silent-rules \ + --disable-ext4 \ + --enable-xattrs + make +} + +package() { + cd "$_gitname" + make DESTDIR="${pkgdir}" install + install -Dm644 data/sysconfig.snapper "${pkgdir}"/etc/conf.d/snapper + + # systemd timer units + install -Dm644 data/cleanup.service "${pkgdir}"/usr/lib/systemd/system/snapper-cleanup.service + install -Dm644 data/cleanup.timer "${pkgdir}"/usr/lib/systemd/system/snapper-cleanup.timer + install -Dm644 data/timeline.service "${pkgdir}"/usr/lib/systemd/system/snapper-timeline.service + install -Dm644 data/timeline.timer "${pkgdir}"/usr/lib/systemd/system/snapper-timeline.timer +} + +# vim:set ts=2 sw=2 et: diff --git a/snapper.install b/snapper.install new file mode 100644 index 000000000000..53579cb4093b --- /dev/null +++ b/snapper.install @@ -0,0 +1,15 @@ +post_install() { + echo "For first-time config instructions see https://wiki.archlinux.org/index.php/Snapper" +} + +post_upgrade() { + echo + echo "BIG FAT WARNING: the snapper-git package now uses systemd .timer units instead of cron scripts!" + echo "If you use timelined snapshots, you need to manually enable and start the timer units with:" + echo + echo "# systemctl enable snapper-cleanup.timer" + echo "# systemctl enable snapper-timeline.timer" + echo "# systemctl start snapper-cleanup.timer" + echo "# systemctl start snapper-timeline.timer" + echo +} |