Skip to content

Instantly share code, notes, and snippets.

@hdevalence
Created June 3, 2014 20:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hdevalence/30bfe6f3787336df5f68 to your computer and use it in GitHub Desktop.
Save hdevalence/30bfe6f3787336df5f68 to your computer and use it in GitHub Desktop.
osrm pkgbuild
# Maintainer: Henry de Valence <hdevalence@hdevalence.ca>
pkgname=osrm-git
pkgver=20140603
pkgrel=1
pkgdesc="Open-Source Routing Machine"
arch=('i686' 'x86_64')
url="http://project-osrm.org/"
license=('BSD')
depends=('libstxxl' 'protobuf' 'luajit' 'luabind' 'boost-libs' 'libxml2')
makedepends=('git')
# Won't work with Lua 5.2 on my machine -- problems with lua versions
conflicts=('lua')
_gitroot=https://github.com/DennisOSRM/Project-OSRM.git
_gitname=osrm
build() {
cd "$srcdir"
msg "Connecting to GIT server...."
if [[ -d "$_gitname" ]]; then
cd "$_gitname" && git pull origin
msg "The local files are updated."
else
git clone "$_gitroot" "$_gitname"
fi
msg "GIT checkout done or server timeout"
msg "Starting build..."
rm -rf "$srcdir/$_gitname-build"
git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
cd "$srcdir/$_gitname-build"
#
# BUILD HERE
#
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release
make
}
package() {
cd "$srcdir/$_gitname-build/build"
make DESTDIR="$pkgdir/" install
}
# vim:set ts=2 sw=2 et:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment