Skip to content

Commit

Permalink
package: added release PKGBUILD.
Browse files Browse the repository at this point in the history
Builds and installs both debug and release libraries.
  • Loading branch information
mosra committed Apr 8, 2014
1 parent 5cb3917 commit eb613eb
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions package/archlinux/PKGBUILD-release
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Author: mosra <[email protected]>
pkgname=magnum-integration
pkgver=dev.release
pkgrel=1
pkgdesc="Integration libraries for Magnum OpenGL graphics engine (debug+release libs)"
arch=('i686' 'x86_64')
url="http://mosra.cz/blog/magnum.php"
license=('MIT')
depends=('magnum' 'bullet')
makedepends=('cmake' 'ninja')
options=('!strip')
provides=('magnum-integration-git')

build() {
mkdir -p "$startdir/build"
cd "$startdir/build"

cmake .. \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=/usr \
-DWITH_BULLET=ON \
-DBUILD_TESTS=ON \
-G Ninja
ninja

mkdir -p "$startdir/build-release"
cd "$startdir/build-release"

cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DWITH_BULLET=ON \
-DBUILD_TESTS=ON \
-G Ninja
ninja
}

check() {
cd "$startdir/build"
ctest --output-on-failure

cd "$startdir/build-release"
ctest --output-on-failure
}

package() {
cd "$startdir/build"
DESTDIR="$pkgdir/" ninja install

cd "$startdir/build-release"
DESTDIR="$pkgdir/" ninja install/strip
}

0 comments on commit eb613eb

Please sign in to comment.