diff options
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | PKGBUILD | 58 |
2 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c11adbc49123 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = ignition-math-hg + pkgdesc = Math classes and functions for robot applications + pkgver = 2.1.1.434 + pkgrel = 1 + url = https://bitbucket.org/ignitionrobotics/ign-math + arch = i686 + arch = x86_64 + groups = development + license = Apache + makedepends = cmake + makedepends = mercurial + makedepends = ruby-ronn + makedepends = pkg-config>=0.28 + provides = ignition-math2 + replaces = ignition-math2 + source = ignition-math::hg+https://bitbucket.org/ignitionrobotics/ign-math + md5sums = SKIP + +pkgname = ignition-math-hg + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8a79055cb98c --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,58 @@ +# Maintainer: Mykola Dolhyi <0xb000@gmail.com> +pkgname=ignition-math-hg +pkgver=2.1.1.434 +pkgrel=1 +pkgdesc="Math classes and functions for robot applications" +arch=('i686' 'x86_64') +url="https://bitbucket.org/ignitionrobotics/ign-math" +license=('Apache') +groups=('development') +depends=() +makedepends=('cmake' 'mercurial' 'ruby-ronn' 'pkg-config>=0.28') +optdepends=() +provides=('ignition-math2') +conflicts=() +replaces=('ignition-math2') +#changelog= +source=("ignition-math::hg+https://bitbucket.org/ignitionrobotics/ign-math") +#noextract=() +md5sums=('SKIP') +#validpgpkeys=() + +_dir=ignition-math + +pkgver() { + cd "$srcdir/$_dir" + + local project_major="$(sed -n 's/set (PROJECT_MAJOR_VERSION \([0-9]\+\))/\1/p' CMakeLists.txt)" + local project_minor="$(sed -n 's/set (PROJECT_MINOR_VERSION \([0-9]\+\))/\1/p' CMakeLists.txt)" + local project_patch="$(sed -n 's/set (PROJECT_PATCH_VERSION \([0-9]\+\))/\1/p' CMakeLists.txt)" + printf "%s.%s" "${project_major}.${project_minor}.${project_patch}" "$(hg identify -n)" +} + +prepare() { + cd "$srcdir/$_dir" + + # update from repository + hg pull + + mkdir -p build +} + +build() { + cd "$srcdir/$_dir/build" + + # Configure build + cmake .. -DCMAKE_BUILD_TYPE="Release" \ + -DCMAKE_INSTALL_PREFIX="/usr" \ + -DCMAKE_INSTALL_LIBDIR="lib" \ + -DENABLE_TESTS_COMPILATION:BOOL=False + + # Compile + make -j3 +} + +package() { + cd "$srcdir/$_dir/build" + make DESTDIR="$pkgdir/" install +} |