[opensuse-packaging] packaging openoffice extensions oxt
Dear all, does anyone have experience packaging openoffice extensions? - althogh it might not be a bad idea to package openoffice extentions in general for system wide installation and usage - in this case, I only need it for one/two required extensions. Apparently, something like that exists in ubuntu. Telling from what I found the following might be possible: - set requirement to have openoffice installed - take the oxt file and copy it to the machine - take the correct path and install oxt with the opensuse packager on the command line called unopkg - call: /path/to/unopkg add --shared my-extension.oxt oxt files are renamed zip archives, so in another scenario one could just rename the archive, extract it and install the files in the right location ... but I'm not sure how to register the extension. Please share your idea/experience. cheers, Denny -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
Dear Benny, better late than newer ;-) Denny Beyer píše v St 25. 08. 2010 v 07:25 +0200:
Dear all,
does anyone have experience packaging openoffice extensions? - althogh it might not be a bad idea to package openoffice extentions in general for system wide installation and usage - in this case, I only need it for one/two required extensions. Apparently, something like that exists in ubuntu.
Telling from what I found the following might be possible:
- set requirement to have openoffice installed - take the oxt file and copy it to the machine - take the correct path and install oxt with the opensuse packager on the command line called unopkg - call: /path/to/unopkg add --shared my-extension.oxt
oxt files are renamed zip archives, so in another scenario one could just rename the archive, extract it and install the files in the right location ... but I'm not sure how to register the extension.
You might take inspiration in the OpenOffice_org-extensions source package. You might find the last one at http://download.opensuse.org/repositories/OpenOffice.org:/UNSTABLE/openSUSE_... Heh, I see that I do not use the PreReq there by mistake. Basically you need to Prereq the package that is needed for registration. In theory in might be enough to PreReq: OpenOffice_org-libs-core , which provides the unopkg tool Also you should require the package needed to use the functionality. I suggest to require OpenOffice_org for generic extensions, OpenOffice_org-writer for Writer extensions, ... You should install arch dependent extensions into %_libdir/ooo3/share/extension/install/ and arch independent (java) extensions into %_datadir/ooo3/share/extension/install/ Finally, you need to add some %post... script to register and unregister the extension. The following code seems to work reliably: %pre -n OpenOffice_org-calc-extensions if test $1 -gt 1 ; then echo "Unregistering the older OpenOffice.org Calc extensions..." if unopkg list --shared | grep -q "org.numbertext-calc-addin" ; then unopkg remove --shared "org.numbertext-calc-addin" || true; fi # clear disk cache unopkg list --shared > /dev/null 2>&1 || true fi %post -n OpenOffice_org-calc-extensions echo "Registering OpenOffice.org Calc extensions..." unopkg add --shared --force %ooo_prefix/% ooo_home/share/extension/install/numbertext-%{numbertext_version}.oxt || true; %preun -n OpenOffice_org-calc-extensions if test $1 = 0 ; then echo "Unregistering OpenOffice.org Calc extensions..." unopkg remove --shared "org.numbertext-calc-addin" || true; # clear disk cache unopkg list --shared > /dev/null 2>&1 || true fi See also http://old-en.opensuse.org/Packaging/OpenOffice.org_Extensions. Unfortunately, the wiki page is a bit outdated. You might also unpack the extension into the same path and use "unopkg add --link". The advantage is that rpm could autodetect some dependencies. I haven't got time to rework the extensions package for this. IMPORTANT: It is possible that it will not be needed to call unopkg in OOo-3.3. They want to register the extensions at start time. The last information is that they are going to revert this change because the startup was so slow. Last thing. What extensions you would like to pack? We might add them to the already existing extensions packages... -- Best Regards, Petr Mladek software developer --------------------------------------------------------------------- SUSE LINUX, s. r. o. e-mail: pmladek@suse.cz Lihovarská 1060/12 tel: +420 284 028 952 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (2)
-
Denny Beyer
-
Petr Mladek