SPECS (AC-branch): openoffice.org.spec - more data moved to datadi...

glen glen at pld-linux.org
Tue Mar 20 01:53:02 CET 2007


Author: glen                         Date: Tue Mar 20 00:53:02 2007 GMT
Module: SPECS                         Tag: AC-branch
---- Log message:
- more data moved to datadir, avoid scanning 1.6gb of data for strip/chrpath
  which won't be done on those files

---- Files affected:
SPECS:
   openoffice.org.spec (1.704.2.42 -> 1.704.2.43) 

---- Diffs:

================================================================
Index: SPECS/openoffice.org.spec
diff -u SPECS/openoffice.org.spec:1.704.2.42 SPECS/openoffice.org.spec:1.704.2.43
--- SPECS/openoffice.org.spec:1.704.2.42	Mon Mar 19 22:50:57 2007
+++ SPECS/openoffice.org.spec	Tue Mar 20 01:52:57 2007
@@ -235,9 +235,12 @@
 
 %define		specflags	-fno-strict-aliasing
 
-# No ELF objects there to strip/chrpath (skips processing 17k files totaling 415M)
-%define		_noautostrip	.*%{_datadir}/%{name}/.*
-%define		_noautochrpath	.*%{_datadir}/%{name}/.*
+# No ELF objects there to strip/chrpath, skips processing:
+# - share/ - 17000 files of 415M
+# - help/ - 6500 files of 1.4G
+# - program/resource/ - 5610 files of 216M
+%define		_noautostrip	.*\\(%{_datadir}\\|%{_libdir}/%{name}/program/resource\\)/.*
+%define		_noautochrpath	.*\\(%{_datadir}\\|%{_libdir}/%{name}/program/resource\\)/.*
 
 %if %{with gcc4}
 # add suffix, but allow ccache, etc in ~/.rpmmacros
