summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames An2016-08-02 16:32:30 -0400
committerJames An2016-08-02 16:32:30 -0400
commit41372085f45cad2db13bcd9209f388b8d5563dab (patch)
treed85e93dcfb72c5887e9afd8ff00e662380b984ad
downloadaur-41372085f45cad2db13bcd9209f388b8d5563dab.tar.gz
Initial commit with working package.
-rw-r--r--.SRCINFO18
-rw-r--r--.gitignore27
-rw-r--r--PKGBUILD51
3 files changed, 96 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..fb74213a098
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = platformsh-cli-git
+ pkgdesc = The unified tool for managing your Platform.sh services from the command line.
+ pkgver = 3.3.5.r0.g63a69c1
+ pkgrel = 1
+ url = https://github.com/jamesan/platformsh-cli
+ arch = any
+ license = GPL
+ depends = git
+ depends = php
+ optdepends = drush
+ optdepends = composer
+ provides = platformsh-cli=3.3.5.r0.g63a69c1
+ conflicts = platformsh-cli
+ source = platformsh-cli::git+https://github.com/platformsh/platformsh-cli.git#branch=master
+ md5sums = SKIP
+
+pkgname = platformsh-cli-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..43316bc3c12
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,27 @@
+# From: https://github.com/github/gitignore/blob/master/ArchLinuxPackages.gitignore
+
+*.tar
+*.tar.*
+*.zip
+*.tgz
+*.log
+*.log.*
+*.sig
+
+# makepkg working folders
+pkg
+src
+
+#
+# Additional ignore patterns:
+#
+
+# Source files
+*.deb
+*.gem
+*.out
+*.rpm
+*.html
+
+# Ignore package source folders
+*/*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..7429cc81eee
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,51 @@
+# Maintainer: James An <james@jamesan.ca>
+
+pkgname=platformsh-cli-git
+_pkgname=${pkgname%-git}
+pkgver=3.3.5.r0.g63a69c1
+pkgrel=1
+pkgdesc="The unified tool for managing your Platform.sh services from the command line."
+arch=('any')
+url="https://github.com/jamesan/$_pkgname"
+license=('GPL')
+depends=('git' 'php')
+optdepends=('drush' 'composer')
+provides=("$_pkgname=$pkgver")
+conflicts=("$_pkgname")
+source=("$_pkgname"::"git+https://github.com/${_pkgname%-cli}/$_pkgname.git#branch=master")
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$_pkgname"
+ (
+ set -o pipefail
+ git describe --long --tag | sed -r 's/^v//;s/([^-]*-g)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+prepare() {
+ cd "$_pkgname"
+
+ composer install
+}
+
+build() {
+ cd "$_pkgname"
+
+ php -d phar.readonly=Off /usr/bin/php-box build
+}
+
+check() {
+ cd "$_pkgname"
+
+ php -d phar.readonly=Off /usr/bin/php-box verify platform.phar
+}
+
+package() {
+ cd "$_pkgname"
+
+ install -Dm755 platform.phar "$pkgdir/usr/share/webapps/platform/platform.phar"
+ install -dm755 "$pkgdir/usr/bin"
+ ln -s /usr/share/webapps/platform/platform.phar "$pkgdir/usr/bin/platform"
+}