summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO15
-rw-r--r--PKGBUILD36
-rw-r--r--php-humbug-box.install17
3 files changed, 68 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..876da25e001
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = php-humbug-box-bin
+ pkgdesc = Fast, zero config application bundler with PHARs.
+ pkgver = 3.8.0
+ pkgrel = 1
+ url = https://github.com/humbug/box
+ install = php-humbug-box.install
+ arch = any
+ license = MIT
+ source = https://github.com/humbug/box/releases/download/3.8.0/box.phar
+ source = https://raw.githubusercontent.com/humbug/box/3.8.0/LICENSE
+ sha512sums = 03fae36d1f696e0df041a689d9bd8004bd8ae631310a156c8f1a4b37a4ab26899b8f9022ba25c2807c9a4fea6315fd3bd18d07d46f9cb5c67371009401968bca
+ sha512sums = 4574410c9a00c41e11d166bcc0d44b4e31b5beaf24bf498a608ebf611e86466a3a61549da6d608b714b3c32c5c361a1514baf38e4db2a5fc0a0d36b69169cb50
+
+pkgname = php-humbug-box-bin
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..17ea15298c9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Stefan Auditor <stefan.auditor@erdfisch.de>
+# Please report issues at https://github.com/sanduhrs/php-humbug-box
+
+_pkgname='php-humbug-box'
+pkgname="${_pkgname}-bin"
+pkgver=3.8.0
+pkgrel=1
+pkgdesc='Fast, zero config application bundler with PHARs.'
+arch=('any')
+url='https://github.com/humbug/box'
+license=('MIT')
+install="${_pkgname}.install"
+source=(
+ "https://github.com/humbug/box/releases/download/${pkgver}/box.phar"
+ "https://raw.githubusercontent.com/humbug/box/${pkgver}/LICENSE"
+)
+sha512sums=('03fae36d1f696e0df041a689d9bd8004bd8ae631310a156c8f1a4b37a4ab26899b8f9022ba25c2807c9a4fea6315fd3bd18d07d46f9cb5c67371009401968bca'
+ '4574410c9a00c41e11d166bcc0d44b4e31b5beaf24bf498a608ebf611e86466a3a61549da6d608b714b3c32c5c361a1514baf38e4db2a5fc0a0d36b69169cb50')
+
+package() {
+ install -d -m755 "${pkgdir}/var/log/traefik"
+
+ install -D -m644 "${srcdir}/traefik.logrotate" "${pkgdir}/etc/logrotate.d/traefik"
+ install -D -m644 "${srcdir}/traefik.service" "${pkgdir}/usr/lib/systemd/system/traefik.service"
+ install -D -m644 "${srcdir}/traefik.toml" "${pkgdir}/etc/traefik/traefik.toml"
+
+ install -D -m644 "${srcdir}/LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -D -m755 "${srcdir}/${_pkgname}_${CARCH}_${pkgver}" "${pkgdir}/usr/bin/${_pkgname}"
+}
+
+package() {
+ install -D -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE"
+ install -D -m755 "${srcdir}/box.phar" "${pkgdir}/usr/share/webapps/bin/box.phar"
+ install -d "${pkgdir}/usr/bin"
+ ln -s "/usr/share/webapps/bin/box.phar" "${pkgdir}/usr/bin/box"
+}
diff --git a/php-humbug-box.install b/php-humbug-box.install
new file mode 100644
index 00000000000..d370a14b001
--- /dev/null
+++ b/php-humbug-box.install
@@ -0,0 +1,17 @@
+post_install() {
+ echo
+ echo "php-humbug-box is installed as executable 'box'."
+ if ! /usr/bin/php -i | grep Phar >/dev/null; then
+ echo
+ echo "[WARNING] the Phar extension of php must be enabled."
+ echo "[WARNING] check if the line extension=phar.so is commented out in your php.ini"
+ fi
+ if ! /usr/bin/php -i | grep 'phar.readonly.*Off.*' >/dev/null; then
+ echo
+ echo "[WARNING] the phar.readonly option of php must be set to 'Off'."
+ fi
+}
+
+post_upgrade() {
+ post_install
+} \ No newline at end of file