summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoonas Niilola <juippis@gentoo.org>2019-09-08 09:54:58 +0300
committerJoonas Niilola <juippis@gentoo.org>2019-09-08 09:54:58 +0300
commitfc4d0b573010a14bc2f5e301185ef05b72b41a86 (patch)
tree88db10d8464201a89f7467d09fa8ff80edfe1012 /app-office/libreoffice-voikko
parentdev-libs/voikko-fi: new package (diff)
downloadgentoo-fc4d0b573010a14bc2f5e301185ef05b72b41a86.tar.gz
gentoo-fc4d0b573010a14bc2f5e301185ef05b72b41a86.tar.bz2
gentoo-fc4d0b573010a14bc2f5e301185ef05b72b41a86.zip
app-office/libreoffice-voikko: new package
- Free Finnish spell checking and hyphenation for LibreOffice Package-Manager: Portage-2.3.75, Repoman-2.3.17 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'app-office/libreoffice-voikko')
-rw-r--r--app-office/libreoffice-voikko/Manifest1
-rw-r--r--app-office/libreoffice-voikko/libreoffice-voikko-5.0.ebuild56
-rw-r--r--app-office/libreoffice-voikko/metadata.xml8
3 files changed, 65 insertions, 0 deletions
diff --git a/app-office/libreoffice-voikko/Manifest b/app-office/libreoffice-voikko/Manifest
new file mode 100644
index 000000000000..aeec9c2c8766
--- /dev/null
+++ b/app-office/libreoffice-voikko/Manifest
@@ -0,0 +1 @@
+DIST libreoffice-voikko-5.0.tar.gz 51882 BLAKE2B c4d33f469821b3d3ee15f71c21a2e3fd5474939dda204873e85d9e52aee0d1cd9c01f660d63fdbef87786dbb0b8a88ba4fd45b8aff07b0b35588c9933d4c9cef SHA512 58f139c190acf5c56a8506365c296d06efd95b4422bb66c50e8058231bd10410b202d2a01ad0a2bf82dc0f41565c1e3a07ed86a4ae070d32af8cfd0e56d7eec0
diff --git a/app-office/libreoffice-voikko/libreoffice-voikko-5.0.ebuild b/app-office/libreoffice-voikko/libreoffice-voikko-5.0.ebuild
new file mode 100644
index 000000000000..407d34087ed9
--- /dev/null
+++ b/app-office/libreoffice-voikko/libreoffice-voikko-5.0.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Free Finnish spell checking and hyphenation for LibreOffice"
+HOMEPAGE="https://voikko.puimula.org/"
+SRC_URI="https://www.puimula.org/voikko-sources/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="app-office/libreoffice[odk]
+ dev-libs/voikko-fi"
+RDEPEND="${DEPEND}
+ dev-libs/libvoikko"
+
+src_compile() {
+ emake oxt
+}
+
+src_install() {
+ einstalldocs
+
+ emake DESTDIR="${D}/usr/$(get_libdir)/${P}" install-unpacked
+
+ insinto /usr/$(get_libdir)/libreoffice/share/extension/install/
+ doins build/voikko.oxt
+}
+
+pkg_postinst() {
+ # Register voikko with libreoffice
+ COMPONENT="${ROOT}/usr/$(get_libdir)/libreoffice/share/extension/install/voikko.oxt"
+
+ einfo "Trying to register ${COMPONENT} ..."
+ unopkg add --shared "${COMPONENT}"
+ if [[ $? == 0 ]] ; then
+ einfo "${PN} registered succesfully with LibreOffice."
+ else
+ eerror "Couldn’t register ${PN} with LibreOffice."
+ fi
+}
+
+pkg_prerm() {
+ # Remove voikko registration from libreoffice
+ unopkg remove --shared org.puimula.ooovoikko
+ if [[ $? == 0 ]] ; then
+ einfo "${PN} removed succesfully from LibreOffice."
+ else
+ eerror "Couldn't remove ${PN} from LibreOffice, "
+ eerror "manual removal might be needed with "
+ eerror " unopkg list --shared"
+ eerror " unopkg remove --shared VOIKKO-IDENTIFIER"
+ fi
+}
diff --git a/app-office/libreoffice-voikko/metadata.xml b/app-office/libreoffice-voikko/metadata.xml
new file mode 100644
index 000000000000..6b0a0fb3a729
--- /dev/null
+++ b/app-office/libreoffice-voikko/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>juippis@gentoo.org</email>
+ <name>Joonas Niilola</name>
+ </maintainer>
+</pkgmetadata>