@@ -2369,10 +2372,19 @@
 
 	chmod +x $RPM_BUILD_ROOT%{_libdir}/%{name}/program/*.so
 
-	# put share to %{_datadir} so we're able to produce noarch packages
 	install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
+	# put share to %{_datadir} so we're able to produce noarch packages
 	mv $RPM_BUILD_ROOT%{_libdir}/%{name}/share $RPM_BUILD_ROOT%{_datadir}/%{name}
 	ln -s ../../share/%{name}/share $RPM_BUILD_ROOT%{_libdir}/%{name}/share
+	# more non-archidecture dependant nature data
+	mv $RPM_BUILD_ROOT%{_libdir}/%{name}/help $RPM_BUILD_ROOT%{_datadir}/%{name}
+	ln -s ../../share/%{name}/help $RPM_BUILD_ROOT%{_libdir}/%{name}/help
+	mv $RPM_BUILD_ROOT%{_libdir}/%{name}/licenses $RPM_BUILD_ROOT%{_datadir}/%{name}
+	ln -s ../../share/%{name}/licenses $RPM_BUILD_ROOT%{_libdir}/%{name}/licenses
+	mv $RPM_BUILD_ROOT%{_libdir}/%{name}/readmes $RPM_BUILD_ROOT%{_datadir}/%{name}
+	ln -s ../../share/%{name}/readmes $RPM_BUILD_ROOT%{_libdir}/%{name}/readmes
+	mv $RPM_BUILD_ROOT%{_libdir}/%{name}/presets $RPM_BUILD_ROOT%{_datadir}/%{name}
+	ln -s ../../share/%{name}/presets $RPM_BUILD_ROOT%{_libdir}/%{name}/presets
 
 	# fix python
 	sed -i -e 's|#!/bin/python|#!%{_bindir}/python|g' $RPM_BUILD_ROOT%{_libdir}/%{name}/program/*.py
@@ -2459,7 +2471,13 @@
 	find_lang $lang
 done
 
-%{__sed} -i -e 's,%{_libdir}/%{name}/share,%{_datadir}/%{name}/share,' *.lang
+%{__sed} -i -e '
+	s,%{_libdir}/%{name}/help,%{_datadir}/%{name}/help,;
+	s,%{_libdir}/%{name}/licenses,%{_datadir}/%{name}/licenses,;
+	s,%{_libdir}/%{name}/presets,%{_datadir}/%{name}/presets,;
+	s,%{_libdir}/%{name}/readmes,%{_datadir}/%{name}/readmes,;
+	s,%{_libdir}/%{name}/share,%{_datadir}/%{name}/share,;
+' *.lang
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -2471,10 +2489,12 @@
 	rmdir %{_libdir}/%{name}/share/dict/ooo 2>/dev/null || mv -v %{_libdir}/%{name}/share/dict/ooo{,.rpmsave} || :
 fi
 %endif
-if [ -d %{_libdir}/%{name}/share ] && [ ! -L %{_libdir}/%{name}/share ]; then
-	install -d %{_datadir}/%{name}
-	mv %{_libdir}/%{name}/share %{_datadir}/%{name}/share || mv %{_libdir}/%{name}/share{,.rpmsave}
-fi
+for d in presets share help readmes licenses; do
+	if [ -d %{_libdir}/%{name}/$d ] && [ ! -L %{_libdir}/%{name}/$d ]; then
+		install -d %{_datadir}/%{name}
+		mv %{_libdir}/%{name}/$d %{_datadir}/%{name}/$d || mv %{_libdir}/%{name}/$d{,.rpmsave}
+	fi
+done
 
 %post core
 %update_mime_database
@@ -2555,10 +2575,6 @@
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/sofficerc
 
 %dir %{_libdir}/%{name}
-%if %{with java}
-%dir %{_libdir}/%{name}/help/en
-%dir %{_libdir}/%{name}/program/classes
-%endif
 %dir %{_libdir}/%{name}/program
 %dir %{_libdir}/%{name}/program/resource
 
@@ -2569,10 +2585,10 @@
 %{_libdir}/%{name}/program/unorc
 %{_libdir}/%{name}/program/bootstraprc
 %{_libdir}/%{name}/program/configmgrrc
-%dir %{_libdir}/%{name}/licenses
-%dir %{_libdir}/%{name}/readmes
 
-# symlink
+# symlinks
+%{_libdir}/%{name}/licenses
+%{_libdir}/%{name}/readmes
 %{_libdir}/%{name}/share
 
 %dir %{_datadir}/%{name}
@@ -2893,22 +2909,23 @@
 %{_datadir}/%{name}/share/registry/modules/org/openoffice/TypeDetection/UISort/UISort-math.xcu
 %{_datadir}/%{name}/share/registry/modules/org/openoffice/TypeDetection/UISort/UISort-writer.xcu
 
-%dir %{_libdir}/%{name}/presets
-%dir %{_libdir}/%{name}/presets/autotext
-%{_libdir}/%{name}/presets/autotext/mytexts.bau
-%{_libdir}/%{name}/presets/basic
-%dir %{_libdir}/%{name}/presets/config
-%{_libdir}/%{name}/presets/config/autotbl.fmt
-%{_libdir}/%{name}/presets/config/cmyk.soc
-%{_libdir}/%{name}/presets/config/gallery.soc
-%{_libdir}/%{name}/presets/config/html.soc
-%{_libdir}/%{name}/presets/config/standard.so?
-%{_libdir}/%{name}/presets/config/sun-color.soc
-%{_libdir}/%{name}/presets/config/web.soc
-
-%{_libdir}/%{name}/presets/database
-%{_libdir}/%{name}/presets/gallery
-%{_libdir}/%{name}/presets/psprint
+%{_libdir}/%{name}/presets
+%dir %{_datadir}/%{name}/presets
+%dir %{_datadir}/%{name}/presets/autotext
+%{_datadir}/%{name}/presets/autotext/mytexts.bau
+%{_datadir}/%{name}/presets/basic
+%dir %{_datadir}/%{name}/presets/config
+%{_datadir}/%{name}/presets/config/autotbl.fmt
+%{_datadir}/%{name}/presets/config/cmyk.soc
+%{_datadir}/%{name}/presets/config/gallery.soc
+%{_datadir}/%{name}/presets/config/html.soc
+%{_datadir}/%{name}/presets/config/standard.so?
+%{_datadir}/%{name}/presets/config/sun-color.soc
+%{_datadir}/%{name}/presets/config/web.soc
+
+%{_datadir}/%{name}/presets/database
+%{_datadir}/%{name}/presets/gallery
+%{_datadir}/%{name}/presets/psprint
 
 # Programs
 %attr(755,root,root) %{_bindir}/ooconfig
@@ -2947,19 +2964,22 @@
 %{_libdir}/%{name}/program/versionrc
 
 %if %{with java}
+%{_libdir}/%{name}/help
+%dir %{_datadir}/%{name}/help
+%dir %{_datadir}/%{name}/help/en
+%{_datadir}/%{name}/help/en/*.html
+%{_datadir}/%{name}/help/en/*.css
+%{_datadir}/%{name}/help/en/sbasic.*
+%{_datadir}/%{name}/help/en/schart.*
+%{_datadir}/%{name}/help/en/shared.*
+%{_datadir}/%{name}/help/*.xsl
+
 %attr(755,root,root) %{_libdir}/%{name}/program/javaldx
 %attr(755,root,root) %{_libdir}/%{name}/program/java-set-classpath
 %{_libdir}/%{name}/program/jvmfwk3rc
 %{_libdir}/%{name}/program/JREProperties.class
 
-%dir %{_libdir}/%{name}/help
-%{_libdir}/%{name}/help/en/*.html
-%{_libdir}/%{name}/help/en/*.css
-%{_libdir}/%{name}/help/en/sbasic.*
-%{_libdir}/%{name}/help/en/schart.*
-%{_libdir}/%{name}/help/en/shared.*
-%{_libdir}/%{name}/help/*.xsl
-
+%dir %{_libdir}/%{name}/program/classes
 %{_libdir}/%{name}/program/classes/ScriptFramework.jar
 %{_libdir}/%{name}/program/classes/ScriptProviderForBeanShell.jar
 %{_libdir}/%{name}/program/classes/ScriptProviderForJava.jar
@@ -3025,7 +3045,7 @@
 %{_mandir}/man1/openoffice.1*
 
 # en-US
-%{_libdir}/%{name}/presets/config/*_en-US.so*
+%{_datadir}/%{name}/presets/config/*_en-US.so*
 %{_datadir}/%{name}/share/autocorr/acor_*.dat
 %{_datadir}/%{name}/share/autotext/en-US
 %{_datadir}/%{name}/share/registry/res/en-US
@@ -3097,10 +3117,13 @@
 %{_libdir}/%{name}/program/resource/xmlsec680en-US.res
 %{_libdir}/%{name}/program/resource/xsltdlg680en-US.res
 
-%{_libdir}/%{name}/licenses/LICENSE_en-US
-%{_libdir}/%{name}/licenses/LICENSE_en-US.html
-%{_libdir}/%{name}/readmes/README_en-US
-%{_libdir}/%{name}/readmes/README_en-US.html
+%dir %{_datadir}/%{name}/licenses
+%{_datadir}/%{name}/licenses/LICENSE_en-US
+%{_datadir}/%{name}/licenses/LICENSE_en-US.html
+
+%dir %{_datadir}/%{name}/readmes
+%{_datadir}/%{name}/readmes/README_en-US
+%{_datadir}/%{name}/readmes/README_en-US.html
 
 %attr(755,root,root) %{_libdir}/%{name}/program/acceptor.uno.so
 %attr(755,root,root) %{_libdir}/%{name}/program/basprov680*.uno.so
@@ -3398,7 +3421,7 @@
 %{_pixmapsdir}/ooo-base.png
 %{_libdir}/%{name}/program/resource/cnr680en-US.res
 %if %{with java}
-%{_libdir}/%{name}/help/en/sdatabase.*
+%{_datadir}/%{name}/help/en/sdatabase.*
 %endif
 %{_datadir}/%{name}/share/config/soffice.cfg/modules/dbapp
 %{_datadir}/%{name}/share/config/soffice.cfg/modules/dbbrowser
@@ -3427,7 +3450,7 @@
 %{_iconsdir}/hicolor/*/apps/ooo-calc.png
 %{_pixmapsdir}/ooo-calc.png
 %if %{with java}
