summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorwolftankk2017-11-03 20:35:36 +0800
committerwolftankk2017-11-03 20:35:36 +0800
commit8b2c7b9134ec6741f466b4fc23871a71aee0fd83 (patch)
tree3729b101ab04216e9784ee0a569699c284b9e276
downloadaur-8b2c7b9134ec6741f466b4fc23871a71aee0fd83.tar.gz
add php-protobuf 3.4.0
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD73
2 files changed, 89 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..16f65bdb3241
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = php-protobuf
+ pkgdesc = Protobuf for PHP
+ pkgver = 3.4.0
+ pkgrel = 1
+ url = https://github.com/google/protobuf
+ arch = x86_64
+ arch = i686
+ license = PHP
+ makedepends = gcc
+ depends = php
+ backup = etc/php/conf.d/protobuf.ini
+ source = https://github.com/google/protobuf/archive/v3.4.0.tar.gz
+ sha256sums = f6600abeee3babfa18591961a0ff21e7db6a6d9ef82418a261ec4fee44ee6d44
+
+pkgname = php-protobuf
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..939e0e711b73
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,73 @@
+# Maintainer: wolftankk <wolftankk@gmail.com>
+pkgname=php-phalcon
+pkgver=3.2.4
+pkgrel=1
+pkgdesc="Web framework delivered as a C-extension for PHP"
+url="http://phalconphp.com"
+arch=('x86_64' 'i686')
+[[ $CARCH == 'i686' ]] && cd _arch=32bits || _arch=64bits
+license=('PHP')
+depends=('php>=5.5')
+makedepends=('gcc')
+backup=('etc/php/conf.d/phalcon.ini')
+
+source=(
+ "https://github.com/phalcon/cphalcon/archive/v$pkgver.zip"
+)
+
+sha256sums=('d167a79cfdbde08cc532d26ce58e585f08e7c06a62348fea1c212527ae0c19ea')
+
+#get php version
+PHP_FULL_VERSION=`php-config --version`
+if [ "${PHP_FULL_VERSION:0:1}" == "5" ]; then
+ PHP_VERSION="php5"
+else
+ PHP_VERSION="php7"
+fi
+
+build() {
+ cd "$srcdir/cphalcon-$pkgver"
+ #Check best compilation flags for GCC
+ export CC="gcc"
+ export CFLAGS="-march=native -mtune=native -O2 -fomit-frame-pointer"
+ export CPPFLAGS="-DPHALCON_RELEASE"
+ echo "int main() {}" > t.c
+ $CC $CFLAGS t.c -o t 2> t.t
+ if [ $? != 0 ]; then
+ chmod +x gcccpuopt
+ BFLAGS=`./gcccpuopt`
+ export CFLAGS="-O2 -fomit-frame-pointer $BFLAGS"
+ $CC $CFLAGS t.c -o t 2> t.t
+ if [ $? != 0 ]; then
+ export CFLAGS="-O2"
+ fi
+ fi
+
+ if [ $($CC -dumpversion | cut -f1 -d.) -ge 4 ]; then
+ $CC $CFLAGS -fvisibility=hidden t.c -o t 2> t.t && export CFLAGS="$CFLAGS -fvisibility=hidden"
+ fi
+
+ rm -f t.t t.c t
+
+
+ #cd dir
+ cd "$srcdir/cphalcon-$pkgver/build/$PHP_VERSION/$_arch"
+
+ #Clean current compilation
+ if [ -f Makefile ]; then
+ make clean
+ phpize --clean
+ fi
+
+ phpize
+ ./configure --prefix=/usr --enable-phalcon
+ make
+}
+
+package() {
+ cd "$srcdir/cphalcon-$pkgver/build/$PHP_VERSION/$_arch"
+
+ make INSTALL_ROOT="$pkgdir" install
+ echo 'extension=phalcon.so' > phalcon.ini
+ install -Dm644 phalcon.ini "$pkgdir/etc/php/conf.d/phalcon.ini"
+}