summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-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 000000000000..fb74213a098a
--- /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 000000000000..43316bc3c124
--- /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 000000000000..7429cc81eee7
--- /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"
+}