Update meson build script and follow packaging recommendations

This commit is contained in:
Antonin Décimo 2021-02-16 01:04:31 +01:00
parent c74ce3241e
commit e2cf7d6c54
2 changed files with 12 additions and 16 deletions

View file

@ -1,14 +1,13 @@
pkgbase = sway-git pkgbase = sway-git
pkgdesc = Tiling Wayland compositor and replacement for the i3 window manager pkgdesc = Tiling Wayland compositor and replacement for the i3 window manager
pkgver = r6506.1be66c98 pkgver = r6607.28cadf55
pkgrel = 2 pkgrel = 1
url = https://swaywm.org url = https://swaywm.org
arch = i686 arch = i686
arch = x86_64 arch = x86_64
license = MIT license = MIT
makedepends = git makedepends = git
makedepends = meson makedepends = meson
makedepends = ninja
makedepends = scdoc makedepends = scdoc
makedepends = wayland-protocols makedepends = wayland-protocols
depends = cairo depends = cairo

View file

@ -2,14 +2,13 @@
# Contributor: Antonin Décimo <antonin dot decimo at gmail dot com> # Contributor: Antonin Décimo <antonin dot decimo at gmail dot com>
pkgname=sway-git pkgname=sway-git
_pkgname=sway _pkgname=sway
pkgver=r6506.1be66c98 pkgver=r6607.28cadf55
pkgrel=2 pkgrel=1
license=("MIT") license=("MIT")
pkgdesc="Tiling Wayland compositor and replacement for the i3 window manager" pkgdesc="Tiling Wayland compositor and replacement for the i3 window manager"
makedepends=( makedepends=(
"git" "git"
"meson" "meson"
"ninja"
"scdoc" "scdoc"
"wayland-protocols" "wayland-protocols"
) )
@ -42,8 +41,8 @@ arch=("i686" "x86_64")
url="https://swaywm.org" url="https://swaywm.org"
source=("${pkgname%-*}::git+https://github.com/swaywm/sway.git" source=("${pkgname%-*}::git+https://github.com/swaywm/sway.git"
50-systemd-user.conf) 50-systemd-user.conf)
sha512sums=("SKIP" sha512sums=('SKIP'
"57590bc0d14c87289a4a9cd67991c6a841e54244d2a6186b5da5a08e633de2e8631959fa8c77ede211b0a5f315d920f2c1350951a53d6f2e9e81859056cb3c9e") '57590bc0d14c87289a4a9cd67991c6a841e54244d2a6186b5da5a08e633de2e8631959fa8c77ede211b0a5f315d920f2c1350951a53d6f2e9e81859056cb3c9e')
provides=("sway") provides=("sway")
conflicts=("sway") conflicts=("sway")
options=(debug) options=(debug)
@ -54,22 +53,20 @@ pkgver() {
} }
build() { build() {
cd "$_pkgname" arch-meson \
meson \ -Dsd-bus-provider=libsystemd \
-Dwerror=false \ -Dwerror=false \
--prefix /usr \ "$_pkgname" build
"$srcdir/build" meson compile -C build
ninja -C "$srcdir/build"
} }
package() { package() {
install -Dm644 50-systemd-user.conf -t "$pkgdir/etc/sway/config.d/" install -Dm644 50-systemd-user.conf -t "$pkgdir/etc/sway/config.d/"
DESTDIR="$pkgdir" meson install -C build
cd "$_pkgname" cd "$_pkgname"
DESTDIR="$pkgdir" ninja -C "$srcdir/build" install
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
for util in autoname-workspaces.py inactive-windows-transparency.py grimshot; do for util in autoname-workspaces.py inactive-windows-transparency.py grimshot; do
install -Dm755 "contrib/$util" -t "$pkgdir/usr/share/$pkgname/scripts" install -Dm755 "contrib/$util" -t "$pkgdir/usr/share/$pkgname/scripts"
done done