summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Schleifenbaum2014-12-30 11:38:09 +0100
committerJohannes Schleifenbaum2014-12-30 11:38:09 +0100
commit6b206899b1fc4f6576db8e83237010d01ebc378a (patch)
treeb432964968025878d34a295c9f883b21694c6f4c
parent8b5b4fe89ff9b2bbc9c2a6d5d3ce988ddbe1b1f1 (diff)
downloadaur-6b206899b1fc4f6576db8e83237010d01ebc378a.tar.gz
use install script to check if phar is enabled
-rw-r--r--PKGBUILD3
-rw-r--r--phpdcd.install12
2 files changed, 14 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 82575d36c2f5..f69ccb736dee 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname="phpdcd"
pkgver=1.0.2
-pkgrel=3
+pkgrel=4
pkgdesc="Dead Code Detector (DCD) for PHP code."
url="https://github.com/sebastianbergmann/phpdcd"
license="BSD"
@@ -13,6 +13,7 @@ source=(
"https://phar.phpunit.de/${pkgname}-${pkgver}.phar"
"LICENSE"
)
+install="${pkgname}.install"
sha1sums=(
"f2052a9c143d79057257497e5fcf3c7275ebd065"
"11946e2ec7349724cf1cd711cd7fddf2dae82475"
diff --git a/phpdcd.install b/phpdcd.install
new file mode 100644
index 000000000000..72360306f81f
--- /dev/null
+++ b/phpdcd.install
@@ -0,0 +1,12 @@
+post_install() {
+ if ! /usr/bin/php -i | grep Phar >/dev/null; then
+ echo
+ echo "the Phar extension of php must be enabled."
+ echo
+ echo "check if the line extension=phar.so is commented out in your php.ini"
+ echo
+ fi
+}
+post_upgrade() {
+ post_install
+} \ No newline at end of file