diff options
-rw-r--r-- | sys-cluster/csync2/ChangeLog | 10 | ||||
-rw-r--r-- | sys-cluster/csync2/csync2-1.34-r2.ebuild | 14 | ||||
-rw-r--r-- | sys-cluster/csync2/csync2-2.0.ebuild | 103 |
3 files changed, 118 insertions, 9 deletions
diff --git a/sys-cluster/csync2/ChangeLog b/sys-cluster/csync2/ChangeLog index b625aa7fda28..d35e32f03443 100644 --- a/sys-cluster/csync2/ChangeLog +++ b/sys-cluster/csync2/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-cluster/csync2 -# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/csync2/ChangeLog,v 1.38 2014/08/10 20:20:29 slyfox Exp $ +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/csync2/ChangeLog,v 1.39 2015/05/12 16:41:49 ultrabug Exp $ + +*csync2-2.0 (12 May 2015) + + 12 May 2015; Ultrabug <ultrabug@gentoo.org> csync2-1.34-r2.ebuild, + +csync2-2.0.ebuild: + EAPI bump, version bump fix #548672 10 Aug 2014; Sergei Trofimovich <slyfox@gentoo.org> csync2-1.34-r2.ebuild: QA: drop trailing '.' from DESCRIPTION diff --git a/sys-cluster/csync2/csync2-1.34-r2.ebuild b/sys-cluster/csync2/csync2-1.34-r2.ebuild index 247045d8c8bd..eda9a231a4d0 100644 --- a/sys-cluster/csync2/csync2-1.34-r2.ebuild +++ b/sys-cluster/csync2/csync2-1.34-r2.ebuild @@ -1,8 +1,8 @@ -# Copyright 1999-2014 Gentoo Foundation +# Copyright 1999-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-cluster/csync2/csync2-1.34-r2.ebuild,v 1.5 2014/08/10 20:20:29 slyfox Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/csync2/csync2-1.34-r2.ebuild,v 1.6 2015/05/12 16:41:49 ultrabug Exp $ -EAPI=2 +EAPI=5 inherit autotools eutils @@ -39,18 +39,18 @@ src_configure() { } src_install() { - emake DESTDIR="${D}" install || die + emake DESTDIR="${D}" install if use xinetd ; then insinto /etc/xinetd.d - newins "${FILESDIR}"/${PN}.xinetd ${PN} || die + newins "${FILESDIR}"/${PN}.xinetd ${PN} fi keepdir /var/lib/csync2 - newinitd "${FILESDIR}"/${PN}.initd ${PN} || die + newinitd "${FILESDIR}"/${PN}.initd ${PN} - dodoc AUTHORS ChangeLog INSTALL NEWS README TODO csync2_locheck.sh || die + dodoc AUTHORS ChangeLog INSTALL NEWS README TODO csync2_locheck.sh } pkg_postinst() { diff --git a/sys-cluster/csync2/csync2-2.0.ebuild b/sys-cluster/csync2/csync2-2.0.ebuild new file mode 100644 index 000000000000..bd4c54f2b73d --- /dev/null +++ b/sys-cluster/csync2/csync2-2.0.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-cluster/csync2/csync2-2.0.ebuild,v 1.1 2015/05/12 16:41:49 ultrabug Exp $ + +EAPI=5 + +inherit eutils + +DESCRIPTION="Cluster synchronization tool" +HOMEPAGE="http://oss.linbit.com/csync2/" +SRC_URI="http://oss.linbit.com/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" + +IUSE="mysql sqlite ssl xinetd" + +RDEPEND=">=net-libs/librsync-0.9.5 + mysql? ( virtual/mysql ) + sqlite? ( >=dev-db/sqlite-3.0 ) + ssl? ( >=net-libs/gnutls-2.7.3 ) + xinetd? ( sys-apps/xinetd )" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +SLOT="0" + +src_configure() { + econf \ + --docdir=/usr/share/doc/${P} \ + --localstatedir=/var \ + --sysconfdir=/etc/csync2 \ + $(use_enable sqlite sqlite3) \ + $(use_enable ssl gnutls) +} + +src_install() { + emake DESTDIR="${D}" install + + if use xinetd ; then + insinto /etc/xinetd.d + newins "${FILESDIR}"/${PN}.xinetd ${PN} + fi + + keepdir /var/lib/csync2 + + newinitd "${FILESDIR}"/${PN}.initd ${PN} +} + +pkg_postinst() { + if use xinetd; then + echo + einfo "After you setup your conf file, edit the xinetd" + einfo "entry in /etc/xinetd.d/${PN} to enable, then" + einfo "start xinetd: /etc/init.d/xinetd start" + fi + echo + einfo "To add ${PN} to your services file" + if use ssl; then + einfo "and to generate the SSL certificates," + fi + einfo "just run this command after you install:" + echo + einfo "emerge --config =${PF}" + echo + einfo "Now you can find csync2.cfg under /etc/${PN}" + einfo "Please move you old config to the right location" + echo + einfo "To start csync2 as a standalone daemon, simply run:" + einfo "/etc/init.d/csync2 start" + echo +} + +pkg_config() { + einfo "Updating ${ROOT}/etc/services" + { grep -v ^${PN} "${ROOT}"/etc/services; + echo "csync2 30865/tcp" + } > "${ROOT}"/etc/services.new + mv -f "${ROOT}"/etc/services.new "${ROOT}"/etc/services + + if use ssl; then + if [ ! -f "${ROOT}"/etc/${PN}/csync2_ssl_key.pem ]; then + einfo "Creating default certificate in ${ROOT}/etc/${PN}" + + openssl genrsa -out "${ROOT}"/etc/${PN}/csync2_ssl_key.pem 1024 &> /dev/null + + yes '' | \ + openssl req -new \ + -key "${ROOT}"/etc/${PN}/csync2_ssl_key.pem \ + -out "${ROOT}"/etc/${PN}/csync2_ssl_cert.csr \ + &> "${ROOT}"/dev/null + + openssl x509 -req -days 600 \ + -in "${ROOT}"/etc/${PN}/csync2_ssl_cert.csr \ + -signkey "${ROOT}"/etc/${PN}/csync2_ssl_key.pem \ + -out "${ROOT}"/etc/${PN}/csync2_ssl_cert.pem \ + &> "${ROOT}"/dev/null + + rm "${ROOT}"/etc/${PN}/csync2_ssl_cert.csr + chmod 400 "${ROOT}"/etc/${PN}/csync2_ssl_key.pem "${ROOT}"/etc/${PN}/csync2_ssl_cert.pem + fi + fi +} |