diff options
author | Andrew Savchenko <bircoph@gentoo.org> | 2020-11-08 17:30:53 +0300 |
---|---|---|
committer | Andrew Savchenko <bircoph@gentoo.org> | 2020-11-08 17:35:40 +0300 |
commit | b1da862281d2c97a9fc1e6a63c377a30eefa4fbd (patch) | |
tree | a5d02c17aa3652d7c028f509b2f25badaa03d008 /app-admin/clsync | |
parent | app-admin/clsync: update live ebuild to reflect upstream changes (diff) | |
download | gentoo-b1da862281d2c97a9fc1e6a63c377a30eefa4fbd.tar.gz gentoo-b1da862281d2c97a9fc1e6a63c377a30eefa4fbd.tar.bz2 gentoo-b1da862281d2c97a9fc1e6a63c377a30eefa4fbd.zip |
app-admin/clsync: version bump
- Update to 0.4.5
- Enable LTO support
- Merge back dev-libs/libclsync and app-doc/clsync-docs into app-admin/clsync
Bug: https://bugs.gentoo.org/749978
Bug: https://bugs.gentoo.org/750356
Closes: https://bugs.gentoo.org/717340
Package-Manager: Portage-3.0.8, Repoman-3.0.1
Signed-off-by: Andrew Savchenko <bircoph@gentoo.org>
Diffstat (limited to 'app-admin/clsync')
-rw-r--r-- | app-admin/clsync/Manifest | 1 | ||||
-rw-r--r-- | app-admin/clsync/clsync-0.4.5.ebuild | 144 |
2 files changed, 145 insertions, 0 deletions
diff --git a/app-admin/clsync/Manifest b/app-admin/clsync/Manifest index 53ae0d386a14..aa1738bbfb77 100644 --- a/app-admin/clsync/Manifest +++ b/app-admin/clsync/Manifest @@ -1 +1,2 @@ DIST clsync-0.4.4.tar.gz 268276 BLAKE2B 0027760cfdee5c4410c4cea45aae2def6498d812d2f50038993c39a33c6029722ec2dd2cfff20815a3ffd8834eb8c439059e5f1d2cc3d2cf98ecb22ed22f2322 SHA512 cdafbf43fdeafe9cb53c08e0514ef356fb5b4bbd8da2226263180e7441d222c76e6c73f847f484b3688a8672e4a85df0346c0236d8d0ed4506d209189af02dcd +DIST clsync-0.4.5.tar.gz 276096 BLAKE2B 4fa534b342a806ca691f8a65455cb800800f7a943fa3f0913a26c37d2cd0f9d762630ad01eeb80bdd0d90a0731bed5f2aa60444a654972da9479c116e0e937aa SHA512 6568f3c49ac4fe11e54593ba23eed392d0b7d9b5bf052983c4a5a2befbb807dbd3f9d13412264f8909998702f869d1cd6db77d89bd9491414b1f3213437c5212 diff --git a/app-admin/clsync/clsync-0.4.5.ebuild b/app-admin/clsync/clsync-0.4.5.ebuild new file mode 100644 index 000000000000..c17448327bb2 --- /dev/null +++ b/app-admin/clsync/clsync-0.4.5.ebuild @@ -0,0 +1,144 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +if [[ ${PV} == "9999" ]] ; then + EGIT_REPO_URI="https://github.com/clsync/clsync.git" + inherit git-r3 + KEYWORDS="" +else + SRC_URI="https://github.com/clsync/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + KEYWORDS="~amd64 ~x86" +fi + +inherit autotools linux-info systemd + +DESCRIPTION="Live sync tool based on inotify, written in GNU C" +HOMEPAGE="https://github.com/clsync/clsync http://ut.mephi.ru/oss/clsync" +LICENSE="GPL-3+" +SLOT="0" +IUSE="apidoc +caps +clsync cluster control-socket cgroups doc debug +examples extra-debug extra-hardened gio +hardened +highload-locks ++inotify +lto mhash namespaces seccomp socket-library static-libs" + +REQUIRED_USE=" + || ( clsync socket-library ) + || ( gio inotify ) + mhash? ( cluster ) + seccomp? ( caps ) +" +BDEPEND=" + virtual/pkgconfig + apidoc? ( app-doc/doxygen[dot] ) +" +DEPEND=" + caps? ( sys-libs/libcap ) + cgroups? ( dev-libs/libcgroup ) + clsync? ( dev-libs/glib:2 ) + mhash? ( app-crypt/mhash ) +" +RDEPEND="${DEPEND} + !app-doc/clsync-docs + !dev-libs/libclsync +" + +pkg_pretend() { + if use clsync; then + use inotify && CONFIG_CHECK+=" ~INOTIFY_USER" + use namespaces && CONFIG_CHECK="~NAMESPACES ~UTS_NS ~IPC_NS ~USER_NS ~PID_NS ~NET_NS" + use seccomp && CONFIG_CHECK+=" ~SECCOMP" + check_extra_config + fi +} + +src_prepare() { + eapply_user + eautoreconf +} + +src_configure() { + local harden_level=0 + use hardened && harden_level=1 + use extra-hardened && harden_level=2 + + local debug_level=0 + use debug && debug_level=1 + use extra-debug && debug_level=2 + + econf \ + --enable-debug=${debug_level} \ + --enable-paranoid=${harden_level} \ + --without-bsm \ + --without-kqueue \ + $(use_enable caps capabilities) \ + $(use_enable clsync) \ + $(use_enable cluster) \ + $(use_enable control-socket socket) \ + $(use_enable highload-locks) \ + $(use_enable lto) \ + $(use_enable namespaces unshare) \ + $(use_enable seccomp) \ + $(use_enable socket-library) \ + $(use_with cgroups libcgroup) \ + $(use_with gio gio lib) \ + $(use_with inotify inotify native) \ + $(use_with mhash) +} + +src_compile() { + default + if use apidoc; then + doxygen .doxygen || die "doxygen failed" + fi +} + +src_install() { + emake DESTDIR="${D}" install + + if use socket-library; then + find "${ED}" -name "*.la" -delete + use static-libs || find "${ED}" -name "*.a" -delete || die "failed to remove static libs" + fi + + if use clsync; then + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + + # filter rules and sync scripts are supposed to be here + insinto /etc/${PN} + newins "${FILESDIR}/${PN}.conf" "${PN}.conf" + keepdir /etc/${PN} + + systemd_dounit "examples/clsync@.service" + fi + + if use doc; then + dodoc -r DEVELOPING NOTES PROTOCOL SHORTHANDS TODO doc/devel/* + else + rm "${ED}/usr/share/doc/${PF}/"{DEVELOPING,LICENSE,PROTOCOL,TODO}* || die + fi + use apidoc && dodoc -r doc/doxygen/html + if ! use examples; then + rm -r "${ED}/usr/share/doc/${PF}/examples" || die + fi +} + +pkg_postinst() { + einfo "${PN} is just a convenient way to run synchronization tools on live data," + einfo "it doesn't copy data itself, so you need to install software to do actual" + einfo "data transfer. Usually net-misc/rsync is a good choise, but ${PN} is" + einfo "is flexible enough to use any user tool, see manual page for details." + einfo + einfo "${PN} init script can be multiplexed, to use symlink init script to" + einfo "othername and use conf.d/othername to configure it." + einfo + einfo "If you're interested in improved security, enable" + einfo "USE=\"caps cgroups extra-hardened namespaces seccomp\"" + + if use socket-library; then + einfo + einfo "clsync instances you are going to use _must_ be compiled" + einfo "with control-socket support" + fi +} |