Author: anssi
Date: Mon Feb 12 17:23:42 2007
New Revision: 119899

Modified:
   
packages/cooker/openoffice.org-voikko/current/SPECS/openoffice.org-voikko.spec

Log:
- adapt .spec for building with different OOo versions
- add Requires(post) to x86_64 package too
- fix spelling in comment (SILENT)


Modified: 
packages/cooker/openoffice.org-voikko/current/SPECS/openoffice.org-voikko.spec
==============================================================================
--- 
packages/cooker/openoffice.org-voikko/current/SPECS/openoffice.org-voikko.spec  
    (original)
+++ 
packages/cooker/openoffice.org-voikko/current/SPECS/openoffice.org-voikko.spec  
    Mon Feb 12 17:23:42 2007
@@ -3,12 +3,14 @@
 %define ooname %srcname
 %define unopkg %{_libdir}/%{ooodir}/program/unopkg
 %define binpkg %nil
-%define ooodir ooo-2.0
+%define ooo_version %(rpm -q --qf '%%{version}' %{ooname}-devel 2>/dev/null)
+%define ooo_shortver %(echo %ooo_version | perl -p -e 
's/^([^\\\.]+\\\.[^\\\.]+)\\\..*/\\\1/')
+%define ooodir ooo-%{ooo_shortver}
 
 # This is a hack, but we have to follow openoffice.org.spec naming
 %ifarch x86_64
 %define ooname %{srcname}64
-%define ooodir ooo-2.0_64
+%define ooodir ooo-%{ooo_shortver}_64
 %define binpkg -n %{binname}
 %endif
 
@@ -41,7 +43,7 @@
 BuildRequires: zip
 BuildRequires: voikko-devel
 Requires:      locales-fi
-# Binaries are hidden inside a zip, so automatic dependencies don't work
+# Binaries are hidden inside a zip, so automatic dependencies won't work
 Requires:      %{mklibname voikko 1}
 Requires:      voikko-dictionary
 Requires:      %ooname = %ooo_version
@@ -60,11 +62,12 @@
 Summary:        Finnish spellchecker and hyphenator for OpenOffice.org
 Group:         Office
 Requires:       locales-fi
-# Binaries are hidden inside a zip, so automatic dependencies don't work
+# Binaries are hidden inside a zip, so automatic dependencies won't work
 Requires:       %{mklibname voikko 1}
 Requires:       voikko-dictionary
 Requires:       %ooname = %ooo_version
 Requires(pre):  %ooname = %ooo_version
+Requires(post): %ooname = %ooo_version
 Requires(preun):        %ooname = %ooo_version
 
 %description -n openoffice.org64-voikko

Reply via email to