summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Schleifenbaum2014-12-30 11:38:23 +0100
committerJohannes Schleifenbaum2014-12-30 11:38:23 +0100
commitb580500256e6156286a4eec97753ecd6304d4426 (patch)
tree5aabd098555ee6cdace9eb6b8c1eeb2bc62c2928
parent0c2798f48d6a020ba3aa9c3a083f47cff5787800 (diff)
downloadaur-b580500256e6156286a4eec97753ecd6304d4426.tar.gz
use install script to check if phar is enabled
-rw-r--r--PKGBUILD3
-rw-r--r--phpcpd.install12
2 files changed, 14 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 0f0741e94c24..df3f825a0f20 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname="phpcpd"
pkgver=2.0.1
-pkgrel=3
+pkgrel=4
pkgdesc="Copy/Paste Detector (CPD) for PHP code."
url="https://github.com/sebastianbergmann/phpcpd"
license="BSD"
@@ -13,6 +13,7 @@ source=(
"https://phar.phpunit.de/${pkgname}-${pkgver}.phar"
"LICENSE"
)
+install="${pkgname}.install"
sha1sums=(
"f9fb98b688092603adff5ca0f1264fcf77674f90"
"6e7d5c0718a2559eb09bd1456606cd1d5ac90dc7"
diff --git a/phpcpd.install b/phpcpd.install
new file mode 100644
index 000000000000..72360306f81f
--- /dev/null
+++ b/phpcpd.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