summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoonas Henriksson2022-08-10 03:11:26 +0300
committerJoonas Henriksson2022-08-10 03:16:26 +0300
commit9ca38c1ab12c5c96303f3376f62f8a3129323dcb (patch)
tree0f933161065b1c1f131522772fe838633fa9d356
parent5d2d326a4bc814e7570f89a457746557f293c56c (diff)
downloadaur-9ca38c1ab12c5c96303f3376f62f8a3129323dcb.tar.gz
Split examples to separate package
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD35
2 files changed, 29 insertions, 12 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1730a65cbc6c..dccf538f0e04 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -20,3 +20,9 @@ pkgbase = glslviewer-git
md5sums = SKIP
pkgname = glslviewer-git
+
+pkgname = glslviewer-examples-git
+ pkgdesc = Console-based GLSL Sandbox for 2D/3D shaders (shader examples)
+ depends =
+ provides = glslviewer-examples
+ conflicts = glslviewer-examples
diff --git a/PKGBUILD b/PKGBUILD
index 75eb8c5db7ec..90f625e7e211 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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"
+}
+