summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Finelli2016-01-07 19:57:34 -0500
committerMario Finelli2016-01-07 19:57:34 -0500
commit4e95aba80fd51cb6d2294152c1db2be98da234ec (patch)
tree6773419c00abaeedb574eb3917c0d1cd2303d2ff
parentc4272a2fe5865d1892fa55577c2185c8ff47f18e (diff)
downloadaur-4e95aba80fd51cb6d2294152c1db2be98da234ec.tar.gz
Refactor pkgbuild
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD53
2 files changed, 32 insertions, 38 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 58e5b28db0f6..26103604d0a4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,19 +1,20 @@
# Generated by mksrcinfo v8
-# Thu Jan 7 13:31:44 UTC 2016
+# Fri Jan 8 00:55:52 UTC 2016
pkgbase = drush
- pkgdesc = Drush is a command line shell and Unix scripting interface for Drupal
+ pkgdesc = Drush is a command line shell and Unix scripting interface for Drupal.
pkgver = 8.0.1
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/drush-ops/drush/
install = drush.install
arch = any
license = GPL
+ makedepends = php-composer
+ makedepends = php-box
depends = php
- depends = php-composer
- source = http://github.com/drush-ops/drush/archive/8.0.1.tar.gz
- source = http://download.pear.php.net/package/Console_Table-1.2.1.tgz
- md5sums = cde5243544a6ac076c9ade447f4367e9
- md5sums = 027b5bce93e53111e55b14111118de98
+ source = drush.install
+ source = https://github.com/drush-ops/drush/archive/8.0.1.tar.gz
+ sha256sums = e800601699e4b1ea0a0057fc91827b31fc8c5070f5014df2777396aabc7680ec
+ sha256sums = 10b327403ad2fc929a79a8133197183d8a72c4606c58212b3a8008c3a23fc990
pkgname = drush
diff --git a/PKGBUILD b/PKGBUILD
index e61bdd182e3d..2d8d6a5585b0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,44 +5,37 @@
pkgname=drush
pkgver=8.0.1
-pkgrel=1
-pkgdesc="Drush is a command line shell and Unix scripting interface for Drupal"
+pkgrel=2
+pkgdesc="Drush is a command line shell and Unix scripting interface for Drupal."
arch=('any')
url="https://github.com/drush-ops/drush/"
license=('GPL')
-depends=('php' 'php-composer')
+depends=('php')
+makedepends=('php-composer' 'php-box')
install=${pkgname}.install
source=(
- "http://github.com/drush-ops/$pkgname/archive/$pkgver.tar.gz"
- 'http://download.pear.php.net/package/Console_Table-1.2.1.tgz'
-)
-md5sums=('cde5243544a6ac076c9ade447f4367e9'
- '027b5bce93e53111e55b14111118de98')
+ "drush.install"
+ "https://github.com/drush-ops/${pkgname}/archive/$pkgver.tar.gz")
+sha256sums=('e800601699e4b1ea0a0057fc91827b31fc8c5070f5014df2777396aabc7680ec'
+ '10b327403ad2fc929a79a8133197183d8a72c4606c58212b3a8008c3a23fc990')
-package() {
- cd "${pkgname}-${pkgver}"
-
- composer update
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ cp box.json.dist box.json
+ composer install --no-dev
+}
- # create dir structure
- install -d "${pkgdir}/etc/${pkgname}"
- install -d "${pkgdir}/usr/bin"
- install -d "${pkgdir}/usr/share/webapps/${pkgname}"
- install -d "${pkgdir}/usr/share/doc/${pkgname}"
- # add empty directory for drush extensions
- install -d "${pkgdir}/usr/share/webapps/${pkgname}/commands"
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ php-box build
+}
- # install main files
- cp -r commands lib includes vendor "${pkgdir}/usr/share/webapps/${pkgname}"
- cp -r examples "${pkgdir}/usr/share/doc/${pkgname}"
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
- install -m644 examples/example.{{aliases.,}drushrc.php,drush.ini} "${pkgdir}/etc/${pkgname}"
- install -m644 drush_logo-black.png "${pkgdir}/usr/share/doc/${pkgname}"
- install -m644 drush.info drush.api.php "${pkgdir}/usr/share/webapps/${pkgname}"
- install -m644 drush.php "${pkgdir}/usr/share/webapps/${pkgname}"
- install -m755 drush "${pkgdir}/usr/share/webapps/${pkgname}"
- ln -s "/usr/share/webapps/${pkgname}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
+ install -Dm755 drush.phar "${pkgdir}/usr/bin/drush"
- # install Console_Table library too
- install -Dm644 ../Console_Table-1.2.1/Table.php "${pkgdir}/usr/share/webapps/${pkgname}/includes/table.inc"
+ install -Dm644 examples/example.drush.ini "${pkgdir}/etc/drush/drush.ini"
+ install -Dm644 examples/example.aliases.drushrc.php "${pkgdir}/etc/drush/aliases.drushrc.php"
+ install -Dm644 examples/example.drushrc.php "${pkgdir}/etc/drush/drushrc.php"
}