summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8f9480ec84e1571c796e91bc2baf27dd72b2b1ab (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
# Maintainer: Evgeniy "arcanis" Alexeev <arcanis.arch at gmail dot com>

pkgbase=netctl-gui
pkgname=(libnetctlgui netctlgui-helper netctl-gui plasma5-applet-netctl-gui)
pkgver=1.4.9
pkgrel=2
pkgdesc="Qt4/Qt5 GUI for netctl. Also provides a widget for KDE"
arch=(x86_64)
url="https://arcanis.me/projects/netctl-gui"
license=('GPL3')
makedepends=('cmake' 'extra-cmake-modules' 'plasma-framework5' 'qt5-tools')
source=("https://github.com/arcan1s/netctl-gui/releases/download/V.${pkgver}/${pkgbase}-${pkgver}-src.tar.xz")

prepare() {
  rm -rf "${srcdir}/build-"{plasmoid,qt5}
  mkdir "${srcdir}/build-"{plasmoid,qt5}
}

build() {
  cd "${srcdir}/build-plasmoid"
  cmake -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_BUILD_TYPE=Release \
        -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
        -DBUILD_GUI:BOOL=0 \
        -DBUILD_LIBRARY:BOOL=0 \
        -DBUILD_HELPER:BOOL=0 \
        "../${pkgbase}"
  make

  cd "${srcdir}/build-qt5"
  cmake -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_BUILD_TYPE=Release \
        -DBUILD_DATAENGINE:BOOL=0 \
        -DBUILD_PLASMOID:BOOL=0 \
        -DUSE_CAPABILITIES:BOOL=0 \
        "../${pkgbase}"
  make
}

package_plasma5-applet-netctl-gui() {
  pkgdesc="A KF5 plasmoid, which interacts with netctl. A part of netctl-gui"
  depends=('netctl' 'plasma-framework5')
  optdepends=('netctlgui-helper: DBus helper daemon'
              'netctl-gui: graphical front-end'
              'sudo: sudo support')
  install="plasma-netctl-gui.install"

  cd "${srcdir}/build-plasmoid"
  make DESTDIR="${pkgdir}" install
}

package_libnetctlgui() {
  pkgdesc="Qt5 library which interacts with netctl. A part of netctl-gui"
  depends=('netctl' 'qt5-base')
  optdepends=('netctlgui-helper: DBus helper daemon'
              'sudo: sudo support'
              'wpa_supplicant: wifi support')
  provides=('libnetctlgui-qt4')
  conflicts=('libnetctlgui-qt4')

  cd "${srcdir}/build-qt5/netctlgui"
  make DESTDIR="${pkgdir}" install
}

package_netctlgui-helper() {
  pkgdesc="Helper daemon for netctl-gui. A part of netctl-gui"
  depends=("libnetctlgui=${pkgver}")
  provides=('netctlgui-helper-qt4')
  conflicts=('netctlgui-helper-qt4')
  backup=('etc/netctl-gui.conf'
          'etc/dbus-1/system.d/org.netctlgui.helper.conf')
  install="netctlgui-helper.install"

  cd "${srcdir}/build-qt5/helper"
  make DESTDIR="${pkgdir}" install
}

package_netctl-gui() {
  pkgdesc="Qt5 graphical front-end for netctl. A part of netctl-gui"
  depends=("libnetctlgui=${pkgver}" 'xdg-utils')
  optdepends=('plasma5-applet-netctl-gui: KF5 widget'
              'netctlgui-helper: DBus helper daemon')
  provides=('netctl-gui-qt4')
  conflicts=('netctl-gui-qt4')
  install="netctl-gui.install"

  cd "${srcdir}/build-qt5/gui"
  make DESTDIR="${pkgdir}" install
  cd "${srcdir}/build-qt5/resources"
  make DESTDIR="${pkgdir}" install
}

sha256sums=('67bdacdd9d7277ed116db9b40960ff03faa3c6f3c0ddf853b5396cbba567a908')