Created
March 10, 2018 01:04
-
-
Save EndlessEden/6abee9d1549043c74d14463c5077a664 to your computer and use it in GitHub Desktop.
wlc-git: PKGBUILD with static and shared libraries. Split-Package
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkgbase=wlc-git | |
pkgname=('wlc-git' 'wlc-static-git') | |
pkgver=0.0.7.r22.g12ee978 | |
pkgrel=2 | |
pkgdesc='wayland compositor library' | |
url='https://github.com/Cloudef/wlc' | |
arch=('i686' 'x86_64') | |
license=('MIT') | |
options=('debug' '!strip') | |
depends=('wayland' 'pixman' 'libxkbcommon' 'libinput' 'libx11' 'libxcb' 'libgl' | |
'libdrm' 'mesa' 'xcb-util-image' 'xcb-util-wm') | |
makedepends=('git' 'cmake' 'wayland-protocols') | |
source=('git+https://github.com/Cloudef/wlc' | |
'git+https://github.com/Cloudef/chck') | |
sha1sums=('SKIP' 'SKIP') | |
pkgver() { | |
cd wlc | |
git describe --tags --long | sed 's/^v//; s/-/.r/; s/-/./' | |
} | |
prepare() { | |
cd wlc | |
git submodule init | |
git config submodule.lib/chck.url "$srcdir"/chck | |
git submodule update lib/chck | |
} | |
build() { | |
cd wlc | |
cmake -DCMAKE_BUILD_TYPE=Upstream \ | |
-DCMAKE_INSTALL_PREFIX=/usr \ | |
-DCMAKE_INSTALL_LIBDIR=lib | |
make | |
} | |
check() { | |
cd wlc | |
make test | |
} | |
package_wlc-git() { | |
pkgdesc='wayland compositor library. Static Libraries.' | |
optdepends=('wlc-static-git: Static WLC Library.' | |
'opencl-headers: headers necessary for OpenCL development') | |
provides=('wlc' 'wlc-git' 'libwlc.so') | |
conflicts=('wlc') | |
cd wlc | |
make DESTDIR="$pkgdir" install | |
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE | |
} | |
package_wlc-static-git() { | |
pkgdesc='wayland compositor library. Static Libraries.' | |
provides=('wlc-static' 'wlc-static-git' 'libwlc.a') | |
depends=('wlc-git' 'libwlc.so') | |
cd wlc | |
cmake -DCMAKE_BUILD_TYPE=Upstream \ | |
-DCMAKE_INSTALL_PREFIX=/usr \ | |
-DWLC_BUILD_STATIC=ON \ | |
-DCMAKE_INSTALL_LIBDIR=lib | |
make | |
mkdir -p "$pkgdir"/usr/lib | |
cp "$srcdir"/wlc/src/libwlc.a "$pkgdir"/usr/lib/ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment