summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorwolftankk2017-11-03 20:44:46 +0800
committerwolftankk2017-11-03 20:44:46 +0800
commitdd69c51aadaf42600f25b07a3a7dccc2dee23908 (patch)
tree016239b92de571db811f7b0efca9bc41b8d4137a
parent8b2c7b9134ec6741f466b4fc23871a71aee0fd83 (diff)
downloadaur-dd69c51aadaf42600f25b07a3a7dccc2dee23908.tar.gz
fix pkgbuild
-rw-r--r--PKGBUILD72
1 files changed, 17 insertions, 55 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 939e0e711b73..0c9eb54ca65f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,73 +1,35 @@
# 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"
+pkgname=php-protobuf
+pkgver=3.4.0
+pkgrel=2
+pkgdesc="Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data."
+url="https://pecl.php.net/package/protobuf"
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')
+depends=(
+ 'php'
+ 'protobuf'
+)
+backup=('etc/php/conf.d/protobuf.ini')
source=(
- "https://github.com/phalcon/cphalcon/archive/v$pkgver.zip"
+ "http://pecl.php.net/get/protobuf-${pkgver}.tgz"
)
-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
+sha256sums=('510d8ea544e3d5fc44fa5d13f6db5dd7af3e292aee66f90409f95f4450414a71')
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
+ cd "$srcdir/protobuf-$pkgver/"
phpize
- ./configure --prefix=/usr --enable-phalcon
+ ./configure --prefix=/usr
make
}
package() {
- cd "$srcdir/cphalcon-$pkgver/build/$PHP_VERSION/$_arch"
+ cd "$srcdir/protobuf-$pkgver/"
make INSTALL_ROOT="$pkgdir" install
- echo 'extension=phalcon.so' > phalcon.ini
- install -Dm644 phalcon.ini "$pkgdir/etc/php/conf.d/phalcon.ini"
+ echo 'extension=protobuf.so' > protobuf.ini
+ install -Dm644 protobuf.ini "$pkgdir/etc/php/conf.d/protobuf.ini"
}