summaryrefslogtreecommitdiff
path: root/www-apps
diff options
context:
space:
mode:
authorBertrand Jacquin <beber@meleeweb.net>2013-08-15 01:51:30 +0200
committerBertrand Jacquin <beber@meleeweb.net>2013-08-15 01:58:41 +0200
commit4b67d842ed1db316a81f1cd80a88a659c0a28ace (patch)
tree7bfdf42a623fd250678232e1f84866718c655906 /www-apps
parentwww-client/arcanist: Command-line tool for Phabricator (diff)
downloadportage-4b67d842ed1db316a81f1cd80a88a659c0a28ace.tar.xz
www-apps/phabricator: Collection of web applications which makes it easier to scale software companies
Package-Manager: portage-2.2.0
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/phabricator/ChangeLog6
-rw-r--r--www-apps/phabricator/Manifest5
-rw-r--r--www-apps/phabricator/files/phabricator.confd10
-rwxr-xr-xwww-apps/phabricator/files/phabricator.initd41
-rw-r--r--www-apps/phabricator/metadata.xml13
-rw-r--r--www-apps/phabricator/phabricator-9999.ebuild73
6 files changed, 148 insertions, 0 deletions
diff --git a/www-apps/phabricator/ChangeLog b/www-apps/phabricator/ChangeLog
new file mode 100644
index 00000000..a4dc8a80
--- /dev/null
+++ b/www-apps/phabricator/ChangeLog
@@ -0,0 +1,6 @@
+*phabricator-9999 (14 Aug 2013)
+
+ 14 Aug 2013; Bertrand Jacquin <beber@meleeweb.net> +files/phabricator.confd,
+ +files/phabricator.initd, +metadata.xml, +phabricator-9999.ebuild:
+ www-apps/phabricator: Collection of web applications which makes it easier to
+ scale software companies
diff --git a/www-apps/phabricator/Manifest b/www-apps/phabricator/Manifest
new file mode 100644
index 00000000..e3f60802
--- /dev/null
+++ b/www-apps/phabricator/Manifest
@@ -0,0 +1,5 @@
+AUX phabricator.confd 223 SHA256 afa8ecbedde0eadad0474a5c03c0ab86db7e0b85fec720e560156958f437cb74 WHIRLPOOL c2ac7e29b6a551828cc175132c5f7f29345042d375e5d38de2d2a2989101e6303b677cde8e8184be1de2d5495165cd2d19fdfabd37db0503c34f2f9e1e5b86be
+AUX phabricator.initd 850 SHA256 d0a9dabfa0a618f4a316eca263e8ecc39f2c1f0e9813c35a6d9777aa45dddb9f WHIRLPOOL af4b2ad1474b22aa1481e334f3b07ff616149d27ccb59131da5666168dfc64cae65ed2dbf9ed74e222ee7e22367af394c11bf18edd4e9b0790b8abd55d201617
+EBUILD phabricator-9999.ebuild 1863 SHA256 53d23869f26a480871882ae8015b59627ccfd1cbec672a0c57cba41784df2828 WHIRLPOOL 649493b4ef36fa337e0bcd40e1097ab3e3a70003244aa1e547f78435a5c0544c15f4b7a11e5a382fb77441a664a02780c44bc4e2f29af306a1c7d39190a7167c
+MISC ChangeLog 288 SHA256 d19614bf6e063607f56d388b08b2b431e9e58c08700d35e5395b6cd5b37656ca WHIRLPOOL 4abaabfd629dfa014ad6a93dc67bfb8a61340ae789ba16b73c2a96d5fd1bbe737f48d40ff34e7ca400f631300ebb9cc78d6473d9b409f1827e88afaf93585f4f
+MISC metadata.xml 376 SHA256 214868e07f83e61d21087c9867be82c69039947d2f6e29d5d0facf23e7690a4d WHIRLPOOL 34de8852dfdb73e442aba0c8b52cb6bc7877ca7d9b922245d25861935d69882cebeb9a3220dadd2b0f8548f6b16d10bb2c95017eda5d5f7b96cc6af7eadb484d
diff --git a/www-apps/phabricator/files/phabricator.confd b/www-apps/phabricator/files/phabricator.confd
new file mode 100644
index 00000000..20618b4e
--- /dev/null
+++ b/www-apps/phabricator/files/phabricator.confd
@@ -0,0 +1,10 @@
+# Config file for /etc/init.d/phabricator
+
+# Where to serve the files from
+PHABRICATOR_ROOT="/var/www/localhost"
+
+# Environnement to enable
+PHABRICATOR_ENV="default"
+
+# User/Group of this instance
+PHABRICATOR_USER="apache"
diff --git a/www-apps/phabricator/files/phabricator.initd b/www-apps/phabricator/files/phabricator.initd
new file mode 100755
index 00000000..81b85c39
--- /dev/null
+++ b/www-apps/phabricator/files/phabricator.initd
@@ -0,0 +1,41 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+: ${PHABRICATOR_ROOT:=/var/www/localhost}
+: ${PHABRICATOR_ENV:=default}
+: ${PHABRICATOR_USER:=apache}
+
+export PHABRICATOR_ENV
+
+depend() {
+ need apache2 git-daemon
+}
+
+status() {
+ "${PHABRICATOR_ROOT}/bin/phd" status
+}
+
+start() {
+ ebegin "Starting ${RC_SVCNAME}"
+ start-stop-daemon --start \
+ -e PHABRICATOR_ENV="${PHABRICATOR_ENV}" \
+ --quiet \
+ --user "${PHABRICATOR_USER}" \
+ --exec "${PHABRICATOR_ROOT}/bin/phd" \
+ -- start
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${RC_SVCNAME}"
+ # Yep, a start, phd play with many pid files
+ start-stop-daemon --start \
+ -e PHABRICATOR_ENV="${PHABRICATOR_ENV}" \
+ --quiet \
+ --user "${PHABRICATOR_USER}" \
+ --exec "${PHABRICATOR_ROOT}/bin/phd" \
+ -- stop
+ eend $?
+}
diff --git a/www-apps/phabricator/metadata.xml b/www-apps/phabricator/metadata.xml
new file mode 100644
index 00000000..b0988fa1
--- /dev/null
+++ b/www-apps/phabricator/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>beber@meleeweb.net</email>
+ <name>Bertrand Jacquin</name>
+ </maintainer>
+ <use>
+ <flag name='mercurial'>
+ Support for <pkg>dev-vcs/mercurial</pkg>
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/www-apps/phabricator/phabricator-9999.ebuild b/www-apps/phabricator/phabricator-9999.ebuild
new file mode 100644
index 00000000..af10f919
--- /dev/null
+++ b/www-apps/phabricator/phabricator-9999.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+inherit git-2 webapp
+
+DESCRIPTION="Collection of web applications which makes it easier to scale software companies"
+HOMEPAGE="http://phabricator.org"
+EGIT_REPO_URI="git://github.com/facebook/phabricator.git"
+
+LICENSE="Apache-2.0"
+IUSE="test git subversion mercurial"
+
+RDEPEND="|| (
+ >=www-servers/apache-2.2.7[apache2_modules_rewrite]
+ www-servers/nginx
+ www-servers/lighttpd
+ )
+ >=dev-lang/php-5.2[cgi,cli,curl,iconv,mysql,mysqli,pcntl,gd]
+ =dev-php/libphutil-${PV}
+ dev-php/pecl-apc
+ net-libs/nodejs
+ =www-client/arcanist-${PV}
+ git? ( dev-vcs/git )
+ subversion? ( dev-vcs/subversion )
+ mercurial? ( dev-vcs/mercurial )"
+
+src_install() {
+ webapp_src_preinst
+
+ rm -r scripts/install
+
+ if ! use test ; then
+ find "${S}" -type d -name __tests__ -print0 \
+ | xargs -0 --no-run-if-empty -- \
+ rm -r
+ fi
+
+ insinto "${MY_APPDIR}"
+ doins -r bin conf externals resources scripts src support webroot
+
+ # Make executable all shebanged files
+ find "${ED}" -type f \
+ | xargs -n 1 --no-run-if-empty -- \
+ awk 'NR == 1 && /^#!/ {print FILENAME}' \
+ | sed -e "s:${ED}:/:" \
+ | xargs --no-run-if-empty -- \
+ fperms 755
+
+ # "${MY_HTDOCSDIR}" is created by webapp_src_preinst()
+ rm -r "${ED}/${MY_HTDOCSDIR}"
+ dosym webroot "${MY_HTDOCSDIR}"
+
+ webapp_configfile "${MY_APPDIR}"/conf/{default,development,production}.conf.php
+ webapp_src_install
+
+ newinitd "${FILESDIR}/${PN}.initd" "${PN}"
+ newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+
+ dodoc NOTICE README
+}
+
+pkg_postinst() {
+ webapp_pkg_postinst
+
+ elog
+ elog "After an upgrade, you should run"
+ elog " ${MY_APPDIR}/bin/storage upgrade"
+ elog
+ elog "For more info about how to configure it, see"
+ elog " http://www.phabricator.com/docs/phabricator/article/Configuration_Guide.html"
+}