summaryrefslogtreecommitdiff
path: root/user/kate/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'user/kate/APKBUILD')
-rw-r--r--user/kate/APKBUILD46
1 files changed, 44 insertions, 2 deletions
diff --git a/user/kate/APKBUILD b/user/kate/APKBUILD
index c8f60ad89..d7721313e 100644
--- a/user/kate/APKBUILD
+++ b/user/kate/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=kate
pkgver=17.08.1
-pkgrel=0
+pkgrel=1
pkgdesc="Advanced text editor with autocomplete, syntax highlighting, and more"
url="https://kate-editor.org/"
arch="all"
@@ -14,7 +14,8 @@ makedepends="$depends_dev cmake extra-cmake-modules qt5-qtbase-dev python3
kiconthemes-dev kdoctools-dev kwallet-dev kservice-dev kitemmodels-dev
knewstuff-dev threadweaver-dev libgit2-dev"
install=""
-subpackages="$pkgname-doc $pkgname-lang $pkgname-project"
+subpackages="kwrite kwrite-doc:kwrite_doc kwrite-lang:kwrite_lang
+ $pkgname-doc $pkgname-lang $pkgname-project"
source="http://download.kde.org/stable/applications/$pkgver/src/kate-$pkgver.tar.xz"
builddir="$srcdir/kate-$pkgver"
@@ -51,4 +52,45 @@ project() {
"$subpkgdir"/usr/lib/qt5/plugins/ktexteditor/
}
+kwrite() {
+ pkgdesc="Simple GUI text editor"
+ mkdir -p "$subpkgdir"/usr/bin
+ mv "$pkgdir"/usr/bin/kwrite "$subpkgdir"/usr/bin/
+
+ mkdir -p "$subpkgdir"/usr/share/metainfo
+ mv "$pkgdir"/usr/share/metainfo/org.kde.kwrite.appdata.xml \
+ "$subpkgdir"/usr/share/metainfo/
+
+ mkdir -p "$subpkgdir"/usr/share/applications
+ mv "$pkgdir"/usr/share/applications/org.kde.kwrite.desktop \
+ "$subpkgdir"/usr/share/applications/
+}
+
+kwrite_doc() {
+ local _langpath
+
+ pkgdesc="Simple GUI text editor (documentation)"
+ install_if="docs kwrite=$pkgver-r$pkgrel"
+ for _langpath in "$pkgdir"/usr/share/doc/HTML/*; do
+ local _sublangpath=${_langpath/"$pkgdir"/"$subpkgdir"}
+ if [ -d "$_langpath"/kwrite ]; then
+ mkdir -p "$_sublangpath"
+ mv "$_langpath"/kwrite "$_sublangpath"/
+ fi
+ done
+}
+
+kwrite_lang() {
+ local _langpath
+
+ pkgdesc="Simple GUI text editor (translations)"
+ for _langpath in "$pkgdir"/usr/share/locale/*/LC_MESSAGES; do
+ local _sublangpath=${_langpath/"$pkgdir"/"$subpkgdir"}
+ if [ -f "$_langpath"/kwrite.mo ]; then
+ mkdir -p "$_sublangpath"
+ mv "$_langpath"/kwrite.mo "$_sublangpath"/
+ fi
+ done
+}
+
sha512sums="19e6434fad31d420a5742cf0f0f4f1c8718ea6efdb3132d9c3157d9b083a388d26f347dc70c19b55cf6d65747e3ef98eaf9ee18da5efe8872e73b36d630430fa kate-17.08.1.tar.xz"