1 # Copyright 1999-2019 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit autotools eutils linux-info
8 DESCRIPTION="Live sync tool based on inotify, written in GNU C"
9 HOMEPAGE="https://github.com/xaionaro/clsync http://ut.mephi.ru/oss/clsync"
10 SRC_URI="https://github.com/xaionaro/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
14 IUSE="+caps cluster control-socket cgroups debug extra-debug
15 extra-hardened gio hardened +highload-locks +inotify mhash
20 extra-debug? ( debug )
21 extra-hardened? ( hardened )
27 cgroups? ( dev-libs/libcgroup )
28 mhash? ( app-crypt/mhash )
34 ~app-doc/clsync-docs-${PV}
38 use namespaces && CONFIG_CHECK="~NAMESPACES ~UTS_NS ~IPC_NS ~USER_NS ~PID_NS ~NET_NS"
39 use seccomp && CONFIG_CHECK+=" ~SECCOMP"
50 use hardened && harden_level=1
51 use extra-hardened && harden_level=2
54 use debug && debug_level=1
55 use extra-debug && debug_level=2
58 --docdir="${EPREFIX}/usr/share/doc/${PF}" \
59 --disable-socket-library \
61 --enable-debug=${debug_level} \
62 --enable-paranoid=${harden_level} \
65 $(use_enable caps capabilities) \
66 $(use_enable cluster) \
67 $(use_enable control-socket socket) \
68 $(use_enable highload-locks) \
69 $(use_enable namespaces unshare) \
70 $(use_enable seccomp) \
71 $(use_with cgroups libcgroup) \
72 $(use_with gio gio lib) \
73 $(use_with inotify inotify native) \
78 emake DESTDIR="${D}" install
80 # docs go into clsync-docs
81 rm -rf "${ED}/usr/share/doc" || die
83 newinitd "${FILESDIR}/${PN}.initd" "${PN}"
84 newconfd "${FILESDIR}/${PN}.confd" "${PN}"
86 # filter rules and sync scripts are supposed to be here
88 newins "${FILESDIR}/${PN}.conf" "${PN}.conf"
93 einfo "${PN} is just a convenient way to run synchronization tools on live data,"
94 einfo "it doesn't copy data itself, so you need to install software to do actual"
95 einfo "data transfer. Usually net-misc/rsync is a good choise, but ${PN} is"
96 einfo "is flexible enough to use any user tool, see manual page for details."
98 einfo "${PN} init script can be multiplexed, to use symlink init script to"
99 einfo "othername and use conf.d/othername to configure it."
101 einfo "If you're interested in improved security, enable"
102 einfo "USE=\"caps cgroups hardened namespaces seccomp\""