summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorThore Boedecker2017-05-08 18:52:31 +0200
committerThore Boedecker2017-05-08 18:52:31 +0200
commit7076198212eda2e5dbab7479cdfd536fcafabfd3 (patch)
treeaca7f8ff4f142a1ab67793c82194af01118ae4cb
parent93a10e3da6500e15df3f2236a51d3db0926d439d (diff)
downloadaur-7076198212eda2e5dbab7479cdfd536fcafabfd3.tar.gz
fix arch, fix deps, fix source, compact .install
- fix mistakenly changed arch - makedep 'make' is included in base-devel - use variables in source URL - compact .install output - prepare check(), unfortunately suffers from a bug that lets phpunit run in an endless loop, disabled for now Signed-off-by: Thore Boedecker <me@foxxx0.de>
-rw-r--r--.SRCINFO10
-rw-r--r--PKGBUILD33
-rw-r--r--awl.install23
3 files changed, 28 insertions, 38 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2e2f2c04b8cf..0de6b27e7ea3 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,18 @@
# Generated by mksrcinfo v8
-# Mon May 8 14:50:48 UTC 2017
+# Mon May 8 16:52:14 UTC 2017
pkgbase = awl
pkgdesc = Andrew's php Web Libraries
pkgver = 0.57
- pkgrel = 2
+ pkgrel = 3
url = https://gitlab.com/davical-project/awl/
install = awl.install
- arch = i686
- arch = x86_64
+ arch = any
license = GPL2
- makedepends = make
makedepends = apigen
makedepends = php-sqlite
depends = php
source = awl-0.57.tar.bz2::https://gitlab.com/davical-project/awl/repository/archive.tar.bz2?ref=r0.57
- source = awl.install
sha256sums = 42e5bfc5cf1c011c3896eece13002da5be09e701a3161a6109fe5888eba5e5bc
- sha256sums = 483f89aa1f30db4e6b64a90f486ab543985d68a712996f0deec58d354e4fb4c7
pkgname = awl
diff --git a/PKGBUILD b/PKGBUILD
index 7dd623ede69c..b669ca764b9b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,32 +5,43 @@
pkgname='awl'
pkgver='0.57'
-pkgrel=2
+pkgrel=3
pkgdesc="Andrew's php Web Libraries"
-arch=('i686' 'x86_64')
+arch=('any')
url="https://gitlab.com/davical-project/awl/"
license=('GPL2')
depends=('php')
-makedepends=('make' 'apigen' 'php-sqlite')
+makedepends=('apigen' 'php-sqlite')
install="${pkgname}.install"
-source=("awl-0.57.tar.bz2::https://gitlab.com/davical-project/awl/repository/archive.tar.bz2?ref=r0.57"
- "${pkgname}.install")
-sha256sums=('42e5bfc5cf1c011c3896eece13002da5be09e701a3161a6109fe5888eba5e5bc'
- '483f89aa1f30db4e6b64a90f486ab543985d68a712996f0deec58d354e4fb4c7')
+source=("awl-${pkgver}.tar.bz2::https://gitlab.com/davical-project/awl/repository/archive.tar.bz2?ref=r${pkgver}")
+sha256sums=('42e5bfc5cf1c011c3896eece13002da5be09e701a3161a6109fe5888eba5e5bc')
prepare() {
cd "${srcdir}"
- msg "renaming source dir"
- mv awl-r${pkgver}-* "awl-${pkgver}"
- msg "stripping Debian build files from source dir"
+ # rename source dir
+ mv ${pkgname}-r${pkgver}-* "${pkgname}-${pkgver}"
+ # strip debian build files from source dir
rm -rf "${srcdir}/${pkgname}-${pkgver}/debian"
- msg "enabling pdo_sqlite.so php extensions in the Makefile regardless of php.ini setting"
+ # enable pdo_sqlite php extension for apigen
sed -i 's|apigen generate|php -d "extension=pdo_sqlite.so" /usr/bin/apigen generate|g' "${srcdir}/${pkgname}-${pkgver}/Makefile"
+ # enable inconv php extension for make test
+ sed -i 's|; do php -l \$\${PHP}|; do php -d "extension=iconv.so" -l \$\${PHP}|g' "${srcdir}/${pkgname}-${pkgver}/Makefile"
+ # enable inconv php extension for phpunit
+ sed -i 's|#!/usr/bin/env php$|#!/usr/bin/env php -d "extension=iconv.so"|1' "${srcdir}/${pkgname}-${pkgver}/vendor/phpunit/phpunit/composer/bin/phpunit"
}
+
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
make
}
+
+# phpunit simply runs in an endless loop for >90min without any result...
+# seems to be an upstream bug
+#check() {
+# cd "${srcdir}/${pkgname}-${pkgver}"
+# make test
+#}
+
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
install -D -d m755 "${pkgdir}/usr/share/${pkgname}"
diff --git a/awl.install b/awl.install
index 1acab710108a..7f2be6efd358 100644
--- a/awl.install
+++ b/awl.install
@@ -1,31 +1,14 @@
post_install() {
echo ""
echo "===================================================="
+ echo "To use awl, instruct php to include this directory:"
+ echo " /usr/share/awl/inc"
echo ""
- echo "This package includes a bunch of web libraries, mostly"
- echo "written by Andrew McMillan, and mostly used by PHP things"
- echo "that he wrote."
- echo ""
- echo "They are supposed to be fairly lightweight, and they are"
- echo "intended to simplify things rather than complexify them."
- echo ""
- echo "To use them, you will need to add the path into your PHP"
- echo "application. The recommended way is to do this inside"
- echo "the Apache virtual host, like so:"
- echo ""
+ echo "Apache2 example with local optional override dir:"
echo " php_value include_path ../inc:/usr/share/awl/inc"
echo ""
- echo "Which would include your applications inc directory"
- echo "first, allowing it to override any AWL functionality"
- echo "it wanted to."
- echo ""
echo "Alternatively, add /usr/share/awl/inc under include_path"
echo "in your php.ini file for global availability"
echo "===================================================="
echo ""
}
-
-post_upgrade() {
- post_install
-}
-