dev-qt/qtwidgets: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / app-backup / burp / burp-2.2.18-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit autotools systemd
7
8 DESCRIPTION="Network backup and restore client and server for Unix and Windows"
9 HOMEPAGE="https://burp.grke.org/"
10 SRC_URI="https://github.com/grke/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
11
12 LICENSE="AGPL-3"
13 SLOT="0"
14 KEYWORDS="amd64 ~arm x86"
15 IUSE="acl ipv6 libressl test xattr"
16
17 RESTRICT="!test? ( test )"
18
19 CDEPEND=" acct-group/burp
20         acct-user/burp
21         dev-libs/uthash
22         net-libs/librsync
23         sys-libs/ncurses:0=
24         sys-libs/zlib
25         !libressl? ( dev-libs/openssl:0= )
26         libressl? ( dev-libs/libressl:0= )
27         acl? ( sys-apps/acl )
28         xattr? ( sys-apps/attr )"
29 DEPEND="${CDEPEND}
30         virtual/pkgconfig
31         test? ( dev-libs/check )"
32 RDEPEND="${CDEPEND}
33         virtual/logger"
34
35 PATCHES=(
36         "${FILESDIR}"/${PN}-2.1.20-no_mkdir_run.patch
37         "${FILESDIR}"/${PN}-2.1.20-protocol1_by_default.patch
38         "${FILESDIR}"/${PN}-2.0.54-server_user.patch
39 )
40
41 src_prepare() {
42         default
43
44         eautoreconf
45 }
46
47 src_configure() {
48         local myeconfargs=(
49                 --localstatedir=/var
50                 --sysconfdir=/etc/burp
51                 --enable-largefile
52                 $(use_enable acl)
53                 $(use_enable ipv6)
54                 $(use_enable xattr)
55         )
56         # --runstatedir option will only work from autoconf-2.70 onwards
57         runstatedir='/run' \
58                 econf "${myeconfargs[@]}"
59 }
60
61 src_install() {
62         default
63         keepdir /var/spool/burp
64         fowners -R root:${PN} /var/spool/burp
65         fperms 0770 /var/spool/burp
66
67         emake DESTDIR="${D}" install-configs
68         fowners -R root:${PN} /etc/burp
69         fperms 0750 /etc/burp
70         fperms 0640 /etc/burp/burp-server.conf
71         fperms 0750 /etc/burp/clientconfdir
72
73         newinitd "${FILESDIR}"/${PN}.initd ${PN}
74         systemd_dounit "${FILESDIR}"/${PN}.service
75 }
76
77 pkg_postinst() {
78         elog "Burp ebuilds now support the autoupgrade mechanism in both"
79         elog "client and server mode. In both cases it is disabled by"
80         elog "default. You almost certainly do NOT want to enable it in"
81         elog "client mode because upgrades obtained this way will not be"
82         elog "managed by Portage."
83
84         if [[ ! -e /etc/burp/CA/index.txt ]]; then
85                 elog ""
86                 elog "At first run burp server will generate DH parameters and SSL"
87                 elog "certificates.  You should adjust configuration before."
88                 elog "Server configuration is located at"
89                 elog ""
90                 elog "  /etc/burp/burp-server.conf"
91                 elog ""
92         fi
93
94         # According to PMS this can be a space-separated list of version
95         # numbers, even though in practice it is typically just one.
96         local oldver
97         for oldver in ${REPLACING_VERSIONS}; do
98                 if [[ $(ver_cut 1 ${oldver}) -lt 2 ]]; then
99                         ewarn "Starting with version 2.0.54 we no longer patch bedup to use"
100                         ewarn "the server config file by default. If you use bedup, please"
101                         ewarn "update your scripts to invoke it as"
102                         ewarn ""
103                         ewarn "  bedup -c /etc/burp/burp-server.conf"
104                         ewarn ""
105                         ewarn "Otherwise deduplication will not work!"
106                         break
107                 fi
108         done
109 }