summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4e7a5fecea515f0c934251144cdff58be679abe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Contributor: Bruno Ancona <bruno at powerball253 dot com>
# Maintainer: Eragon <eragon at eragon dot re>

pkgname=waybar-hyprland-no-systemd
_pkgname=Waybar
pkgver=0.9.17
pkgrel=0
pkgdesc='Highly customizable Wayland bar for Sway and Wlroots based compositors, with workspaces support for Hyprland, without systemd dependency'
arch=('any')
url='https://github.com/Alexays/Waybar/'
license=('MIT')
provides=('waybar')
conflicts=('waybar')
depends=(
    'gtkmm3'
    'libjsoncpp.so'
    'libsigc++'
    'fmt'
    'jack' 'libjack.so'
    'wayland'
    'libdate-tz.so'
    'libspdlog.so'
    'gtk-layer-shell'
    'libupower-glib.so'
    'upower'
    'libevdev'
    'libinput'
    'libpulse'
    'libnl'
    'libappindicator-gtk3'
    'libdbusmenu-gtk3'
    'libmpdclient'
    'libsndio.so'
    'libxkbcommon'
    'wireplumber')
makedepends=(
    'cmake'
    'catch2'
    'meson'
    'scdoc'
    'wayland-protocols')
backup=(
    etc/xdg/waybar/config
    etc/xdg/waybar/style.css)
optdepends=('otf-font-awesome: Icons in the default configuration')
source=("https://github.com/Alexays/Waybar/archive/$pkgver.tar.gz"
        meson-build.patch
        meson_options.patch)
sha256sums=('da6f448be343a593ee092486fb4744502aa1e6ad85f4eccc3670d0b84a2a4266'
            '2a403854363b08024f446d17c6056a9a6ae61364f4c14c8f9b4c972d07dab78b'
            '146d1d8b0bc8216b7d29f93f934c4a3716ec091e1dd140b68e79aa487d28afa1')

prepare() {
    cd "${srcdir}/${_pkgname}-${pkgver}"
    patch -p1 < ../meson-build.patch
    patch -p1 < ../meson_options.patch
}

build() {
    cd "${srcdir}/${_pkgname}-${pkgver}"

    sed -i 's/zext_workspace_handle_v1_activate(workspace_handle_);/const std::string command = "hyprctl dispatch workspace " + name_;\n\tsystem(command.c_str());/g' src/modules/wlr/workspace_manager.cpp # use hyprctl to switch workspaces
	sed -i '10 i #include <stdexcept>\n#include <string>' include/modules/sway/ipc/client.hpp

    meson --prefix=/usr \
          --buildtype=plain \
          --auto-features=enabled \
          --wrap-mode=nodownload \
          -Dtests=disabled \
          build
    meson configure -Dexperimental=true build
    ninja -C build
}

package() {
    cd "${srcdir}/${_pkgname}-${pkgver}"

    DESTDIR="$pkgdir" ninja -C build install
    install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}