summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-cluster/csync2/csync2-1.34-r2.ebuild
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-cluster/csync2/csync2-1.34-r2.ebuild')
-rw-r--r--sys-cluster/csync2/csync2-1.34-r2.ebuild109
1 files changed, 109 insertions, 0 deletions
diff --git a/sys-cluster/csync2/csync2-1.34-r2.ebuild b/sys-cluster/csync2/csync2-1.34-r2.ebuild
new file mode 100644
index 000000000000..5d3672ebed53
--- /dev/null
+++ b/sys-cluster/csync2/csync2-1.34-r2.ebuild
@@ -0,0 +1,109 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools 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="ssl xinetd"
+
+RDEPEND=">=net-libs/librsync-0.9.5
+ =dev-db/sqlite-2.8*
+ ssl? ( >=net-libs/gnutls-2.7.3 )
+ xinetd? ( sys-apps/xinetd )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+SLOT="0"
+
+src_prepare() {
+ if use ssl; then
+ epatch "${FILESDIR}"/${P}-gnutls.patch #274213
+ eautoreconf
+ fi
+}
+
+src_configure() {
+ econf \
+ --localstatedir=/var \
+ --sysconfdir=/etc/csync2 \
+ $(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}
+
+ dodoc AUTHORS ChangeLog INSTALL NEWS README TODO csync2_locheck.sh
+}
+
+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
+}