diff options
| author | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2012-08-26 20:20:40 +0000 |
|---|---|---|
| committer | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2012-08-26 20:20:40 +0000 |
| commit | c58f253f9551fa9850a67129fd02223ec055dc13 (patch) | |
| tree | c5b2b8af59c326cb13414939678212437f9d3fa7 | |
| parent | 4783c479d911838e0cb0a545140d7a7a70578a57 (diff) | |
| download | pica-pica-c58f253f9551fa9850a67129fd02223ec055dc13.tar.gz pica-pica-c58f253f9551fa9850a67129fd02223ec055dc13.zip | |
Gentoo ebuild and initscript
git-svn-id: svn://localhost/project_picapica/trunk@190 fb96df88-216d-11de-830c-f3023f12d8ac
| -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" +} |
