summaryrefslogtreecommitdiff
path: root/net-irc/quassel-common/quassel-common-0.12.2.ebuild
blob: f9c85b606f00e8631b3399eefcd8ae757f08fe82 (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
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=5

inherit cmake-utils eutils

EGIT_REPO_URI="git://git.quassel-irc.org/quassel"
[[ "${PV}" == "9999" ]] && inherit git-r3

DESCRIPTION="Qt/KDE IRC client supporting a remote daemon for 24/7 connectivity (common files)"
HOMEPAGE="http://quassel-irc.org/"
MY_P=${P/-common}
[[ "${PV}" == "9999" ]] || SRC_URI="http://quassel-irc.org/pub/${MY_P/_/-}.tar.bz2"

LICENSE="GPL-3"
KEYWORDS="~amd64 ~x86"
SLOT="0"
IUSE="kde"

RDEPEND="kde? (
	|| ( kde-apps/oxygen-icons kde-base/oxygen-icons:4 ) )"
DEPEND="${RDEPEND}
		!<net-irc/quassel-${PV}
		!<net-irc/quassel-client-${PV}"
		# -core(-bin) does not depend on it

S="${WORKDIR}/${MY_P/_/-}"

src_configure() {
	cmake-utils_src_configure
}

src_compile() {
	cmake-utils_src_make po
}

src_install() {
	# cmake-utils_src_install

	local mypath

	dodoc ChangeLog AUTHORS

	# /usr/share/icons/hicolor
	for mypath in icons/hicolor/*/*/quassel*.png; do
		if [ -f "${mypath}" ]; then
			insinto "/usr/share/${mypath%/*}"
			doins "${mypath}" || die "doins for icon failed"
		fi
	done

	# /usr/share/apps/quassel/icons/oxygen
	if ! use kde; then
		dodoc icons/README.Oxygen
		local mydest
		for mydest in COPYING AUTHORS CONTRIBUTING; do
			newdoc "icons/oxygen/${mydest}" "${mydest}.Oxygen"
		done

		for mypath in icons/oxygen{,_kde}/*/*/*.{svgz,png}; do
			if [ -f "${mypath}" ]; then
				mydest=${mypath/oxygen_kde/oxygen}
				insinto "/usr/share/apps/quassel/${mydest%/*}"
				doins "${mypath}" || die "doins for Oxygen icon failed"
			fi
		done
	fi

	doicon icons/oxygen_kde/48x48/apps/quassel.png

	# /usr/share/apps/quassel/stylesheets
	for mypath in data/stylesheets/*.qss; do
		if [ -f "${mypath}" ]; then
			insinto /usr/share/apps/quassel/stylesheets
			doins "${mypath}" || die "doins for .qss file failed"
		fi
	done

	# /usr/share/apps/quassel/scripts
	for mypath in data/scripts/*; do
		if [ -f "${mypath}" ]; then
			insinto /usr/share/apps/quassel/scripts
			doins "${mypath/$CMAKE_BUILD_DIR}" || die "doins for script failed"
		fi
	done

	# /usr/share/apps/quassel/translations
	for mypath in "${CMAKE_BUILD_DIR}"/po/*.qm; do
		insinto /usr/share/apps/quassel/translations
		doins "${mypath}" || die "doins for .qm file failed"
	done

	insinto /usr/share/apps/quassel
	doins data/networks.ini

	use kde && doins data/quassel.notifyrc
}