Skip to content

Commit

Permalink
package/archlinux: add PKGBUILD-release.
Browse files Browse the repository at this point in the history
  • Loading branch information
mosra committed Jun 27, 2020
1 parent 895217d commit 6c525ca
Showing 1 changed file with 98 additions and 0 deletions.
98 changes: 98 additions & 0 deletions package/archlinux/PKGBUILD-release
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# Author: mosra <[email protected]>
pkgname=magnum-examples
pkgver=dev.release
pkgrel=1
pkgdesc="Examples for the Magnum C++11/C++14 graphics engine (debug+release executables)"
arch=('i686' 'x86_64')
url="https://magnum.graphics"
license=('custom:Public Domain')
depends=('magnum' 'magnum-plugins' 'magnum-integration' 'magnum-extras' 'bullet' 'openal' 'glew' 'box2d' 'libdart')
makedepends=('cmake' 'ninja')
options=(!strip)
provides=('magnum-examples-git')

_rootdir=$startdir/../../

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

cmake .. \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=/usr \
-DIMGUI_DIR=/opt/imgui \
-DWITH_ANIMATED_GIF_EXAMPLE=ON \
-DWITH_ARCBALL_EXAMPLE=ON \
-DWITH_AREALIGHTS_EXAMPLE=ON \
-DWITH_AUDIO_EXAMPLE=ON \
-DWITH_BOX2D_EXAMPLE=ON \
-DWITH_BULLET_EXAMPLE=ON \
-DWITH_CUBEMAP_EXAMPLE=ON \
-DWITH_DART_EXAMPLE=ON \
-DWITH_FLUIDSIMULATION2D_EXAMPLE=ON \
-DWITH_FLUIDSIMULATION3D_EXAMPLE=ON \
-DWITH_IMGUI_EXAMPLE=ON \
-DWITH_MOTIONBLUR_EXAMPLE=ON \
-DWITH_MOUSEINTERACTION_EXAMPLE=ON \
-DWITH_OCTREE_EXAMPLE=ON \
-DWITH_PRIMITIVES_EXAMPLE=ON \
-DWITH_PICKING_EXAMPLE=ON \
-DWITH_RAYTRACING_EXAMPLE=ON \
-DWITH_SHADOWS_EXAMPLE=ON \
-DWITH_TEXT_EXAMPLE=ON \
-DWITH_TEXTUREDTRIANGLE_EXAMPLE=ON \
-DWITH_TRIANGLE_EXAMPLE=ON \
-DWITH_TRIANGLE_PLAIN_GLFW_EXAMPLE=ON \
-DWITH_TRIANGLE_SOKOL_EXAMPLE=ON \
-DWITH_TRIANGLE_VULKAN_EXAMPLE=ON \
-DWITH_VIEWER_EXAMPLE=ON \
-G Ninja
ninja

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

cmake .. \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DIMGUI_DIR=/opt/imgui \
-DWITH_ANIMATED_GIF_EXAMPLE=ON \
-DWITH_ARCBALL_EXAMPLE=ON \
-DWITH_AREALIGHTS_EXAMPLE=ON \
-DWITH_AUDIO_EXAMPLE=ON \
-DWITH_BOX2D_EXAMPLE=ON \
-DWITH_BULLET_EXAMPLE=ON \
-DWITH_CUBEMAP_EXAMPLE=ON \
-DWITH_DART_EXAMPLE=ON \
-DWITH_FLUIDSIMULATION2D_EXAMPLE=ON \
-DWITH_FLUIDSIMULATION3D_EXAMPLE=ON \
-DWITH_IMGUI_EXAMPLE=ON \
-DWITH_MOTIONBLUR_EXAMPLE=ON \
-DWITH_MOUSEINTERACTION_EXAMPLE=ON \
-DWITH_OCTREE_EXAMPLE=ON \
-DWITH_PRIMITIVES_EXAMPLE=ON \
-DWITH_PICKING_EXAMPLE=ON \
-DWITH_RAYTRACING_EXAMPLE=ON \
-DWITH_SHADOWS_EXAMPLE=ON \
-DWITH_TEXT_EXAMPLE=ON \
-DWITH_TEXTUREDTRIANGLE_EXAMPLE=ON \
-DWITH_TRIANGLE_EXAMPLE=ON \
-DWITH_TRIANGLE_PLAIN_GLFW_EXAMPLE=ON \
-DWITH_TRIANGLE_SOKOL_EXAMPLE=ON \
-DWITH_TRIANGLE_VULKAN_EXAMPLE=ON \
-DWITH_VIEWER_EXAMPLE=ON \
-G Ninja
ninja
}

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

cd "$_rootdir/build-release"
DESTDIR="$pkgdir/" ninja install

# Install the UNLICENSE because Arch has no pre-defined license for Public
# Domain
install -D -m644 "${_rootdir}/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}

0 comments on commit 6c525ca

Please sign in to comment.