summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Trubach2018-02-21 02:57:13 +0300
committerIvan Trubach2018-02-21 02:57:13 +0300
commitd518efb8e00fcc067f2dd30b77d5ee703474ebbd (patch)
tree51e931ed00fb5739a834d960f89ae0ce1ecf9393
downloadaur-d518efb8e00fcc067f2dd30b77d5ee703474ebbd.tar.gz
shared and static builds, commit pinning
-rw-r--r--.SRCINFO32
-rw-r--r--PKGBUILD71
2 files changed, 103 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ada5eff8fd7f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,32 @@
+pkgbase = wlroots-full-git
+ pkgdesc = A modular Wayland compositor library (static and shared libs, all features enabled)
+ pkgver = r1924.2e7d886
+ pkgrel = 1
+ url = https://github.com/swaywm/wlroots
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ makedepends = meson
+ makedepends = pkg-config
+ depends = wayland
+ depends = wayland-protocols
+ depends = libdrm
+ depends = opengl-driver
+ depends = pixman
+ depends = libx11
+ depends = libxcb
+ depends = libxkbcommon
+ depends = xcb-util-image
+ depends = xcb-util-wm
+ depends = libinput
+ depends = libcap
+ depends = udev
+ depends = systemd
+ provides = wlroots
+ conflicts = wlroots
+ options = staticlibs
+ source = wlroots-full-git::git+https://github.com/swaywm/wlroots
+ sha512sums = SKIP
+
+pkgname = wlroots-full-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..194d66e4ee7e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,71 @@
+# Maintainer: Ivan Trubach <dev@b1nary.tk>
+
+pkgname=wlroots-full-git
+pkgver=r1924.2e7d886
+pkgrel=1
+license=('MIT')
+pkgdesc='A modular Wayland compositor library (static and shared libs, all features enabled)'
+url='https://github.com/swaywm/wlroots'
+arch=(x86_64)
+provides=(wlroots)
+conflicts=(wlroots)
+options=(staticlibs)
+depends=(wayland wayland-protocols
+ libdrm opengl-driver pixman
+ libx11 libxcb libxkbcommon
+ xcb-util-image xcb-util-wm
+ libinput
+ libcap udev systemd)
+makedepends=(git meson pkg-config)
+source=("$pkgname::git+$url")
+sha512sums=(SKIP)
+
+pkgver() {
+ cd "$pkgname"
+ ( set -o pipefail
+ git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+prepare() {
+ cd "$pkgname"
+ git checkout -q 2e7d8862549a786c5aafcbe20db290377e3228ac
+}
+
+build() {
+ cd "$pkgname"
+ for lib in shared static
+ do
+ meson build/$lib \
+ -Denable_libcap=true \
+ -Denable_systemd=true \
+ -Denable_xwayland=true \
+ -Denable_elogind=false \
+ --prefix="/usr" \
+ --sysconfdir="/etc" \
+ --localstatedir="/var" \
+ --mandir="/usr/share/man" \
+ --infodir="/usr/share/info" \
+ --backend=ninja \
+ --buildtype=release \
+ --default-library=$lib
+ # --default-library=both
+ # See https://github.com/mesonbuild/meson/issues/484
+ # https://github.com/mesonbuild/meson/pull/2711
+ # so for now we'll just build the project twice
+ ninja -C build/$lib
+ done
+}
+
+package() {
+ cd "$pkgname"
+
+ export DESTDIR="$pkgdir"
+ for lib in shared static
+ do
+ ninja -C build/$lib install
+ done
+
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}