summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2a050e25ac19c8f0c2aa9bf8f56dad7a499a58fa (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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# Maintainer : Yamada Hayao <hayao@fascode.net>
# Contributer: rilian-la-te <ria.freelander@gmail.com>

_disable_mate=false
_disable_xfce=false
_disable_vala=false
_disable_budgie=false

_opts=(
	--prefix=/usr
	--libdir=lib
	--libexecdir=lib
	-Dauto_features=disabled
)

pkgname=('vala-panel-appmenu-common')

makedepends=('meson' 'vala' 'gtk3' 'libwnck3' 'bamf>=0.5.0')

if [[ "${_disable_mate}" = false ]];then
    _opts+=(-Dmate=enabled)
    pkgname+=('vala-panel-appmenu-mate')
    makedepends+=('mate-panel')
    #msg "Mate applet enabled"
fi

if [[ "${_disable_xfce}" = false ]];then
    _opts+=(-Dxfce=enabled)
    pkgname+=('vala-panel-appmenu-xfce')
    makedepends+=('xfce4-panel>=4.11.2' 'xfconf')
    # msg "Xfce applet enabled"
fi

if [[ "${_disable_vala}" = false ]]; then
    _opts+=(-Dvalapanel=enabled)
    pkgname+=('vala-panel-appmenu-valapanel')
    makedepends+=('vala-panel>=0.4.50')
    # msg "Vala Panel applet enabled"
fi

if [[ "${_disable_budgie}" = false ]]; then
    _opts+=(-Dbudgie=enabled)
    pkgname+=('vala-panel-appmenu-budgie')
    makedepends+=('budgie-desktop')
    # msg "Budgie applet enabled"
fi


#msg "If you want to disable an applet, edit pkgbuild variables _disable_[applet]"

_pkgbase="vala-panel-appmenu"
pkgbase="${_pkgbase}"
pkgver="0.7.6"
pkgrel="1"
pkgdesc="AppMenu (Global Menu) plugin"
url="https://gitlab.com/vala-panel-project/vala-panel-appmenu"
arch=('i686' 'x86_64')
license=('LGPL3')

source=("git+https://gitlab.com/vala-panel-project/${_pkgbase}.git#tag=${pkgver}")
sha256sums=('SKIP')

build() {
    meson "${_opts[@]}" build "${srcdir}/${_pkgbase}"
    meson compile -C build
}

package_vala-panel-appmenu-xfce() {
    pkgdesc="AppMenu (Global Menu) plugin for xfce4-panel"
    depends=('gtk3' 'bamf>=0.5.0' 'xfce4-panel>=4.11.2' 'xfconf' 'libwnck3' 'vala-panel-appmenu-common')
    optdepends=(
        'gtk2-ubuntu: for hiding gtk2 menus'
        'unity-gtk-module: for gtk2/gtk3 menus'
        'vala-panel-appmenu-registrar: for DBusMenu registrar' 
        'jayatana: for Java applications support'
        'appmenu-qt4: for qt4 menus'
        'appmenu-qt5: for qt5 menus'
    )
    conflicts=("vala-panel-appmenu-xfce-git")

    DESTDIR="${pkgdir}" meson install -C build
    rm -rf ${pkgdir}/usr/share/{vala-panel,glib-2.0,locale,mate-panel,vala-panel-appmenu}
    rm -rf ${pkgdir}/usr/lib/{mate-panel,vala-panel,budgie-desktop}
}

package_vala-panel-appmenu-valapanel() {
    pkgdesc="AppMenu (Global Menu) plugin for vala-panel"
    depends=('gtk3' 'bamf>=0.5.0' 'vala-panel' 'libwnck3' 'vala-panel-appmenu-common')
    optdepends=(
        'gtk2-ubuntu: for hiding gtk2 menus'
        'unity-gtk-module: for gtk2/gtk3 menus'
        'vala-panel-appmenu-registrar: for DBusMenu registrar' 
        'jayatana: for Java applications support'
        'appmenu-qt4: for qt4 menus'
        'appmenu-qt5: for qt5 menus'
    )
    conflicts=("vala-panel-appmenu-valapanel-git")

    DESTDIR="${pkgdir}" meson install -C build
    rm -rf ${pkgdir}/usr/share/{xfce4,glib-2.0,locale,mate-panel,vala-panel-appmenu}
    rm -rf ${pkgdir}/usr/lib/{mate-panel,xfce4,budgie-desktop}
}

package_vala-panel-appmenu-mate() {
    pkgdesc="AppMenu (Global Menu) plugin for mate-panel"
    depends=('gtk3' 'bamf>=0.5.0' 'mate-panel' 'libwnck3' 'vala-panel-appmenu-common')
    optdepends=(
        'gtk2-ubuntu: for hiding gtk2 menus'
        'unity-gtk-module: for gtk2/gtk3 menus'
        'vala-panel-appmenu-registrar: for DBusMenu registrar' 
        'jayatana: for Java applications support'
        'appmenu-qt4: for qt4 menus'
        'appmenu-qt5: for qt5 menus'
    )
    conflicts=("vala-panel-appmenu-mate-git")

    DESTDIR="${pkgdir}" meson install -C build
    rm -rf ${pkgdir}/usr/share/{vala-panel,glib-2.0,locale,xfce4,vala-panel-appmenu}
    rm -rf ${pkgdir}/usr/lib/{xfce4,vala-panel,budgie-desktop}
}

package_vala-panel-appmenu-budgie() {
    pkgdesc="AppMenu (Global Menu) plugin for budgie-panel"
    depends=('gtk3' 'bamf>=0.5.0' 'budgie-desktop' 'libwnck3' 'vala-panel-appmenu-common')
    optdepends=(
        'gtk2-ubuntu: for hiding gtk2 menus'
        'unity-gtk-module: for gtk2/gtk3 menus'
        'vala-panel-appmenu-registrar: for DBusMenu registrar' 
        'jayatana: for Java applications support'
        'appmenu-qt4: for qt4 menus'
        'appmenu-qt5: for qt5 menus'
    )
    conflicts=("vala-panel-appmenu-budgie-git")

    DESTDIR="${pkgdir}" meson install -C build
    rm -rf "${pkgdir}/usr/share/"
    rm -rf ${pkgdir}/usr/lib/{mate-panel,vala-panel,xfce4}
}

package_vala-panel-appmenu-common() {
    pkgdesc="Translations and common files for Global Menu"
    replaces=('vala-panel-appmenu-translations-git')
    optdepends=(
        'vala-panel-appmenu-xfce'
        'vala-panel-appmenu-valapanel'
        'vala-panel-appmenu-mate'
        'vala-panel-appmenu-budgie'
    )
    conflicts=("vala-panel-appmenu-common-git")
    arch=('any')

    DESTDIR="${pkgdir}" meson install -C build
    rm -rf ${pkgdir}/usr/share/{vala-panel,xfce4,mate-panel}
    rm -rf ${pkgdir}/usr/lib
}