PKGBUILD 2.97 KB
Newer Older
1 2
# Maintainer:   H W Tovetjarn (totte) <totte@tott.es>
# Contributors: Manuel Tortosa <manutortosa@chakra-project@org>
3
#               Andrea Scarpino <andrea@archlinux.org>
Phil's avatar
Phil committed
4

totte's avatar
totte committed
5
# Include global configuration
Phil's avatar
Phil committed
6 7
source ../_buildscripts/${current_repo}-${_arch}-cfg.conf

totte's avatar
totte committed
8
pkgbase='kate'
totte's avatar
totte committed
9 10 11
pkgname=('kdesdk-kate'
         'kde-baseapps-kwrite'
         'kde-baseapps-katepart')
Phil's avatar
Phil committed
12
pkgver=${_kdever}
13
pkgrel=1
Manuel's avatar
Cleanup  
Manuel committed
14
arch=('x86_64')
15 16 17 18 19 20 21 22 23 24 25 26 27
license=('GPL'
         'LGPL'
         'FDL')
makedepends=("kdelibs>=${_kdever}"
             'cmake'
             'automoc4'
             'docbook-xsl'
             "kdebindings-python2>=${_kdever}"
             "kdebindings-python3>=${_kdever}")
options=('docs'
         '!header'
         'debug'
         'log')
totte's avatar
totte committed
28
source=("$_mirror/${pkgbase}-$_kdever.tar.xz"
29
        'pkgbuild-syntax-highlight.patch')
totte's avatar
totte committed
30
sha256sums=(`grep ${pkgbase}-$_kdever.tar.xz  ../checksums.txt | cut -d " " -f1`
totte's avatar
totte committed
31
            'f6a4cc945ceaff04d5882714d19464cc252fe5d56c7b4a42c8b41d8855787fc4')
philm's avatar
philm committed
32

33 34
prepare() {
    mkdir "${srcdir}/build"
totte's avatar
totte committed
35
    cd "${srcdir}/${pkgbase}-${pkgver}"
36 37
    patch -p1 -i "${srcdir}"/pkgbuild-syntax-highlight.patch
}
philm's avatar
philm committed
38 39

build() {
40
    cd "${srcdir}/build"
totte's avatar
totte committed
41
    cmake "../${pkgbase}-${pkgver}" \
42
        -DCMAKE_BUILD_TYPE=${_build_type} \
43
        -DKDE4_BUILD_TESTS=ON \
44 45 46 47 48
        -DCMAKE_INSTALL_PREFIX=${_installprefix} \
        -DCMAKE_{SHARED,MODULE,EXE}_LINKER_FLAGS='-Wl,--no-undefined -Wl,--as-needed'
    make
}

totte's avatar
totte committed
49
package_kde-baseapps-katepart() {
50 51
    pkgdesc='A fast and feature-rich text editor component'
    url='http://kate-editor.org/about-katepart/'
52
    depends=('kdelibs')
totte's avatar
totte committed
53 54 55
    provides=("kdebase-katepart" "kate-syntax-markdown")
    replaces=("kdebase-katepart" "kate-syntax-markdown")
    conflicts=("kdebase-katepart" "kate-syntax-markdown")
56
    install='katepart.install'
Phil's avatar
Phil committed
57

58 59 60
    cd "${srcdir}/build/part"
    make DESTDIR="${pkgdir}" install
}
Phil's avatar
Phil committed
61

totte's avatar
totte committed
62
package_kde-baseapps-kwrite() {
63 64
    pkgdesc='KDE text editor'
    depends=('kde-runtime'
totte's avatar
totte committed
65
             'kde-baseapps-katepart')
66 67
    groups=('kde'
            'kde-uninstall')
68 69 70
    provides=("kdebase-kwrite")
    replaces=("kdebase-kwrite")
    conflicts=("kdebase-kwrite")
71
    url='http://www.kde.org/applications/utilities/kwrite/'
72
    install='kwrite.install'
Phil's avatar
Phil committed
73

74 75
    cd "${srcdir}/build/kwrite"
    make DESTDIR="${pkgdir}" install
Phil's avatar
Phil committed
76

77 78
    cd "${srcdir}/build/doc/kwrite"
    make DESTDIR="${pkgdir}" install
Phil's avatar
Phil committed
79 80
}

totte's avatar
totte committed
81
package_kdesdk-kate() {
82
    pkgdesc='KDE Advanced Text Editor'
83
    depends=('kde-runtime'
totte's avatar
totte committed
84
             'kde-baseapps-katepart'
85 86 87 88
             'qjson')
    groups=('kde'
            'kde-uninstall')
    url='http://www.kde.org/applications/utilities/kate/'
89
    install='kate.install'
totte's avatar
totte committed
90
    optdepends=('kde-baseapps-konsole: Open a terminal in Kate'
91 92
                'kdebindings-python2: Python 2 bindings'
                'kdebindings-python3: Python 3 bindings')
Phil's avatar
Phil committed
93

94 95
    cd "${srcdir}/build/kate"
    make DESTDIR="${pkgdir}" install
Phil's avatar
Phil committed
96

97 98
    cd "${srcdir}/build/doc/kate"
    make DESTDIR="${pkgdir}" install
99

100 101
    cd "${srcdir}/build/addons"
    make DESTDIR="${pkgdir}" install
Phil's avatar
Phil committed
102
}