aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@alpinelinux.org>2018-07-17 12:31:53 +0000
committerCarlo Landmeter <clandmeter@alpinelinux.org>2018-07-17 12:32:06 +0000
commit011483f5726a8239ff857ee2061a4595d9f54a63 (patch)
treec15ebf14e3b971c6d91ac1b6a2bcd7421b34ff94 /testing
parent8f60459754befa9b2bc8caac3afb3889f1c90793 (diff)
downloadaports-011483f5726a8239ff857ee2061a4595d9f54a63.tar.bz2
aports-011483f5726a8239ff857ee2061a4595d9f54a63.tar.xz
testing/phabricator: new aport
Diffstat (limited to 'testing')
-rw-r--r--testing/phabricator/APKBUILD82
-rw-r--r--testing/phabricator/phd.initd10
2 files changed, 92 insertions, 0 deletions
diff --git a/testing/phabricator/APKBUILD b/testing/phabricator/APKBUILD
new file mode 100644
index 0000000000..bbff41d522
--- /dev/null
+++ b/testing/phabricator/APKBUILD
@@ -0,0 +1,82 @@
+# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
+# Maintainer:
+pkgname=phabricator
+pkgver=0_git20180717
+pkgrel=0
+pkgdesc="Open software engineering platform and fun adventure game"
+url="http://phacility.com/phabricator/"
+arch="noarch"
+license="Apache-2.0"
+pkggroups=www-data
+depends="
+ php7
+ php7-apcu
+ php7-ctype
+ php7-curl
+ php7-fileinfo
+ php7-fpm
+ php7-gd
+ php7-iconv
+ php7-json
+ php7-mbstring
+ php7-mysqli
+ php7-opcache
+ php7-pcntl
+ php7-posix
+
+ libphutil
+ arcanist
+ "
+subpackages="$pkgname-openrc"
+options="!check" # no checks
+source="http://dev.alpinelinux.org/archive/phabricator/phabricator-$pkgver.tar.gz
+ phd.initd
+ "
+builddir="$srcdir/phabricator-stable"
+
+build() {
+ :
+}
+
+package() {
+ cd "$builddir"
+ mkdir -p "$pkgdir"/usr/share/php/$pkgname \
+ "$pkgdir"/usr/bin
+ for i in bin conf externals resources scripts src support webroot; do
+ cp -r "$builddir"/$i "$pkgdir"/usr/share/php/$pkgname/
+ done
+
+ install -dm775 -g www-data "$pkgdir"/var/lib/$pkgname/files \
+ "$pkgdir"/var/lib/$pkgname/repos
+
+ for conf in $(find "$pkgdir"/usr/share/php/$pkgname/conf/* -type d); do
+ mkdir -p "$pkgdir"/etc/$pkgname
+ mv "$conf" "$pkgdir"/etc/$pkgname/
+ chmod 775 "$pkgdir"/etc/$pkgname
+ chmod 664 "$pkgdir"/etc/$pkgname/*/*
+ chgrp www-data -R "$pkgdir"/etc/$pkgname
+ ln -sf /etc/$pkgname/"${conf##*/}" "$conf"
+ done
+
+ install -Dm755 "$srcdir"/phd.initd "$pkgdir"/etc/init.d/phd
+}
+
+snapshot() {
+ local pkgver=0_git$(date +%Y%m%d)
+ msg "Grabbing the latest stable snapshot"
+ mkdir -p "$srcdir"
+ wget -O "$srcdir"/$pkgname-$pkgver.tar.gz \
+ https://github.com/phacility/phabricator/archive/stable.tar.gz
+ ssh distfiles.alpinelinux.org \
+ "mkdir -p archive/$pkgname/"
+ scp "$srcdir"/$pkgname-$pkgver.tar.gz \
+ dev.alpinelinux.org:/archive/$pkgname/
+ sed -i -e "s/^pkgver=.*/pkgver=$pkgver/" \
+ "$startdir"/APKBUILD
+ sed -i -e "s/^pkgrel=.*/pkgrel=0/" \
+ "$startdir"/APKBUILD
+ abuild checksum
+}
+
+sha512sums="b749c6b0aaa759626ee753d128b802c8e8f6262a7e8bdc2261f0ab6b5873c941dfd3917eb7e53bed0fa263d2356890f74e08c1a7eebb5836ee1aa6af52c7f976 phabricator-0_git20180717.tar.gz
+aabcb6ccc660041cdf13d0c5070b205c8cc2aa09d7801b8c9d06da104cc3aca6c03597291c8f9086f8918601280377df66adf9f7b017b517e78c84cf0f92ea7b phd.initd"
diff --git a/testing/phabricator/phd.initd b/testing/phabricator/phd.initd
new file mode 100644
index 0000000000..d175e03e8c
--- /dev/null
+++ b/testing/phabricator/phd.initd
@@ -0,0 +1,10 @@
+#!/sbin/openrc-run
+
+command="/usr/share/php/phabricator/bin/phd"
+command_args="start"
+start_stop_daemon_args="--quiet"
+
+stop() {
+ $command stop
+}
+