diff options
| -rw-r--r-- | gentoo_initscript | 25 | ||||
| -rw-r--r-- | pica-node-0.5.2.ebuild | 50 |
2 files changed, 75 insertions, 0 deletions
diff --git a/gentoo_initscript b/gentoo_initscript new file mode 100644 index 0000000..abb87d9 --- /dev/null +++ b/gentoo_initscript @@ -0,0 +1,25 @@ +#!/sbin/runscript + +depend() { + need net + use dns +} + +start() { + ebegin "Starting pica-node" + # Ensure that we run from a readable working dir, and that we do not + # lock filesystems when being run from such a location. + cd / + start-stop-daemon --start --quiet --background --make-pidfile \ + --pidfile /var/run/pica-node.pid --exec /usr/bin/pica-node \ + --stdout /var/log/pica-node.log --stderr /var/log/pica-node.err \ + --user ${PICANODE_USER:-pica-node} -- \ + ${PICANODE_OPTS:--v} + eend $? +} + +stop() { + ebegin "Stopping pica-node" + start-stop-daemon --stop --quiet --pidfile /var/run/pica-node.pid + eend $? +} diff --git a/pica-node-0.5.2.ebuild b/pica-node-0.5.2.ebuild new file mode 100644 index 0000000..d7c7aea --- /dev/null +++ b/pica-node-0.5.2.ebuild @@ -0,0 +1,50 @@ + # Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=4 + +inherit eutils + +DESCRIPTION="Node for Pica Pica distributed decentralized IM system" +HOMEPAGE="http://picapica.im/" +SRC_URI="http://picapica.im/pica-pica-${PV}.tar.gz" + +LICENSE="BSD-2" +SLOT="0" + +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=">=dev-libs/openssl-0.9.8 + >=dev-db/sqlite-3.7.0" + +RDEPEND="${DEPEND}" + +S="${WORKDIR}/pica-pica-${PV}" + +src_configure() { + # We have optional perl, python and ruby support + econf --disable-client --localstatedir=/var +} + +src_install() { + emake DESTDIR="${D}" install || die "Install failed" + newinitd "${S}/gentoo_initscript" ${PN} + #dodoc README || die +} + +pkg_preinst() { +# enewgroup pica-node + enewuser pica-node + fowners -R pica-node:pica-node "/var/lib/pica-node" + touch "${D}/var/log/pica-node.log" + touch "${D}/var/log/pica-node.err" + fowners -R pica-node:pica-node "/var/log/pica-node.log" + fowners -R pica-node:pica-node "/var/log/pica-node.err" +} + +pkg_postinst() { + + elog "Set announced_addr value to your IP address in config file before running pica-node" +} |
