9bf8211fe54933a9251cba0b1f847cffccb922fa
[gentoo.git] / app-backup / snapper / snapper-0.2.3-r1.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 inherit eutils
8
9 DESCRIPTION="Command-line program for btrfs and ext4 snapshot management"
10 HOMEPAGE="http://snapper.io/"
11 SRC_URI="ftp://ftp.suse.com/pub/projects/snapper/${P}.tar.bz2"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="+btrfs ext4 lvm pam xattr"
17
18 RDEPEND="dev-libs/boost[threads]
19         dev-libs/libxml2
20         dev-libs/icu:=
21         sys-apps/acl
22         sys-apps/dbus
23         sys-apps/util-linux
24         sys-libs/zlib
25         virtual/libintl
26         btrfs? ( <sys-fs/btrfs-progs-3.16 )
27         ext4? ( sys-fs/e2fsprogs )
28         lvm? ( sys-fs/lvm2 )
29         pam? ( sys-libs/pam )
30         xattr? ( sys-apps/attr )"
31
32 DEPEND="${RDEPEND}
33         sys-devel/gettext
34         virtual/pkgconfig"
35
36 DOCS=( AUTHORS README )
37
38 src_prepare() {
39         epatch "${FILESDIR}"/cron-confd.patch
40 }
41
42 src_configure() {
43         local myeconfargs=(
44                 --with-conf="/etc/conf.d"
45                 --docdir="/usr/share/doc/${PF}"
46                 --disable-zypp
47                 $(use_enable btrfs)
48                 $(use_enable ext4)
49                 $(use_enable lvm)
50                 $(use_enable pam)
51                 $(use_enable xattr xattrs)
52         )
53
54         econf "${myeconfargs[@]}"
55 }
56
57 src_install() {
58         default
59         # Existing configuration file required to function
60         newconfd data/sysconfig.snapper snapper
61         prune_libtool_files
62 }
63
64 pkg_postinst() {
65         elog "In order to use Snapper, you need to set up"
66         elog "at least one config first. To do this, run:"
67         elog "snapper create-config <subvolume>"
68         elog "For more information, see man (8) snapper or"
69         elog "http://snapper.io/documentation.html"
70 }