aboutsummaryrefslogtreecommitdiffstats
path: root/community/quassel/APKBUILD
blob: c5f5316adc716f860291498b2d324ba3484a1c61 (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
# Maintainer: Yves Schumann <yves@eisfair.org>

pkgname=quassel
pkgver=0.13.1
pkgrel=3
url="https://www.quassel-irc.org/"
pkgdesc="Distributed IRC client - metapackage"
arch="all"
license="GPL-2.0-or-later"
options="!check"
install="$pkgname-core.pre-install"
pkgusers="quassel"
pkggroups="quassel"
depends="$pkgname-mono"
depends_common=""
depends_client="$pkgname-common"
depends_mono="$pkgname-common"
depends_server="$pkgname-common qt5-qtbase-postgresql qt5-qtbase-sqlite"
depends_server_openrc=""
makedepends="cmake paxmark dbus-dev icu-dev openldap-dev openssl-dev
	qca-dev qt5-qtbase-dev qt5-qtscript-dev zlib-dev
	"
source="https://www.quassel-irc.org/pub/$pkgname-$pkgver.tar.bz2
	quasselcore.confd
	quasselcore.initd
	"
subpackages="$pkgname-common::noarch
	$pkgname-core:server $pkgname-core-openrc:server_openrc
	$pkgname-client $pkgname-mono
	"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	mkdir build

	cd build
	
	CXXFLAGS="-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fPIE -pie -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now" \
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr/ \
		-DCMAKE_BUILD_TYPE="Release" \
		-DUSE_QT4=OFF \
		-DWANT_CORE=ON \
		-DWANT_MONO=ON \
		-DWANT_QTCLIENT=ON \
		-DWITH_KDE=0 \
		-DWITH_WEBKIT=OFF \
		../
	make
}

package() {
	cd "$builddir"

	make -C build DESTDIR="$pkgdir" install/fast
	paxmark -m "$pkgdir"/usr/bin/quasselcore

	install -Dm0644 "$srcdir"/quasselcore.confd \
		"$pkgdir"/etc/conf.d/quasselcore
	install -Dm0755 ${srcdir}/quasselcore.initd \
		"$pkgdir"/etc/init.d/quasselcore
}

common() {
	pkgdesc="Quassel common/shared files"
	depends="$depends_common"

	mkdir -p "$subpkgdir"/usr/share
	mv \
		"$pkgdir"/usr/share/icons \
		"$pkgdir"/usr/share/pixmaps \
		"$pkgdir"/usr/share/$pkgname \
		"$subpkgdir"/usr/share

	rmdir 2>/dev/null "$pkgdir"/usr/share/icons || :
	rmdir 2>/dev/null "$pkgdir"/usr/share/pixmaps || :
	rmdir 2>/dev/null "$pkgdir"/usr/share/$pkgname || :
	rmdir 2>/dev/null "$pkgdir"/usr/share || :
	rmdir 2>/dev/null "$pkgdir"/usr || :
}

server() {
	pkgdesc="Quassel core / server"
	depends="$depends_server"

	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/quasselcore "$subpkgdir"/usr/bin/
}

server_openrc() {
	pkgdesc="Quassel core / server"

	default_openrc
	rmdir 2>/dev/null "$pkgdir"/etc || :

	depends="$depends_server_openrc"
	install_if="openrc $pkgname-core=$pkgver-r$pkgrel"
}

client() {
	pkgdesc="Quassel client"
	depends="$depends_client"

	mkdir -p "$subpkgdir"/usr/bin \
		"$subpkgdir"/usr/share/applications
	mv "$pkgdir"/usr/bin/quasselclient "$subpkgdir"/usr/bin/
	mv "$pkgdir"/usr/share/applications/quasselclient.desktop \
		"$subpkgdir"/usr/share/applications
}

mono() {
	pkgdesc="Quassel monolithic IRC client"
	depends="$depends_mono"

	mkdir -p "$subpkgdir"/usr/bin \
		"$subpkgdir"/usr/share/applications
	mv "$pkgdir"/usr/bin/quassel "$subpkgdir"/usr/bin/
	mv "$pkgdir"/usr/share/applications/quassel.desktop \
		"$subpkgdir"/usr/share/applications

	rmdir 2>/dev/null "$pkgdir"/usr/share/applications || :
	rmdir 2>/dev/null "$pkgdir"/usr/share || :
	rmdir 2>/dev/null "$pkgdir"/usr/bin || :
	rmdir 2>/dev/null "$pkgdir"/usr || :
}

sha512sums="4ed55e81b1638c8851ddae5d9c9d23a1c2cea92f307e19f426873c2600d8e183898d3ed7c290f2ea5d1b8c5e1be7f9ffcc3e8c3c0193d080fc879b10cc3a962c  quassel-0.13.1.tar.bz2
56d4b05fcb2702c103a611a170e444e237bd7c8626219063e5853c3efa5d91e21fa9b726b056393070e35b7d7efe0a145ac3ab61413bc8033642d7acb622b638  quasselcore.confd
7a0dd5a04b28c3099b4c9e98a25e6dc2b72bdb1e450e7299f9556487f6b34748ae881a4ccb955396e2ac0eab5d3fce4dbea426d7fa498d069f5d185057efa4cf  quasselcore.initd"