From 948d557b4a61dc14722668b6b11a4cf3cee07b01 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 13 Sep 2019 17:56:30 +0100 Subject: gentoo resync : 13.09.2019 --- .../libreoffice-voikko-5.0.ebuild | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 app-office/libreoffice-voikko/libreoffice-voikko-5.0.ebuild (limited to 'app-office/libreoffice-voikko/libreoffice-voikko-5.0.ebuild') 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 +} -- cgit v1.2.3