summaryrefslogtreecommitdiffstats
path: root/main/qt5-qttools/APKBUILD
blob: 68989e09c3285283a09ecb00cbeb8dbff5ee06ef (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=qt5-qttools
pkgver=5.3.1
pkgrel=0
pkgdesc="Qt5 - QtTool components"
url="http://qt-project.org/"
arch="all"
license="LGPLv2 with exceptions or GPLv3 with exceptions"
depends=""
depends_dev="qt5-qtbase-dev"
makedepends="$depends_dev qt5-qtwebkit-dev"
install=""
subpackages="$pkgname-dev qt5-assistant:_assistant qt5-qdbusviewer:_dbusviewer
	qt5-designer-plugin-webkit:_webkit"

_ver=${pkgver/_/-}
_ver=${_ver/beta0/beta}
_ver=${_ver/rc0/rc}
_V=${_ver/rc/RC}
case $pkgver in
*_beta*|*_rc*) _rel=development_releases;;
*) _rel=official_releases;;
esac

source="http://download.qt-project.org/$_rel/qt/${pkgver%.*}/$_ver/submodules/qttools-opensource-src-$_V.tar.xz
	assistant.desktop
	designer.desktop
	linguist.desktop
	qdbusviewer.desktop
	"

_builddir="$srcdir"/qttools-opensource-src-$_V
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	qmake && make || return 1
}

package() {
	cd "$_builddir"
	make install INSTALL_ROOT="$pkgdir" || return 1
	rm "$pkgdir"/usr/lib/*.la || return 1
	for i in $source; do
		case $i in
		*.desktop) install -Dm644 "$srcdir"/$i \
			"$pkgdir"/usr/share/applications/$i || return 1;;
		esac
	done
	# icons
	install -m644 -p -D src/assistant/assistant/images/assistant.png \
		"$pkgdir"/usr/share/icons/hicolor/32x32/apps/assistant-qt5.png \
		|| return 1
	install -m644 -p -D src/assistant/assistant/images/assistant-128.png \
		"$pkgdir"/usr/share/icons/hicolor/128x128/apps/assistant-qt5.png\
		|| return 1
	install -m644 -p -D src/designer/src/designer/images/designer.png \
		"$pkgdir"/usr/share/icons/hicolor/32x32/apps/designer-qt5.png \
		|| return 1
	install -m644 -p -D src/qdbus/qdbusviewer/images/qdbusviewer.png \
		"$pkgdir"/usr/share/icons/hicolor/32x32/apps/qdbusviewer-qt5.png \
		|| return 1
	install -m644 -p -D src/qdbus/qdbusviewer/images/qdbusviewer-128.png \
		"$pkgdir"/usr/share/icons/hicolor/128x128/apps/qdbusviewer-qt5.png \
		|| return 1
	# linguist icons
	for icon in src/linguist/linguist/images/icons/linguist-*-32.png ; do
		size=$(echo ${icon##*/} | cut -d- -f2)
	    install -p -m644 -D ${icon} \
		"$pkgdir"/usr/share/icons/hicolor/${size}x${size}/apps/linguist.png || return 1
	    done
}

_mv_files() {
	local i
	for i in "$@"; do
		mkdir -p "$subpkgdir"/${i%/*}
		mv "$pkgdir"/$i "$subpkgdir"/$i || return 1
	done
}

dev() {
	default_dev
	cd "$pkgdir"
	_mv_files \
		usr/bin/designer \
		usr/bin/lconvert \
		usr/bin/linguist \
		usr/bin/lrelease \
		usr/bin/lupdate \
		usr/bin/pixeltool \
		usr/bin/qcollectiongenerator \
		usr/bin/qhelpconverter \
		usr/bin/qhelpgenerator \
		usr/share/applications/designer* \
		usr/share/applications/linguist* \
		usr/share/icons/hicolor/*/apps/designer* \
		usr/share/icons/hicolor/*/apps/linguist* \
		|| return 1
}

_assistant() {
	pkgdesc="Documentation browser for Qt5"
	cd "$pkgdir"
	_mv_files usr/bin/assist* \
		usr/share/applications/*assistant* \
		usr/share/icons/hicolor/*/apps/assistant* \
		|| return 1
}

_dbusviewer() {
	pkgdesc="D-Bus debugger and viewer"
	cd "$pkgdir"
	_mv_files usr/bin/qdbusviewer* \
		usr/share/applications/qdbusviewer* \
		usr/share/icons/hicolor/*/apps/qdbusviewer* \
		|| return 1
}

_webkit() {
	pkgdesc="Qt5 designer plugin for WebKit"
	cd "$pkgdir"
	_mv_files usr/lib/qt5/plugins/designer/libqwebview.so || return 1
}

md5sums="7264920fc489ac878d40218263df8c4e  qttools-opensource-src-5.3.1.tar.xz
a445c6917086d80f1cfc1e40cb6b0132  assistant.desktop
d457f0a0ad68a3861c3cadefe3b42ded  designer.desktop
668331d9798a0e2b94381efb7be4c513  linguist.desktop
60f6c5d2e7551790665d35778d1640f3  qdbusviewer.desktop"
sha256sums="edf59eeead3c1d202883c2e6091abd1d40ac37b6e6b0e240b29ab75f86c515a7  qttools-opensource-src-5.3.1.tar.xz
1094300e3d69e55eb69d87cbaac6724f68b0618938c6eb1b0ddd22ba99c7f8a2  assistant.desktop
74c2c5d27a1c1ad08ab01122bcf333f75d0a014b4755d3ddd8764c2425f6e320  designer.desktop
1b9ecd839c1a5dfcec87653849287c31bf2f4044300958be802ebb943e896998  linguist.desktop
3da411f79ddc788a6b892ba1d61c0175c629e6e53fb9591a3cb12e4c6d983ac8  qdbusviewer.desktop"
sha512sums="d8097b055c88e8f8cfa2a6c2c973d13827352e3298395b5a2c2d16204a92e5770fbc3ab2325575a80a676016ce699bddfec3616a21ecc1320b1e1ad60eabec93  qttools-opensource-src-5.3.1.tar.xz
005ed6fe50b237e4541c0f30cbd87ec5425eff7e7c8d55d2b9b24ea8469e75e1fc8a3f26296841ab4cbd566517b3f1aa1fa7b36e1a9677d284cfff615fd24614  assistant.desktop
731aae6a0d776c1be5a49dadc5480b205ba5c8e056d108e2bb96a19dd52b6c6ca22387b37505cf97a2575228cd5dd65c773d0fde1c26299e47fdc11a49f651fd  designer.desktop
70943d9ee9ac7ff6281079be14b741095c60428b30b27bafc42a8bb1729a6f7e8e163cff3d2b5d5a66bbdab464816eea479a3f822598ff2fe068d4025652a049  linguist.desktop
46880915dabb1d0e6bc870460cb86ec1b8f4678bda5c1001903281545e8c33752619cbda25d955436f2facedbc0890ebb1c9e71dfe2bd60f1bebfafe68085cd6  qdbusviewer.desktop"