summaryrefslogtreecommitdiff
path: root/libre/quassel/PKGBUILD
blob: 013ca7252036edddb1cf5c164cd1d1fd49e75f81 (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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# Maintainer (arch): Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Vesa Kaihlavirta <vegai@iki.fi>
# Maintainer: bill-auger <bill-auger@programmer.net>


# parabola changes and rationale:
# - repalce qt5-webengine with qt5-webkit (for URL previews)
# - set duckduckgo as default search engine


pkgbase=quassel
pkgname=('quassel-core'
         'quassel-client'
         'quassel-client-qt'
         'quassel-monolithic'
         'quassel-monolithic-qt'
         'quassel-common')
pkgver=0.13.1
pkgrel=9
pkgrel+=.parabola1
pkgdesc="Next-generation distributed IRC client"
arch=('x86_64')
arch+=('armv7h' 'i686')
url="https://quassel-irc.org/"
license=('GPL')
makedepends=('qt5-base' 'qt5-tools' 'qt5-webengine' 'qca' 'qt5-script'
             'qt5-multimedia' 'knotifyconfig' 'sonnet' 'libldap' 'cmake'
             'extra-cmake-modules' 'python' 'hicolor-icon-theme')
makedepends=(${makedepends[*]/qt5-webengine/qt5-webkit})
source=(https://quassel-irc.org/pub/$pkgbase-$pkgver.tar.bz2
        0001-qtui-Set-desktop-file-name.patch
        0002-common-Disable-enum-type-stream-operators-for-Qt-5.1.patch
        0003-Removed-mozilla-IRC-network-from-networks.ini.patch
        0004-This-commit-changes-the-official-Quassel-IRC-channel.patch
        $pkgbase.service
        $pkgbase.sysusers
        $pkgbase.tmpfiles
        $pkgbase.conf)
source+=(9000-search-duck.patch)
sha256sums=('48efee9778743b1db9f44efb91d1c913104db01190c57f2ff57483c39a97e855'
            '7a64214024dc047f35ec8af3c5d543853a5c89c0506766c69c2e1072ca8f5ec7'
            'a1f874558f31c786b2fb483454d14e74a0dfc01382e1ba58bd610a65e02f4df4'
            '0f92f3a51d2e3272d71b21a563047d7fae93bc2dd6676f405a2d63a20d48521b'
            'f59d4138f5fc8c9e84b5626fcbe16eec21b22344dc6c28d784c511677de661e1'
            '5dbe20290f3361b9b7a74a52905137e76b656976febf2d31082a2276f9dcde7f'
            '3c72441a99e2668c6a8a751fa07beeb44f937576c8a1b5f615e4a55f841d93d9'
            '2afd4340c7713f6533e5d175a86b28fd118ecd907776c2b10925d1a4fb31cdca'
            'f3031ea8217e01ba42cea14606169e3e27affa5918968ffd5a03c21ae92fe2b8')
sha256sums+=('3d90a7edfa2b2e27e5f56b25f7583585efbcd35219c04a3bf138d9fe9bb9eab2')


prepare() {
  cd $pkgbase-$pkgver
  patch -Np1 -i ../0001-qtui-Set-desktop-file-name.patch
  patch -Np1 -i ../0002-common-Disable-enum-type-stream-operators-for-Qt-5.1.patch
  patch -Np1 -i ../0003-Removed-mozilla-IRC-network-from-networks.ini.patch
  patch -Np1 -i ../0004-This-commit-changes-the-official-Quassel-IRC-channel.patch

  # parabola patches
  patch -Np1 -i ../9000-search-duck.patch
}

_build() (
  cmake -H$pkgbase-$pkgver -Bbuild-$1 \
    -DCMAKE_INSTALL_PREFIX=/usr/ \
    -DCMAKE_BUILD_TYPE=None \
    -DCMAKE_CXX_FLAGS="$CXXFLAGS -Wno-suggest-override" \
    -DHAVE_SSL=ON \
    "${@:2}" \
    -Wno-dev
  cmake --build build-$1
)

_install() {
  DESTDIR="${pkgdir}" cmake --build build-$1 --target install
}

build() {
  _build core \
    -DWANT_QTCLIENT=OFF \
    -DWANT_MONO=OFF \
    -DWITH_BUNDLED_ICONS=OFF \
    -DWITH_WEBKIT=OFF \
    -DWITH_WEBENGINE=OFF

  _build monolithic \
    -DWANT_CORE=OFF \
    -DWANT_QTCLIENT=OFF \
    -DWITH_WEBKIT=ON \
    -DWITH_WEBENGINE=OFF \
    -DWITH_KDE=ON

  _build monolithic-qt \
    -DWANT_CORE=OFF \
    -DWANT_QTCLIENT=OFF \
    -DWITH_WEBKIT=OFF \
    -DWITH_WEBENGINE=OFF \
    -DCMAKE_DISABLE_FIND_PACKAGE_dbusmenu-qt5=ON \
    -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Multimedia=ON \
    -DCMAKE_DISABLE_FIND_PACKAGE_Phonon4Qt5=ON

  _build client \
    -DWANT_CORE=OFF \
    -DWANT_MONO=OFF \
    -DWITH_WEBKIT=ON \
    -DWITH_WEBENGINE=OFF \
    -DWITH_KDE=ON

  _build client-qt \
    -DWANT_CORE=OFF \
    -DWANT_MONO=OFF \
    -DWITH_WEBKIT=OFF \
    -DWITH_WEBENGINE=OFF \
    -DCMAKE_DISABLE_FIND_PACKAGE_dbusmenu-qt5=ON \
    -DCMAKE_DISABLE_FIND_PACKAGE_Qt5Multimedia=ON \
    -DCMAKE_DISABLE_FIND_PACKAGE_Phonon4Qt5=ON
}

package_quassel-core() {
pkgdesc="Next-generation distributed IRC client - core only"
depends=('icu' 'qca' 'qt5-script' 'libldap')
depends+=(libicuuc.so libicudata.so) # via 'qt5-base' -> libQt5Core.so.N -> libicuuc.so.M -> libicudata.so.M
optdepends=('postgresql: PostgreSQL database support')
backup=(etc/conf.d/quassel)

  _install core

  # Remove unneeded pixmap icons
  rm -r "${pkgdir}"/usr/share

  install -Dm644 $pkgbase.sysusers \
    "${pkgdir}"/usr/lib/sysusers.d/$pkgbase.conf
  install -Dm644 $pkgbase.tmpfiles \
    "${pkgdir}"/usr/lib/tmpfiles.d/$pkgbase.conf
  install -Dm644 $pkgbase.service \
    "${pkgdir}"/usr/lib/systemd/system/$pkgbase.service
  install -Dm644 $pkgbase.conf \
    "${pkgdir}"/etc/conf.d/$pkgbase
}

package_quassel-client() {
pkgdesc="Next-generation distributed IRC client - client only, KDE version"
depends=('quassel-common' 'qt5-base' 'qt5-webengine' 'qt5-multimedia' 'knotifyconfig')
pkgdesc+=" with webkit HTML rendering"
depends=(${depends[*]/qt5-webengine/qt5-webkit})
optdepends=('perl: for builtin /exec scripts')
conflicts=('quassel-client-qt')

  _install client
  install -Dm644 $pkgbase-$pkgver/data/quasselclient.appdata.xml "$pkgdir/usr/share/metainfo/quasselclient.appdata.xml"

  # Split quassel-common
  rm -r "$pkgdir"/usr/share/{icons,knotifications5,pixmaps,quassel}
}

package_quassel-client-qt() {
pkgdesc="Next-generation distributed IRC client - client only, Qt version with reduced deps"
depends=('quassel-common' 'qt5-base' 'qt5-svg' 'sonnet')
optdepends=('perl: for builtin /exec scripts')
conflicts=('quassel-client')
replaces=('quassel-client-small' 'quassel-remote')

  _install client-qt

  # Split quassel-common
  rm -r "$pkgdir"/usr/share/{icons,pixmaps,quassel}

  # Ignore package by AppStream to avoid duplicated IDs
  echo 'X-AppStream-Ignore=true' >> "$pkgdir/usr/share/applications/quasselclient.desktop"
}

package_quassel-monolithic() {
pkgdesc="Next-generation distributed IRC client - monolithic, KDE version"
depends=('quassel-common' 'qt5-base' 'qt5-webengine' 'qt5-multimedia' 'qt5-script' 'qca'
         'knotifyconfig' 'libldap')
pkgdesc+=" with webkit HTML rendering"
depends=(${depends[*]/qt5-webengine/qt5-webkit})
optdepends=('perl: for builtin /exec scripts'
            'postgresql: PostgreSQL database support')
conflicts=('quassel-monolithic-qt')

  _install monolithic
  install -Dm644 $pkgbase-$pkgver/data/quassel.appdata.xml "$pkgdir/usr/share/metainfo/quassel.appdata.xml"

  # Split quassel-common
  mkdir "$srcdir/quassel-common"
  mv "$pkgdir"/usr/share/{icons,knotifications5,pixmaps,quassel} \
     "$srcdir/quassel-common/"
}

package_quassel-monolithic-qt() {
pkgdesc="Next-generation distributed IRC client - monolithic, Qt version with reduced deps"
depends=('quassel-common' 'qca' 'qt5-base' 'qt5-svg' 'qt5-script' 'sonnet')
optdepends=('perl: for builtin /exec scripts'
            'postgresql: PostgreSQL database support')
conflicts=('quassel-monolithic')

  _install monolithic-qt

  # Split quassel-common
  rm -r "$pkgdir"/usr/share/{icons,pixmaps,quassel}

  # Ignore package by AppStream to avoid duplicated IDs
  echo 'X-AppStream-Ignore=true' >> "$pkgdir/usr/share/applications/quassel.desktop"
}

package_quassel-common() {
  pkgdesc="Common files for Quassel"
  depends=('hicolor-icon-theme')

  install -dm755 "$pkgdir/usr/share"
  mv quassel-common/* "$pkgdir/usr/share"
}