-%{_libdir}/%{name}/help/en/scalc.*
+%{_datadir}/%{name}/help/en/scalc.*
 %endif
 %{_libdir}/%{name}/program/resource/analysis680en-US.res
 %{_libdir}/%{name}/program/resource/bf_sc680en-US.res
@@ -3453,7 +3476,7 @@
 %{_iconsdir}/hicolor/*/apps/ooo-draw.png
 %{_pixmapsdir}/ooo-draw.png
 %if %{with java}
-%{_libdir}/%{name}/help/en/sdraw.*
+%{_datadir}/%{name}/help/en/sdraw.*
 %endif
 %{_datadir}/%{name}/share/config/soffice.cfg/modules/sdraw
 %{_datadir}/%{name}/share/registry/data/org/openoffice/Office/UI/DrawWindowState.xcu
@@ -3481,7 +3504,7 @@
 %{_iconsdir}/hicolor/*/apps/ooo-writer.png
 %{_pixmapsdir}/ooo-writer.png
 %if %{with java}
-%{_libdir}/%{name}/help/en/swriter.*
+%{_datadir}/%{name}/help/en/swriter.*
 %{_libdir}/%{name}/program/classes/writer2latex.jar
 %endif
 %{_datadir}/%{name}/share/config/soffice.cfg/modules/swriter
@@ -3514,7 +3537,7 @@
 %{_iconsdir}/hicolor/*/apps/ooo-impress.png
 %{_pixmapsdir}/ooo-impress.png
 %if %{with java}
-%{_libdir}/%{name}/help/en/simpress.*
+%{_datadir}/%{name}/help/en/simpress.*
 %endif
 %{_datadir}/%{name}/share/config/soffice.cfg/modules/simpress
 %{_datadir}/%{name}/share/config/soffice.cfg/simpress/
@@ -3538,7 +3561,7 @@
 %{_iconsdir}/hicolor/*/apps/ooo-math.png
 %{_pixmapsdir}/ooo-math.png
 %if %{with java}
-%{_libdir}/%{name}/help/en/smath.*
+%{_datadir}/%{name}/help/en/smath.*
 %endif
 %{_libdir}/%{name}/program/resource/bf_sm680en-US.res
 %{_libdir}/%{name}/program/resource/sm680en-US.res
@@ -3913,6 +3936,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.704.2.43  2007/03/20 00:52:57  glen
+- more data moved to datadir, avoid scanning 1.6gb of data for strip/chrpath
+  which won't be done on those files
+
 Revision 1.704.2.42  2007/03/19 21:50:57  glen
 - install cleanup
 - add secondary short circuit for skipping make install
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/openoffice.org.spec?r1=1.704.2.42&r2=1.704.2.43&f=u



More information about the pld-cvs-commit mailing list