summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Jacquin <bertrand@jacquin.bzh>2017-02-09 12:42:07 +0000
committerBertrand Jacquin <bertrand@jacquin.bzh>2017-02-09 12:42:07 +0000
commit44ca47cda50c7c57ff9f4c85afb2dc92f7561d8d (patch)
treeddc3339ee0038e56504d4b187331b7dbaea3dafb
parentGenerate thin-manifest (diff)
downloadportage-44ca47cda50c7c57ff9f4c85afb2dc92f7561d8d.tar.xz
www-apps/phabricator-extensions-Sprint: Version bump
Package-Manager: portage-2.3.3
-rw-r--r--www-apps/phabricator-extensions-Sprint/phabricator-extensions-Sprint-20170208.ebuild86
-rw-r--r--www-apps/phabricator-extensions-Sprint/phabricator-extensions-Sprint-9999.ebuild6
2 files changed, 90 insertions, 2 deletions
diff --git a/www-apps/phabricator-extensions-Sprint/phabricator-extensions-Sprint-20170208.ebuild b/www-apps/phabricator-extensions-Sprint/phabricator-extensions-Sprint-20170208.ebuild
new file mode 100644
index 00000000..a6fa094c
--- /dev/null
+++ b/www-apps/phabricator-extensions-Sprint/phabricator-extensions-Sprint-20170208.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+inherit git-r3
+
+DESCRIPTION="Manage your tasks with Points in Phabricator"
+HOMEPAGE="https://phabricator.wikimedia.org/diffusion/PHSP/"
+EGIT_REPO_URI="https://phabricator.wikimedia.org/diffusion/PHSP/phabricator-sprint.git"
+EGIT_BRANCH="wmf/stable"
+EGIT_COMMIT="release/2017-02-08/1"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+
+DEPEND=""
+RDEPEND="dev-php/libphutil
+ www-apps/phabricator"
+
+src_prepare() {
+ default
+
+ git log --format='%H %ct' -n 1 > "${S}/GIT_COMMIT_INFO"
+ git remote add origin "${EGIT_REPO_URI}"
+ git remote -v > "${S}/GIT_REMOTE_INFO"
+
+ find -type f -name .gitignore -print0 \
+ | xargs -0 --no-run-if-empty -- \
+ rm
+
+ # Replace 'env' shebang to files it point to
+ find -type f \
+ | sort \
+ | xargs -n 1 --no-run-if-empty -- \
+ awk 'NR == 1 && /^#!\/usr\/bin\/env/ {print FILENAME}' \
+ | while read ; do
+ set -- $(sed -ne '1 s:^#!\([^ ]*\) ::p;q' ${REPLY})
+ cmd="$1" ; shift ; args="$@"
+
+ case "${cmd}" in
+ bash|php) ;;
+ *) continue ;;
+ esac
+
+ path="$(type -p ${cmd})" || continue
+ [[ -z "${path}" ]] && continue
+
+ einfo "Changing ${REPLY} shebang to #!${path} ${args}"
+ sed -i \
+ -e "1 s:^#!.*:#!${path} ${args}:" \
+ "${REPLY}"
+ eend $?
+ done
+}
+
+src_test() {
+ arc unit --everything --no-coverage || die "arc unit failed"
+}
+
+src_install() {
+ insinto "/usr/share/${PN}"
+ doins GIT_COMMIT_INFO GIT_REMOTE_INFO
+
+ insinto "/usr/share/php/${PN}"
+ doins -r rsrc scripts src
+
+ # 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
+
+ dodoc README.md RELEASE_NOTES.md
+}
+
+pkg_postinst () {
+ elog
+ elog "After the first installation, you need to run:"
+ elog " cd /path/to/phabricator/install"
+ elog " bin/config set load-libraries '{\"sprint\":\"${EROOT}usr/share/php/${PN}/src\"}'"
+}
diff --git a/www-apps/phabricator-extensions-Sprint/phabricator-extensions-Sprint-9999.ebuild b/www-apps/phabricator-extensions-Sprint/phabricator-extensions-Sprint-9999.ebuild
index 8ea90a7d..e64a28e3 100644
--- a/www-apps/phabricator-extensions-Sprint/phabricator-extensions-Sprint-9999.ebuild
+++ b/www-apps/phabricator-extensions-Sprint/phabricator-extensions-Sprint-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@@ -22,6 +22,8 @@ src_prepare() {
default
git log --format='%H %ct' -n 1 > "${S}/GIT_COMMIT_INFO"
+ git remote add origin "${EGIT_REPO_URI}"
+ git remote -v > "${S}/GIT_REMOTE_INFO"
find -type f -name .gitignore -print0 \
| xargs -0 --no-run-if-empty -- \
@@ -58,7 +60,7 @@ src_test() {
src_install() {
insinto "/usr/share/${PN}"
- doins GIT_COMMIT_INFO
+ doins GIT_COMMIT_INFO GIT_REMOTE_INFO
insinto "/usr/share/php/${PN}"
doins -r rsrc scripts src