rpms/openoffice.org-voikko/devel .cvsignore, 1.2, 1.3 openoffice.org-voikko.spec, 1.1, 1.2 sources, 1.2, 1.3

Ville-Pekka Vainio (vpv) fedora-extras-commits at redhat.com
Mon Feb 11 00:29:15 UTC 2008


Author: vpv

Update of /cvs/pkgs/rpms/openoffice.org-voikko/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv10565

Modified Files:
	.cvsignore openoffice.org-voikko.spec sources 
Log Message:
New RC, many spec file fixes, rebuild for new gcc


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org-voikko/devel/.cvsignore,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- .cvsignore	23 Jan 2008 19:20:33 -0000	1.2
+++ .cvsignore	11 Feb 2008 00:28:41 -0000	1.3
@@ -1 +1 @@
-openoffice.org-voikko-2.1.tar.gz
+openoffice.org-voikko-2.2rc1.tar.gz


Index: openoffice.org-voikko.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org-voikko/devel/openoffice.org-voikko.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- openoffice.org-voikko.spec	23 Jan 2008 19:20:33 -0000	1.1
+++ openoffice.org-voikko.spec	11 Feb 2008 00:28:41 -0000	1.2
@@ -1,12 +1,12 @@
 Name:           openoffice.org-voikko
-Version:        2.1 
-Release:        1%{?dist}
+Version:        2.2 
+Release:        0.1.rc1%{?dist}
 Summary:        Finnish spellchecker and hyphenator extension for OpenOffice.org
 
 Group:          Applications/Productivity
 License:        GPLv2+
 URL:            http://voikko.sourceforge.net/
-Source0:        http://downloads.sourceforge.net/voikko/%{name}-%{version}.tar.gz
+Source0:        http://www.puimula.org/htp/testing/%{name}-2.2rc1.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires: openoffice.org-sdk >= 2.0.4 libvoikko-devel >= 1.5
@@ -19,6 +19,9 @@
 %define oo2_sdk %{_libdir}/openoffice.org/sdk
 %define oo2 %{_libdir}/openoffice.org
 %define unopkg %{oo2}/program/unopkg
+# The location of the installed extension. Apparently the directory name must
+# end with .uno.pkg or unopkg will fail.
+%define voikkoext %{_libdir}/voikko.uno.pkg
 
 %description
 This package contains a Finnish spell-checking and hyphenation component for
@@ -30,39 +33,56 @@
 %setup -q
 
 
+# Make install-unpacked also builds before installing, leave the build section
+# empty.
 %build
-. %{oo2_sdk}/setsdkenv_unix.sh
-make %{?_smp_mflags}
 
 
 %install
 rm -rf $RPM_BUILD_ROOT
-cd build
-voikkoPackage=$(pwd)/voikko.oxt;
-# OOo extension
-install -d -m 755 $RPM_BUILD_ROOT%{_libdir}/voikko.uno.pkg
-unzip "$voikkoPackage" -d $RPM_BUILD_ROOT%{_libdir}/voikko.uno.pkg
+. %{oo2_sdk}/setsdkenv_unix.sh
+make install-unpacked DESTDIR=$RPM_BUILD_ROOT%{voikkoext} %{?_smp_mflags}
+# Set the library executable so debuginfo can be extracted.
+chmod +x $RPM_BUILD_ROOT%{voikkoext}/voikko.so
+
+
+# The TMP_HOME hack is taken from the Debian scripts by Teemu Likonen:
+# Registering program 'unopkg' writes things to $HOME/.openoffice* directory
+# (even with the '--shared' option). We must set $HOME to some temporary
+# directory so that these (root owned) files don't get written to the regular
+# user's HOME in case he/she runs this with sudo.
 
 %pre
 if [ $1 -gt 1 ]; then
     # Upgrade => deregister old extension
+    TMP_HOME="$(mktemp -t -d $PACKAGE_NAME.XXXXXX)" || exit 1
+    export HOME="$TMP_HOME"
     %{unopkg} remove --shared org.puimula.ooovoikko -env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1 || :
+    rm -rf "$TMP_HOME"
 fi
 
 %post
     # register extension
-    %{unopkg} add --shared --link %{_libdir}/voikko.uno.pkg -env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1 || :
+    TMP_HOME="$(mktemp -t -d $PACKAGE_NAME.XXXXXX)" || exit 1
+    export HOME="$TMP_HOME"
+    %{unopkg} add --shared --link %{voikkoext} -env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1 || :
+    rm -rf "$TMP_HOME"
 
 %preun
 if [ $1 -eq 0 ]; then
     # not upgrading => deregister
+    TMP_HOME="$(mktemp -t -d $PACKAGE_NAME.XXXXXX)" || exit 1
+    export HOME="$TMP_HOME"
     %{unopkg} remove --shared org.puimula.ooovoikko -env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1 || :
+    rm -rf "$TMP_HOME"
 fi
 
 %postun
     # clear disk cache
+    TMP_HOME="$(mktemp -t -d $PACKAGE_NAME.XXXXXX)" || exit 1
+    export HOME="$TMP_HOME"
     %{unopkg} list --shared -env:JFW_PLUGIN_DO_NOT_CHECK_ACCESSIBILITY=1 > /dev/null 2>&1 || :
-
+    rm -rf "$TMP_HOME"
 
 
 %clean
@@ -71,11 +91,21 @@
 
 %files
 %defattr(-,root,root,-)
-%{_libdir}/voikko.uno.pkg
+%{voikkoext}
 %doc ChangeLog COPYING README
 
 
 %changelog
+* Mon Feb 11 2008 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.2-0.1.rc1
+- 2.2rc1
+- Use new install-unpacked make target, no need to unzip the extension
+  anymore
+- This target both compiles and installs, so do everything in install and
+  leave build empty
+- Set $HOME to be a temporary directory while using unopkg. Otherwise unopkg
+  causes problems if the package is installed with sudo
+- Rebuild for GCC 4.3
+
 * Wed Jan 23 2008 Ville-Pekka Vainio <vpivaini AT cs.helsinki.fi> - 2.1-1
 - Bump release for the initial Fedora build
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org-voikko/devel/sources,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- sources	23 Jan 2008 19:20:33 -0000	1.2
+++ sources	11 Feb 2008 00:28:41 -0000	1.3
@@ -1 +1 @@
-f88a8cde8aea12c42fbdb63a85a284f0  openoffice.org-voikko-2.1.tar.gz
+830e6ed421f6d5eef19f3c4978b04da7  openoffice.org-voikko-2.2rc1.tar.gz




More information about the fedora-extras-commits mailing list