diff options
author | James An | 2015-08-08 12:41:39 -0400 |
---|---|---|
committer | James An | 2015-08-08 12:41:39 -0400 |
commit | 0a8a512913252191e40307c3a2f67874d0515e7a (patch) | |
tree | 666d03c8d764d6dfeab3f9fe6dacaf40ae34dd55 | |
parent | f87a220626caa16f9c1392b412fdeb7b88f19099 (diff) | |
download | aur-0a8a512913252191e40307c3a2f67874d0515e7a.tar.gz |
Upgrade upstream version, organised drush files to system-wide /etc/drush path, and added PHP .ini include files to enable zero-conf functionality with an unmodified PHP config setup.
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | PKGBUILD | 40 | ||||
-rw-r--r-- | drush-git.install | 12 | ||||
-rw-r--r-- | drush.ini | 17 | ||||
-rw-r--r-- | errors.drush.ini | 3 | ||||
-rw-r--r-- | req.drush.ini | 4 |
6 files changed, 49 insertions, 40 deletions
@@ -1,7 +1,7 @@ pkgbase = drush-git pkgdesc = The Drupal command-line shell, git version. - pkgver = 8.0.0.beta12.r51.gc4b8883 - pkgrel = 1 + pkgver = 8.0.0.beta14.r1.g34f26ff + pkgrel = 2 url = https://github.com/drush-ops/drush-git install = drush-git.install arch = any @@ -9,12 +9,15 @@ pkgbase = drush-git makedepends = git depends = bash depends = php-composer - provides = drush=8.0.0.beta12.r51.gc4b8883 + depends = php-gd + provides = drush=8.0.0.beta14.r1.g34f26ff conflicts = drush source = git://github.com/drush-ops/drush.git - source = drush.ini + source = errors.drush.ini + source = req.drush.ini md5sums = SKIP - md5sums = dca6f47289ea903c85ac997c9cf520d5 + md5sums = 2c661b0268411ad82e33ca314424637a + md5sums = fd34300a8ce7ca8e826cb8b9a5ed2b89 pkgname = drush-git @@ -3,8 +3,8 @@ _pkgname=drush pkgname=$_pkgname-git -pkgver=8.0.0.beta12.r51.gc4b8883 -pkgrel=1 +pkgver=8.0.0.beta14.r1.g34f26ff +pkgrel=2 pkgdesc='The Drupal command-line shell, git version.' arch=('any') url="https://github.com/drush-ops/$pkgname" @@ -15,9 +15,11 @@ provides=("$_pkgname=$pkgver") conflicts=("$_pkgname") install=$pkgname.install source=("git://github.com/drush-ops/$_pkgname.git" - "$_pkgname.ini") + "errors.$_pkgname.ini" + "req.$_pkgname.ini") md5sums=('SKIP' - 'dca6f47289ea903c85ac997c9cf520d5') + '2c661b0268411ad82e33ca314424637a' + 'fd34300a8ce7ca8e826cb8b9a5ed2b89') pkgver() { cd "$_pkgname" @@ -31,6 +33,10 @@ pkgver() { prepare() { composer update --prefer-source --no-interaction --working-dir "$_pkgname" composer install --prefer-source --no-interaction --working-dir "$_pkgname" + for extension in gd mysqli pdo_mysql; do + echo "extension=$extension.so" >| "$extension.$_pkgname.ini" + done + sed -r 's/^([^;$])/;\1/' "$_pkgname/examples/example.$_pkgname.ini" >| "$_pkgname.ini" } check() { @@ -45,24 +51,26 @@ check() { } package() { - cd "$_pkgname" + # Install PHP configuration files + for conf in errors gd mysqli pdo_mysql req; do + install -Dm644 "$conf.$_pkgname.ini" "$pkgdir/etc/php/conf.d/$conf.$_pkgname.ini" + done # Set up directory structure - install -d "$pkgdir/etc/bash_completion.d" - install -d "$pkgdir/etc/$_pkgname" - install -d "$pkgdir/etc/skel" + install --directory "$pkgdir/etc/bash_completion.d" + install --directory --owner=http --group=http --mode=6775 "$pkgdir/etc/$_pkgname"{,/cache{,/{default,download,usage}}} + install --owner=http --group=http --mode=644 "$_pkgname.ini" "$pkgdir/etc/$_pkgname/$_pkgname.ini" + install --directory "$pkgdir/etc/skel" ln --force --symbolic "/etc/$_pkgname" "$pkgdir/etc/skel/.$_pkgname" - install -d "$pkgdir/usr/bin" - install -d "$pkgdir/usr/share/webapps/$_pkgname" - install -d "$pkgdir/usr/share/doc/$_pkgname/misc" + install --directory "$pkgdir/usr/bin" + install --directory "$pkgdir/usr/share/webapps/$_pkgname" + install --directory "$pkgdir/usr/share/doc/$_pkgname/misc" # Copy main application files - cp -rf * "$pkgdir/usr/share/webapps/$_pkgname" - # Move - cp -rf CONTRIBUTING.md README.md docs examples "$pkgdir/usr/share/doc/$_pkgname" + cd "$_pkgname" + cp -a * "$pkgdir/usr/share/webapps/$_pkgname" + cp -a CONTRIBUTING.md README.md docs examples "$pkgdir/usr/share/doc/$_pkgname" rm -rf "$pkgdir/usr/share/doc/$_pkgname/"{CONTRIBUTING.md,README.md,docs,examples,misc/windrush_build} ln -s "/usr/share/webapps/$_pkgname/$_pkgname" "$pkgdir/usr/bin/$_pkgname" ln -s "/usr/share/webapps/$_pkgname/$_pkgname.complete.sh" "$pkgdir/etc/bash_completion.d" - - install -Dm644 "../$_pkgname.ini" "$pkgdir/etc/$_pkgname/$_pkgname.ini" } diff --git a/drush-git.install b/drush-git.install index 798a7a61f064..9de9447e1608 100644 --- a/drush-git.install +++ b/drush-git.install @@ -1,7 +1,15 @@ post_install() { + post_upgrade +} + +post_upgrade() { echo '>>> Setting up shared system-wide drush configuration' echo ' by symlinking ~/.drush to /etc/drush for all users.' - for user_dir in $(cut --fields=6 --delimiter=: /etc/passwd | grep ^/home); do - ln --force --symbolic /etc/drush "$user_dir" + for user in $(cut --fields=1,6 --delimiter=: /etc/passwd | grep :/home); do + user=($(echo $user | tr ':' ' ')) + path="${user[1]}/.drush" + user="${user[0]}" + [ -h "$path" -a "$(realpath "$path")" = /etc/drush ] || + sudo -Hu $user ln --backup --force --symbolic /etc/drush "$path" done } diff --git a/drush.ini b/drush.ini deleted file mode 100644 index 730a08eb6ecc..000000000000 --- a/drush.ini +++ /dev/null @@ -1,17 +0,0 @@ -; -; Show all errors and direct them to stderr -; when running drush. -; -error_reporting = E_ALL | E_NOTICE | E_STRICT -display_errors = stderr - -; -; Remove open_basedir restrictions. -; -open_basedir = -date.timezone = UTC - -; -extension=gd.so -extension=mysqli.so -extension=pdo_mysql.so diff --git a/errors.drush.ini b/errors.drush.ini new file mode 100644 index 000000000000..9000945a6060 --- /dev/null +++ b/errors.drush.ini @@ -0,0 +1,3 @@ +; Recommended settings. +display_errors = stderr +error_reporting = E_ALL diff --git a/req.drush.ini b/req.drush.ini new file mode 100644 index 000000000000..29aaf9cea395 --- /dev/null +++ b/req.drush.ini @@ -0,0 +1,4 @@ +; Drupal requirements. +date.timezone = UTC +memory_limit = 192M +open_basedir = |