diff options
author | Emmanuel Gil Peyrot | 2018-02-06 12:24:28 +0100 |
---|---|---|
committer | Emmanuel Gil Peyrot | 2018-02-06 12:24:28 +0100 |
commit | 8003a6f8d07b8d26bce77136cf2104d3f68c62af (patch) | |
tree | d5f13060ae90a5db100e740410694cd965c1ca8b | |
parent | 63a4733e0ca8067b3e2f10d658da28a274cf993c (diff) | |
download | aur-8003a6f8d07b8d26bce77136cf2104d3f68c62af.tar.gz |
Reorganise build instructions.
-rw-r--r-- | PKGBUILD | 38 |
1 files changed, 23 insertions, 15 deletions
@@ -19,20 +19,17 @@ source=("$_pkgbase::git+https://github.com/glfw/glfw") md5sums=('SKIP') pkgver() { - cd "$srcdir/$_pkgbase" + cd $_pkgbase git describe --long | sed -r 's/([^-]*-g)/r\1/;s/-/./g' } prepare() { - mkdir -p "$srcdir/$_pkgbase/build-x11" - mkdir -p "$srcdir/$_pkgbase/build-wayland" + mkdir -p $_pkgbase/build-x11 + mkdir -p $_pkgbase/build-wayland } -package_glfw-x11-git() { - depends=('libxi' 'libxrandr' 'libxinerama' 'libxcursor' 'libgl') - pkgdesc="A free, open source, portable framework for OpenGL application development. (git, X11 version)" - - cd "$srcdir/$_pkgbase/build-x11" +build() { + cd $_pkgbase/build-x11 cmake \ -DCMAKE_INSTALL_PREFIX=/usr \ -DBUILD_SHARED_LIBS=ON \ @@ -40,14 +37,9 @@ package_glfw-x11-git() { -DGLFW_BUILD_TESTS=OFF \ -Wno-dev \ .. - make DESTDIR="$pkgdir" install -} + make -package_glfw-wayland-git() { - depends=('wayland' 'libxkbcommon' 'libgl') - pkgdesc="A free, open source, portable framework for OpenGL application development. (git, Wayland version)" - - cd "$srcdir/$_pkgbase/build-wayland" + cd ../build-wayland cmake \ -DCMAKE_INSTALL_PREFIX=/usr \ -DBUILD_SHARED_LIBS=ON \ @@ -56,6 +48,22 @@ package_glfw-wayland-git() { -DGLFW_USE_WAYLAND=ON \ -Wno-dev \ .. + make +} + +package_glfw-x11-git() { + depends=('libxi' 'libxrandr' 'libxinerama' 'libxcursor' 'libgl') + pkgdesc="A free, open source, portable framework for OpenGL application development. (git, X11 version)" + + cd $_pkgbase/build-x11 + make DESTDIR="$pkgdir" install +} + +package_glfw-wayland-git() { + depends=('wayland' 'libxkbcommon' 'libgl') + pkgdesc="A free, open source, portable framework for OpenGL application development. (git, Wayland version)" + + cd $_pkgbase/build-wayland make DESTDIR="$pkgdir" install } |