summaryrefslogtreecommitdiff
path: root/extra/koffice/PKGBUILD
blob: 8f56a93ed74cceb330113477f6161ce6fd142745 (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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
# $Id: PKGBUILD 133446 2011-07-28 00:46:22Z andrea $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: BlackEagle < ike DOT devolder AT gmail DOT com >

pkgbase=koffice
pkgname=(
	'koffice-filters'
	'koffice-interfaces'
	'koffice-libs'
	'koffice-plugins'
	'koffice-pics'
	'koffice-servicetypes'
	'koffice-templates'
	'koffice-tools'
	'koffice-karbon'
	'koffice-karbon-doc'
#	'koffice-kchart'
#	'koffice-kchart-doc'
	'koffice-kexi'
	'koffice-kexi-doc'
	'koffice-kformula'
	'koffice-kformula-doc'
	'koffice-kounavail'
	'koffice-kplato'
#	'koffice-kplato-doc'
	'koffice-kpresenter'
	'koffice-kpresenter-doc'
	'koffice-krita'
#	'koffice-krita-doc' # no krita-doc anymore upstream
	'koffice-kspread'
	'koffice-kspread-doc'
	'koffice-kword'
#	'koffice-kword-doc' # see http://userbase.kde.org/KWord/Manual for documentation (not supplied by upstream anymore in the sources)
	'koffice-handbook'
	'koffice-thesaurus-doc'
#	'koffice-kdgantt' # still an empty package
)
pkgver=2.3.3
pkgrel=5
arch=('i686' 'x86_64')
url='http://koffice.kde.org'
license=('GPL' 'LGPL' 'FDL')
makedepends=('pkg-config' 'cmake' 'automoc4' 'boost' 'eigen' 'gsl' 'lcms'
             'glew' 'qimageblitz' 'kdepimlibs' 'pstoedit' 'poppler-qt' 'libwpd'
             'libwpg' 'opengtl' 'libkdcraw')
groups=('koffice')
source=("http://download.kde.org/stable/${pkgbase}-${pkgver}/${pkgbase}-${pkgver}.tar.bz2"
        'kde4-koffice-libwpg02.patch' 'gcc46.patch')
sha256sums=('31ba0d98c0d29c7b8ab97efdeb6c618b82177b2b0ec85da088178254da43c099'
            '69106deb4081d71b5bd8f2e4f5af67ca689e4ce9f2bb49c11dbce5fb3409d612'
            'e095c0b2bbedf41da6535a68b2275464dafd3f194566028d0135322f596e4739')

build() {
	cd "${srcdir}/${pkgbase}-${pkgver}"

	patch -p1 -i "${srcdir}/kde4-koffice-libwpg02.patch"
    patch -p1 -i "${srcdir}"/gcc46.patch

	cd "${srcdir}"
	mkdir build
	cd build
	cmake ../${pkgbase}-${pkgver} \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_SKIP_RPATH=ON \
		-DCMAKE_INSTALL_PREFIX=/usr
	make
}

##### 1st package common files, depends, optdepends of the koffice applications #####

package_koffice-filters(){
	pkgdesc="Filters for the KDE office suite"
    optdepends=('libgsf: Microsoft Word document importer' 'libwpd: WordPerfect document importer'
        'libwpg: Corel WordPerfect Graphics image importer' 'pstoedit: Karbon EPS import filter'
        'libkdcraw: support for raw images')
	install=filters.install
        cd "${srcdir}/build/filters"
        make DESTDIR="${pkgdir}" install
}

package_koffice-interfaces(){
	pkgdesc="Interfaces for the KDE office suite"
	depends=('kdelibs' 'koffice-libs')
	cd "${srcdir}/build/interfaces"
	make DESTDIR="${pkgdir}" install
}

package_koffice-libs(){
	pkgdesc="Libs for the KDE office suite"
	depends=('kdepimlibs' 'qca' 'lcms' 'koffice-servicetypes')
        cd "${srcdir}/build/libs"
        make DESTDIR="${pkgdir}" install
}

package_koffice-plugins(){
	pkgdesc="Plugins for the KDE office suite"
	depends=('koffice-libs')
	replaces=('koffice-kchart')
	conflicts=('koffice-kchart')
        cd "${srcdir}/build/plugins"
        make DESTDIR="${pkgdir}" install
}

package_koffice-pics(){
	pkgdesc="Icons for the KDE office suite"
	install=koffice.install
        cd "${srcdir}/build/pics"
        make DESTDIR="${pkgdir}" install
}

package_koffice-servicetypes(){
	pkgdesc="Servicetypes for the KDE office suite"
        cd "${srcdir}/build/servicetypes"
        make DESTDIR="${pkgdir}" install
}

package_koffice-templates(){
	pkgdesc="Templates for the KDE office suite"
        cd "${srcdir}/build/templates"
        make DESTDIR="${pkgdir}" install
}

package_koffice-tools(){
	pkgdesc="Tools for the KDE office suite"
	depends=('koffice-libs')
        cd "${srcdir}/build/tools"
        make DESTDIR="${pkgdir}" install
}

#### package common files done #####

#### package apps and their docs #####

package_koffice-karbon(){
	pkgdesc="Vector drawing application for KDE"
	depends=('hicolor-icon-theme' 'koffice-libs' 'koffice-templates')
        optdepends=('koffice-filters: import/export filters')
	install=koffice.install
        cd "${srcdir}/build/karbon"
        make DESTDIR="${pkgdir}" install
}

package_koffice-karbon-doc(){
	pkgdesc="Documentation for karbon"
        cd "${srcdir}/build/doc/karbon"
        make DESTDIR="${pkgdir}" install
}

package_koffice-kexi(){
        pkgdesc="Integrated data management application for the KDE office suite"
        depends=('kdelibs' 'koffice-libs' 'koffice-kspread' 'sqlite3')
        cd "${srcdir}/build/kexi"
        make DESTDIR="${pkgdir}" install
}

package_koffice-kexi-doc(){
        pkgdesc="Documentation for kexi"
        cd "${srcdir}/build/doc/kexi"
        make DESTDIR="${pkgdir}" install
}

package_koffice-kformula(){
        pkgdesc="Formula editor for the KDE office suite"
		depends=('kdelibs' 'koffice-libs')
        cd "${srcdir}/build/kformula"
        make DESTDIR="${pkgdir}" install
}

package_koffice-kformula-doc() {
	pkgdesc="Documentation for koffice-kformula"
	cd "${srcdir}/build/doc/kformula"
        make DESTDIR="${pkgdir}" install
}


package_koffice-kounavail(){
	pkgdesc="Kounavail for the KDE office suite"
	depends=('kdelibs' 'koffice-libs')
        cd "${srcdir}/build/kounavail"
        make DESTDIR="${pkgdir}" install
}

package_koffice-kplato(){
	pkgdesc="Project management application for KDE"
	depends=('hicolor-icon-theme' 'koffice-libs' 'kdepimlibs' 'koffice-templates' \
		'koffice-plugins' 'koffice-kword')
	install=koffice.install
        cd "${srcdir}/build/kplato"
        make DESTDIR="${pkgdir}" install
}

#package_koffice-kplato-doc(){
#	pkgdesc="Documentation for kplato"
#        cd ${srcdir}/build/doc/kplato
#        make DESTDIR="${pkgdir}" install
#}

package_koffice-kpresenter(){
	pkgdesc="Presentation tool for KDE"
	depends=('hicolor-icon-theme' 'koffice-libs' 'koffice-templates')
        optdepends=('koffice-filters: import/export filters')
	install=koffice.install
        cd "${srcdir}/build/kpresenter"
        make DESTDIR="${pkgdir}" install
}

package_koffice-kpresenter-doc(){
	pkgdesc="Documentation for kpresenter"
        cd "${srcdir}/build/doc/kpresenter"
        make DESTDIR="${pkgdir}" install
}

package_koffice-krita(){
	pkgdesc="Graphics editor for KDE"
	depends=('hicolor-icon-theme' 'glew' 'qimageblitz' 'koffice-libs' \
		'koffice-templates' 'koffice-plugins' 'poppler-qt' 'shared-mime-info' \
		'openexr' 'opengtl')
        optdepends=('koffice-filters: import/export filters')
	install=krita.install
        cd "${srcdir}/build/krita"
        make DESTDIR="${pkgdir}" install
}

#package_koffice-krita-doc(){
#	pkgdesc="Documentation for krita"
#        cd ${srcdir}/build/doc/krita
#        make DESTDIR="${pkgdir}" install
#}


package_koffice-kspread(){
	pkgdesc="Spreadsheet application for KDE"
	depends=('hicolor-icon-theme' 'gsl' 'koffice-libs' 'koffice-templates' 'koffice-plugins')
	optdepends=('koffice-filters: import/export filters')
	install=koffice.install
        cd "${srcdir}/build/kspread"
        make DESTDIR="${pkgdir}" install
}

package_koffice-kspread-doc(){
	pkgdesc="Documentation for kspread"
	cd "${srcdir}/build/doc/kspread"
        make DESTDIR="${pkgdir}" install
}

package_koffice-kword(){
	pkgdesc="Wordprocessor for KDE"
	depends=('hicolor-icon-theme' 'koffice-libs' 'koffice-templates' 'koffice-pics' \
		'koffice-kounavail' 'koffice-plugins')
        optdepends=('koffice-filters: import/export filters')
	install=koffice.install
        cd "${srcdir}/build/kword"
        make DESTDIR="${pkgdir}" install

        # some sed lines to have python2 in extension scripts
        sed -i "s|/usr/bin/env python|/usr/bin/env python2|" "${pkgdir}/usr/share/apps/kword/scripts/extensions/oouno.py"
        sed -i "s|/usr/bin/env python|/usr/bin/env python2|" "${pkgdir}/usr/share/apps/kword/scripts/extensions/importdoxyxml.py"
        sed -i "s|/usr/bin/env python|/usr/bin/env python2|" "${pkgdir}/usr/share/apps/kword/scripts/extensions/onlinehelp.py"
}

#package_koffice-kword-doc(){
#	pkgdesc="Documentation for kword"
#        cd ${srcdir}/build/doc/kword
#        make DESTDIR="${pkgdir}" install
#}

##### package apps done #####

#package_koffice-kchart(){
#	pkgdesc="Charting tool for KDE"
#	depends=('hicolor-icon-theme' 'koffice-interfaces' 'koffice-templates')
#        optdepends=('koffice-filters: import/export filters')
#	install=koffice.install
#        cd "${srcdir}/build/kchart"
#        make DESTDIR="${pkgdir}" install
#}

#package_koffice-kchart-doc(){
#	pkgdesc="Documentation for kchart"
#        cd "${srcdir}/build/doc/kchart"
#        make DESTDIR="${pkgdir}" install
#}

#package_koffice-kdgantt(){
#	pkgdesc="Gantt for KDE"
#        cd "${srcdir}/build/kdgantt"
#        make DESTDIR="${pkgdir}" install
#}

package_koffice-handbook() {
	pkgdesc="Documentation for koffice"
	cd "${srcdir}/build/doc/koffice"
        make DESTDIR="${pkgdir}" install
}

package_koffice-thesaurus-doc(){
	pkgdesc="Documentation for koffice-thesaurus"
	cd "${srcdir}/build/doc/thesaurus"
        make DESTDIR="${pkgdir}" install
}