desktop/calligra/PKGBUILD
2017-03-09 14:11:25 +00:00

178 lines
7.4 KiB
Bash

pkgbase=calligra
pkgname=('calligra-karbon'
'calligra-plan'
'calligra-stage'
'calligra-sheets'
'calligra-words'
'calligra-common')
pkgver=3.0.0
pkgrel=3
arch=('x86_64')
url='http://www.calligra.org'
screenshot=("http://upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Calligra_Stage_2.4.png/800px-Calligra_Stage_2.4.png")
license=('FDL1.2' 'GPL2' 'LGPL')
makedepends=('extra-cmake-modules' 'kdoctools' 'python3' 'kdesignerplugin' 'khtml' 'boost' 'openjpeg'
'libwpg' 'okular' 'eigen3' 'marble' 'pstoedit' 'libvisio' 'libetonyek' 'libodfgen' 'libwps' 'vc'
'kcmutils' 'knotifyconfig' 'kross' 'ktexteditor' 'threadweaver' 'kactivities' 'kdiagram' 'kreport' 'libspnav'
'gsl' 'openexr' 'kcontacts' 'kcalcore' 'qca-qt5' 'poppler-qt5' 'libodfgen' 'qt5-webkit' 'cauchy')
options=("debug")
groups=('calligra')
source=("http://download.kde.org/stable/${pkgbase}-${pkgver}/${pkgbase}-${pkgver}.tar.gz")
md5sums=('e1380e00acb92db59d4a24ee856acaa9')
prepare() {
mkdir -p "${srcdir}"/build
mkdir -p "${srcdir}"/fakeinstall
}
build() {
cd build
cmake "../${pkgbase}-${pkgver}" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib
make DESTDIR="$srcdir/fakeinstall" install
# fakeinstall for preparation of split packages
}
package_calligra-karbon() {
pkgdesc="Vector graphics editor"
depends=('calligra-common'
'hicolor-icon-theme'
'pstoedit')
optdepends=('calligra-extras: extra Calligra utilities')
provides=('karbon')
categories=('graphics')
install=calligra-karbon.install
install -dm755 $pkgdir/{etc/xdg,usr/{bin,lib/qt5/plugins/calligra/parts,share/{applications,kservices5/ServiceMenus/calligra,metainfo,templates,kxmlgui5}}}
cd $srcdir/fakeinstall
mv -v {,$pkgdir/}etc/xdg/karbonrc
mv -v {,$pkgdir/}usr/bin/karbon
mv -v {,$pkgdir/}usr/lib/qt5/plugins/karbon
mv -v {,$pkgdir/}usr/lib/qt5/plugins/calligra/parts/karbonpart.so
mv -v {,$pkgdir/}usr/share/applications/org.kde.karbon.desktop
mv -v {,$pkgdir/}usr/share/karbon
mv -v {,$pkgdir/}usr/share/templates/Illustration.desktop
mv -v {,$pkgdir/}usr/share/metainfo/org.kde.karbon.appdata.xml
mv -v usr/share/kservices5/karbon* $pkgdir/usr/share/kservices5
mv -v {,$pkgdir/}usr/share/kservices5/ServiceMenus/calligra/karbon_print.desktop
mv -v {,$pkgdir/}usr/share/kxmlgui5/karbon
}
package_calligra-plan() {
pkgdesc="Project management application"
depends=('calligra-words' 'hicolor-icon-theme' 'calligra-common')
categories=('office')
install=calligra-plan.install
install -dm755 $pkgdir/{etc/xdg,usr/{bin,lib/qt5/plugins/calligra/parts,share/{applications,kservices5/ServiceMenus/calligra,metainfo,templates,config.kcfg,kxmlgui5}}}
cd $srcdir/fakeinstall
mv -v etc/xdg/calligraplan* $pkgdir/etc/xdg
mv -v usr/bin/calligraplan* $pkgdir/usr/bin/
mv -v {,$pkgdir/}usr/lib/qt5/plugins/calligraplan
mv -v {,$pkgdir/}usr/lib/qt5/plugins/calligra/parts/calligraplanpart.so
mv -v {,$pkgdir/}usr/lib/qt5/plugins/calligraplanworkpart.so
mv -v usr/share/applications/org.kde.calligraplan* $pkgdir/usr/share/applications/
mv -v usr/share/calligraplan* $pkgdir/usr/share/
mv -v {,$pkgdir/}usr/share/metainfo/org.kde.calligraplan.appdata.xml
mv -v usr/share/config.kcfg/calligraplan* $pkgdir/usr/share/config.kcfg/
mv -v usr/share/kxmlgui5/calligraplan* $pkgdir/usr/share/kxmlgui5/
}
package_calligra-sheets() {
pkgdesc="Spreadsheet application"
depends=('calligra-common'
'gsl'
'hicolor-icon-theme')
categories=('office')
install=calligra-sheets.install
install -dm755 $pkgdir/{etc/xdg,usr/{bin,lib/qt5/plugins/calligra/parts,share/{applications,kservices5/ServiceMenus/calligra,metainfo,templates,config.kcfg,kxmlgui5}}}
cd $srcdir/fakeinstall
mv -v {,$pkgdir/}etc/xdg/calligrasheetsrc
mv -v {,$pkgdir/}usr/bin/calligrasheets
mv -v {,$pkgdir/}usr/lib/qt5/plugins/calligrasheets
mv -v {,$pkgdir/}usr/lib/qt5/plugins/calligra/parts/calligrasheetspart.so
mv -v {,$pkgdir/}usr/share/applications/org.kde.calligrasheets.desktop
mv -v {,$pkgdir/}usr/share/calligrasheets
mv -v {,$pkgdir/}usr/share/templates/SpreadSheet.desktop
mv -v {,$pkgdir/}usr/share/metainfo/org.kde.calligrasheets.appdata.xml
mv -v usr/share/kservices5/sheets* $pkgdir/usr/share/kservices5
mv -v {,$pkgdir/}usr/share/kservices5/ServiceMenus/calligra/sheets_print.desktop
mv -v {,$pkgdir/}usr/share/config.kcfg/calligrasheets.kcfg
mv -v {,$pkgdir/}usr/share/kxmlgui5/calligrasheets
}
package_calligra-stage() {
pkgdesc="Presentation application"
depends=('calligra-common'
'hicolor-icon-theme')
categories=('office')
install=calligra-stage.install
install -dm755 $pkgdir/{etc/xdg,usr/{bin,lib/qt5/plugins/calligra/parts,share/{applications,kservices5/ServiceMenus/calligra,metainfo,templates,kxmlgui5}}}
cd $srcdir/fakeinstall
mv -v {,$pkgdir/}etc/xdg/calligrastagerc
# mv -v usr/bin/cst* $pkgdir/usr/bin
mv -v {,$pkgdir/}usr/lib/qt5/plugins/calligrastage
mv -v {,$pkgdir/}usr/lib/qt5/plugins/calligra/parts/calligrastagepart.so
mv -v {,$pkgdir/}usr/share/calligrastage
mv -v {,$pkgdir/}usr/share/templates/Presentation.desktop
mv -v usr/share/kservices5/stage* $pkgdir/usr/share/kservices5
mv -v {,$pkgdir/}usr/share/kxmlgui5/calligrastage
}
package_calligra-words() {
pkgdesc="Word processor"
depends=('calligra-common'
'hicolor-icon-theme')
categories=('office')
install=calligra-words.install
install -dm755 $pkgdir/{etc/xdg,usr/{bin,lib/qt5/plugins/calligra/parts,share/{applications,kservices5/ServiceMenus/calligra,metainfo,templates,kxmlgui5}}}
cd $srcdir/fakeinstall
mv -v {,$pkgdir/}etc/xdg/calligrawordsrc
mv -v {,$pkgdir/}usr/bin/calligrawords
mv -v {,$pkgdir/}usr/lib/qt5/plugins/calligra/parts/calligrawordspart.so
mv -v {,$pkgdir/}usr/share/applications/org.kde.calligrawords_ascii.desktop
mv -v {,$pkgdir/}usr/share/applications/org.kde.calligrawords.desktop
mv -v {,$pkgdir/}usr/share/calligrawords
mv -v {,$pkgdir/}usr/share/templates/TextDocument.desktop
mv -v {,$pkgdir/}usr/share/metainfo/org.kde.calligrawords.appdata.xml
mv -v usr/share/kservices5/words* $pkgdir/usr/share/kservices5
mv -v {,$pkgdir/}usr/share/kservices5/ServiceMenus/calligra/words_print.desktop
mv -v {,$pkgdir/}usr/share/kxmlgui5/calligrawords
}
package_calligra-common() {
pkgdesc="Common files for Calligra"
depends=('icu'
'kactivities'
'marble'
'lcms2'
'libspnav'
'libvisio'
'libodfgen' 'poppler-qt5')
replaces=($pkgbase-{libs,extras,handbook,devtools,gemini,braindump})
conflicts=($pkgbase-{libs,extras,handbook,devtools,gemini,braindump})
options=('!emptydirs' 'docs')
optdepends=('libetonyek: Apple Keynote document importer'
'libgsf: Microsoft Word document importer'
'libkdcraw: support for raw images'
'libvisio: Microsoft Visio document importer'
'libwpg: Corel WordPerfect Graphics image importer'
'libwps: Microsoft Works document importer'
'pstoedit: Karbon EPS import filter')
install=calligra.install
for d in etc usr ; do
mv $srcdir/fakeinstall/$d $pkgdir
done
}