diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 35 |
1 files changed, 23 insertions, 12 deletions
@@ -1,7 +1,8 @@ # Maintainer: Joonas Henriksson <joonas.henriksson at gmail com> # Contributor: Agorgianitis Loukas <agorglouk@gmail.com> -pkgname=glslviewer-git +pkgbase=glslviewer-git +pkgname=('glslviewer-git' 'glslviewer-examples-git') pkgver=2.1.2.r77.g99a990a pkgrel=1 pkgdesc="Console-based GLSL Sandbox for 2D/3D shaders" @@ -10,20 +11,20 @@ url="https://github.com/patriciogonzalezvivo/glslViewer" license=('BSD-3-Clause') depends=('glu' 'glfw-x11' 'ncurses' 'ffmpeg') makedepends=('cmake' 'git') -provides=("${pkgname%-git}") -conflicts=("${pkgname%-git}") -source=("${pkgname%-git}::git+https://github.com/patriciogonzalezvivo/glslViewer" +provides=("${pkgbase%-git}") +conflicts=("${pkgbase%-git}") +source=("${pkgbase%-git}::git+https://github.com/patriciogonzalezvivo/glslViewer" "git+https://github.com/patriciogonzalezvivo/ada") md5sums=('SKIP' 'SKIP') pkgver() { - cd "$srcdir/${pkgname%-git}" + cd "$srcdir/${pkgbase%-git}" git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' } prepare() { - cd "$srcdir/${pkgname%-git}" + cd "$srcdir/${pkgbase%-git}" git submodule init git config submodule.deps/ada.url "$srcdir/ada" git submodule update @@ -31,18 +32,28 @@ prepare() { build() { cmake \ - -S "${pkgname%-git}" \ + -S "${pkgbase%-git}" \ -B build \ -DCMAKE_INSTALL_PREFIX=/usr make -C build } -package() { +package_glslviewer-git() { make install -C build DESTDIR="$pkgdir" - install -D -m644 "${pkgname%-git}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" - mkdir -p "$pkgdir/usr/share/$pkgname/examples/" - cp -R "${pkgname%-git}"/examples/* "$pkgdir/usr/share/$pkgname/examples/" - chmod -R 755 "$pkgdir/usr/share/$pkgname/examples/" + install -D -m644 "${pkgbase%-git}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } + +package_glslviewer-examples-git() { + pkgdesc+=" (shader examples)" + depends=() + provides=("${pkgname%-git}") + conflicts=("${pkgname%-git}") + + install -d -m755 "$pkgdir/usr/share/$pkgname/" + cp -r "${pkgbase%-git}"/examples/* "$pkgdir/usr/share/$pkgname/" + + install -D -m644 "${pkgbase%-git}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} + |