Gentoo Archives: gentoo-commits

From: Alexey Shvetsov <alexxy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/alexxy:master commit in: sys-fs/snapper/
Date: Tue, 05 Mar 2013 09:49:57
Message-Id: 1362476979.44f4c7dcb2b890994b977f329e7e93392e8841de.alexxy@gentoo
1 commit: 44f4c7dcb2b890994b977f329e7e93392e8841de
2 Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
3 AuthorDate: Tue Mar 5 09:49:39 2013 +0000
4 Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
5 CommitDate: Tue Mar 5 09:49:39 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=dev/alexxy.git;a=commit;h=44f4c7dc
7
8 Add snapper
9
10 Package-Manager: portage-2.2.0_alpha166
11
12 ---
13 sys-fs/snapper/metadata.xml | 18 ++++++++++++
14 sys-fs/snapper/snapper-9999.ebuild | 52 ++++++++++++++++++++++++++++++++++++
15 2 files changed, 70 insertions(+), 0 deletions(-)
16
17 diff --git a/sys-fs/snapper/metadata.xml b/sys-fs/snapper/metadata.xml
18 new file mode 100644
19 index 0000000..78a6170
20 --- /dev/null
21 +++ b/sys-fs/snapper/metadata.xml
22 @@ -0,0 +1,18 @@
23 +<?xml version='1.0' encoding='UTF-8'?>
24 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
25 +<pkgmetadata>
26 + <longdescription>
27 + Snapper is a command-line program for filesystem snapshot management.
28 + It can create, delete and compare snapshots and undo changes done
29 + between snapshots. It supports both btrfs and ext4.
30 + </longdescription>
31 + <upstream>
32 + <maintainer status="active">
33 + <email>aschnell@××××.de</email>
34 + <name>Arvin Schnell</name>
35 + </maintainer>
36 + <changelog>https://raw.github.com/openSUSE/snapper/master/package/snapper.changes</changelog>
37 + <bugs-to>https://bugzilla.novell.com/</bugs-to>
38 + <remote-id type="github">openSUSE/snapper</remote-id>
39 + </upstream>
40 +</pkgmetadata>
41
42 diff --git a/sys-fs/snapper/snapper-9999.ebuild b/sys-fs/snapper/snapper-9999.ebuild
43 new file mode 100644
44 index 0000000..c1e31b0
45 --- /dev/null
46 +++ b/sys-fs/snapper/snapper-9999.ebuild
47 @@ -0,0 +1,52 @@
48 +# Copyright 1999-2013 Gentoo Foundation
49 +# Distributed under the terms of the GNU General Public License v2
50 +# $Header: $
51 +
52 +EAPI=5
53 +
54 +inherit git-2 autotools
55 +
56 +DESCRIPTION="Command-line program for btrfs and ext4 snapshot management"
57 +HOMEPAGE="http://snapper.io/"
58 +EGIT_REPO_URI="git://github.com/openSUSE/snapper.git"
59 +
60 +LICENSE="GPL-2"
61 +SLOT="0"
62 +
63 +RDEPEND="sys-apps/dbus
64 + virtual/libintl
65 + dev-libs/libxml2
66 + dev-libs/boost
67 + sys-libs/zlib"
68 +DEPEND="${RDEPEND}
69 + sys-devel/autoconf
70 + sys-devel/automake
71 + sys-devel/libtool
72 + sys-devel/gettext
73 + virtual/pkgconfig"
74 +
75 +src_configure() {
76 + # No configure file provided at the moment
77 + eautoreconf --force --install
78 + # No YaST in Gentoo
79 + econf --disable-zypp --with-conf="/etc/conf.d"
80 +}
81 +
82 +src_install() {
83 + emake DESTDIR="${D}" install || die "Install failed"
84 + nonfatal dodoc AUTHORS LIBVERSION VERSION package/snapper.changes
85 + # Exising configuration file required to function
86 + # Not certain if this is needed, now that Snapper is conf.d-aware
87 + mkdir -p "${D}/etc/conf.d"
88 + cp -n "${EGIT_SOURCEDIR}/data/sysconfig.snapper" "${D}/etc/conf.d/snapper" || die
89 +}
90 +
91 +pkg_postinst() {
92 + elog "In order to use Snapper, you need to set up at least one config"
93 + elog "manually, or else the tool will get confused. Typically you should"
94 + elog "create a '/.snapshots' directory, then copy the file"
95 + elog "'/etc/snapper/config-templates/default' into '/etc/snapper/configs/',"
96 + elog "rename the file to 'root', and add its name into '/etc/conf.d/snapper'."
97 + elog "That will instruct Snapper to snapshot the root of the filesystem by"
98 + elog "default. For more information, see the snapper(8) manual page."
99 +}