Last active
August 29, 2015 13:58
-
-
Save jprjr/10287798 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkgname=php-libgit2-git | |
pkgver=20140409 | |
pkgrel=3 | |
pkgdesc="PHP bindings for libgit2 (php-git)" | |
url="https://github.com/libgit2/php-git" | |
license="MIT" | |
arch=('i686' 'x86_64') | |
depends=('php' 'libgit2') | |
conflicts=('php-libgit2') | |
makedepends=('php' 'git' 'cmake') | |
#_gitroot='git://github.com/libgit2/php-git.git' | |
_gitroot='https://github.com/libgit2/php-git.git' | |
_gitname='php-git' | |
source=() | |
md5sums=() | |
build() { | |
unset CFLAGS | |
cd $startdir/src | |
msg "Connecting to github.com GIT server...." | |
if [ -d $startdir/src/$_gitname ] ; then | |
cd php-git && git pull origin | |
git submodule update | |
msg "The local files are updated." | |
else | |
git clone $_gitroot | |
cd php-git | |
git submodule init && git submodule update | |
fi | |
mkdir libgit2/build | |
cd libgit2/build | |
CFLAGS="-fPIC" cmake \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-DBUILD_SHARED_LIBS=OFF \ | |
-DBUILD_CLAR=OFF \ | |
.. | |
CFLAGS="-fPIC" cmake --build . | |
cd $startdir/src/$_gitname | |
mkdir build | |
phpize | |
./configure | |
make | |
} | |
package() { | |
cd $startdir/src/$_gitname | |
make INSTALL_ROOT=${pkgdir} install | |
msg "Rememeber to add 'extension=git2.so' to your php config" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment