1078 |
|
|
1079 |
# installation |
# installation |
1080 |
|
|
1081 |
mkdir -p %{buildroot}/%{instdir} |
mkdir -p %{buildroot}%{instdir} |
1082 |
if ! make instsetoo_native PKGFORMAT=installed EPM=not-used-but-must-be-set; then |
if ! make instsetoo_native PKGFORMAT=installed EPM=not-used-but-must-be-set; then |
1083 |
echo - ---dump log start--- |
echo - ---dump log start--- |
1084 |
cat $ WORKDIR/installation/LibreOffice/installed/logging/en-US/log_*_en-US.log |
cat $ WORKDIR/installation/LibreOffice/installed/logging/en-US/log_*_en-US.log |
1091 |
echo - ---dump log end -- languagepacks--- |
echo - ---dump log end -- languagepacks--- |
1092 |
exit 1 |
exit 1 |
1093 |
fi |
fi |
1094 |
mkdir -p %{buildroot}/%{baseinstdir} |
mkdir -p %{buildroot}%{baseinstdir} |
1095 |
mv $WORKDIR/installation/LibreOffice/installed/install/en-US/* %{buildroot}/%{baseinstdir} |
mv $WORKDIR/installation/LibreOffice/installed/install/en-US/* %{buildroot}%{baseinstdir} |
1096 |
%if %{with langpacks} |
%if %{with langpacks} |
1097 |
for langpack in $WORKDIR/installation/LibreOffice_languagepack/installed/install/*; do |
for langpack in $WORKDIR/installation/LibreOffice_languagepack/installed/install/*; do |
1098 |
[ `basename $langpack` = log ] && continue |
[ `basename $langpack` = log ] && continue |
1099 |
cp -rp $langpack/* %{buildroot}/%{baseinstdir} |
cp -rp $langpack/* %{buildroot}%{baseinstdir} |
1100 |
rm -rf $langpack |
rm -rf $langpack |
1101 |
done |
done |
1102 |
%endif |
%endif |
1103 |
mv $WORKDIR/installation/LibreOffice_SDK/installed/install/en-US/sdk %{buildroot}/%{sdkinstdir} |
mv $WORKDIR/installation/LibreOffice_SDK/installed/install/en-US/sdk %{buildroot}%{sdkinstdir} |
1104 |
chmod -R +w %{buildroot}/%{baseinstdir} |
chmod -R +w %{buildroot}%{baseinstdir} |
1105 |
|
|
1106 |
# postprocessing and tweaks |
# postprocessing and tweaks |
1107 |
|
|
1110 |
# have no inclination to crawl through mountains of perl code to figure out |
# have no inclination to crawl through mountains of perl code to figure out |
1111 |
# where it comes from, I am just going to replace it by a sensible |
# where it comes from, I am just going to replace it by a sensible |
1112 |
# value here. |
# value here. |
1113 |
sed -i -e '/UserInstallation/s@\$ORIGIN/..@$SYSUSERCONFIG@' %{buildroot}/%{baseinstdir}/program/bootstraprc |
sed -i -e '/UserInstallation/s@\$ORIGIN/..@$SYSUSERCONFIG@' %{buildroot}%{baseinstdir}/program/bootstraprc |
1114 |
|
|
1115 |
#configure sdk |
#configure sdk |
1116 |
pushd %{buildroot}/%{sdkinstdir} |
pushd %{buildroot}%{sdkinstdir} |
|
|
|
1117 |
sed -e "s,@OO_SDK_NAME@,sdk," \ |
sed -e "s,@OO_SDK_NAME@,sdk," \ |
1118 |
-e "s,@OO_SDK_HOME@,%{sdkinstdir}," \ |
-e "s,@OO_SDK_HOME@,%{sdkinstdir}," \ |
1119 |
-e "s,@OFFICE_HOME@,%{baseinstdir}," \ |
-e "s,@OFFICE_HOME@,%{baseinstdir}," \ |
1127 |
-e "s,@SDK_AUTO_DEPLOYMENT@,NO," \ |
-e "s,@SDK_AUTO_DEPLOYMENT@,NO," \ |
1128 |
setsdkenv_unix.sh.in > setsdkenv_unix.sh |
setsdkenv_unix.sh.in > setsdkenv_unix.sh |
1129 |
chmod 755 setsdkenv_unix.sh |
chmod 755 setsdkenv_unix.sh |
1130 |
# we don't want to install the input file |
# we don't want to install the input file |
1131 |
rm -f setsdkenv_unix.sh.in |
rm -f setsdkenv_unix.sh.in |
|
|
|
1132 |
# TODO: is this still necessary? |
# TODO: is this still necessary? |
1133 |
#fix permissions |
#fix permissions |
1134 |
find examples -type f -exec chmod -x {} \; |
find examples -type f -exec chmod -x {} \; |
1135 |
popd |
popd |
1136 |
|
|
1137 |
#ensure a template dir for each lang |
#ensure a template dir for each lang |
1138 |
pushd %{buildroot}/%{baseinstdir}/share/template |
pushd %{buildroot}%{baseinstdir}/share/template |
1139 |
for I in %{langpack_langs}; do |
for I in %{langpack_langs}; do |
1140 |
mkdir -p $I |
mkdir -p $I |
1141 |
done |
done |
1142 |
popd |
popd |
1143 |
|
|
1144 |
#Set some aliases to canonical autocorrect language files for locales with matching languages |
#Set some aliases to canonical autocorrect language files for locales with matching languages |
1145 |
pushd %{buildroot}/%{baseinstdir}/share/autocorr |
pushd %{buildroot}%{baseinstdir}/share/autocorr |
1146 |
|
|
1147 |
%make_autocorr_aliases -l en-GB en-AG en-AU en-BS en-BW en-BZ en-CA en-DK en-GH en-HK en-IE en-IN en-JM en-NG en-NZ en-SG en-TT |
%make_autocorr_aliases -l en-GB en-AG en-AU en-BS en-BW en-BZ en-CA en-DK en-GH en-HK en-IE en-IN en-JM en-NG en-NZ en-SG en-TT |
1148 |
%make_autocorr_aliases -l en-US en-PH |
%make_autocorr_aliases -l en-US en-PH |
1149 |
#en-ZA exists and has a good autocorrect file with two or three extras that make sense for |
#en-ZA exists and has a good autocorrect file with two or three extras that make sense for |
1162 |
%endif |
%endif |
1163 |
popd |
popd |
1164 |
#rhbz#484055 make these shared across multiple applications |
#rhbz#484055 make these shared across multiple applications |
1165 |
mkdir -p %{buildroot}/%{_datadir} |
mkdir -p %{buildroot}%{_datadir} |
1166 |
mv -f %{buildroot}/%{baseinstdir}/share/autocorr %{buildroot}/%{_datadir}/autocorr |
mv -f %{buildroot}%{baseinstdir}/share/autocorr %{buildroot}%{_datadir}/autocorr |
1167 |
chmod 755 %{buildroot}/%{_datadir}/autocorr |
chmod 755 %{buildroot}%{_datadir}/autocorr |
1168 |
|
|
1169 |
#remove it in case we didn't build with gcj |
#remove it in case we didn't build with gcj |
1170 |
rm -f %{buildroot}/%{baseinstdir}/program/classes/sandbox.jar |
rm -f %{buildroot}%{baseinstdir}/program/classes/sandbox.jar |
1171 |
|
|
1172 |
#remove dummy .dat files |
#remove dummy .dat files |
1173 |
rm -f %{buildroot}/%{baseinstdir}/program/root?.dat |
rm -f %{buildroot}%{baseinstdir}/program/root?.dat |
1174 |
|
|
1175 |
#set standard permissions for rpmlint |
#set standard permissions for rpmlint |
1176 |
find %{buildroot}/%{baseinstdir} -exec chmod +w {} \; |
find %{buildroot}%{baseinstdir} -exec chmod +w {} \; |
1177 |
find %{buildroot}/%{baseinstdir} -type d -exec chmod 0755 {} \; |
find %{buildroot}%{baseinstdir} -type d -exec chmod 0755 {} \; |
1178 |
|
|
1179 |
# move python bits into site-packages |
# move python bits into site-packages |
1180 |
mkdir -p %{buildroot}/%{python3_sitearch} |
mkdir -p %{buildroot}%{python3_sitearch} |
1181 |
pushd %{buildroot}/%{python3_sitearch} |
pushd %{buildroot}%{python3_sitearch} |
1182 |
echo "import sys, os" > uno.py |
echo "import sys, os" > uno.py |
1183 |
echo "sys.path.append('%{baseinstdir}/program')" >> uno.py |
echo "sys.path.append('%{baseinstdir}/program')" >> uno.py |
1184 |
echo "os.putenv('URE_BOOTSTRAP', 'vnd.sun.star.pathname:%{baseinstdir}/program/fundamentalrc')" >> uno.py |
echo "os.putenv('URE_BOOTSTRAP', 'vnd.sun.star.pathname:%{baseinstdir}/program/fundamentalrc')" >> uno.py |
1185 |
cat %{buildroot}/%{baseinstdir}/program/uno.py >> uno.py |
cat %{buildroot}%{baseinstdir}/program/uno.py >> uno.py |
1186 |
rm -f %{buildroot}/%{baseinstdir}/program/uno.py* |
rm -f %{buildroot}%{baseinstdir}/program/uno.py* |
1187 |
mv -f %{buildroot}/%{baseinstdir}/program/unohelper.py* . |
mv -f %{buildroot}%{baseinstdir}/program/unohelper.py* . |
1188 |
popd |
popd |
1189 |
|
|
1190 |
# rhbz#477435 package opensymbol separately |
# rhbz#477435 package opensymbol separately |
1191 |
pushd %{buildroot}/%{baseinstdir}/share/fonts/truetype |
pushd %{buildroot}%{baseinstdir}/share/fonts/truetype |
1192 |
install -d -m 0755 %{buildroot}%{_fontdir} |
install -d -m 0755 %{buildroot}%{_fontdir} |
1193 |
install -p -m 0644 *.ttf %{buildroot}%{_fontdir} |
install -p -m 0644 *.ttf %{buildroot}%{_fontdir} |
1194 |
popd |
popd |
1195 |
rm -rf %{buildroot}/%{baseinstdir}/share/fonts |
rm -rf %{buildroot}%{baseinstdir}/share/fonts |
1196 |
|
|
1197 |
#ensure that no sneaky un-prelinkable, un-fpic or non executable shared libs |
#ensure that no sneaky un-prelinkable, un-fpic or non executable shared libs |
1198 |
#have snuck through |
#have snuck through |
1199 |
pic=0 |
pic=0 |
1200 |
executable=0 |
executable=0 |
1201 |
for foo in `find %{buildroot}/%{instdir} -name "*" -exec file {} \;| grep ": ELF" | cut -d: -f 1` ; do |
for foo in `find %{buildroot}%{instdir} -name "*" -exec file {} \;| grep ": ELF" | cut -d: -f 1` ; do |
1202 |
chmod +wx $foo |
chmod +wx $foo |
1203 |
ls -asl $foo |
ls -asl $foo |
1204 |
result=`readelf -d $foo | grep TEXTREL` || true |
result=`readelf -d $foo | grep TEXTREL` || true |
1267 |
ln -s libreoffice openoffice.org |
ln -s libreoffice openoffice.org |
1268 |
popd |
popd |
1269 |
|
|
1270 |
pushd %{buildroot}/%{baseinstdir}/share/xdg/ |
pushd %{buildroot}%{baseinstdir}/share/xdg/ |
1271 |
chmod u+w *.desktop |
chmod u+w *.desktop |
1272 |
rm -rf printeradmin.desktop |
rm -rf printeradmin.desktop |
1273 |
ICONVERSION=`echo $PRODUCTVERSION | sed -e 's/\.//'` |
ICONVERSION=`echo $PRODUCTVERSION | sed -e 's/\.//'` |
1285 |
# rhbz#156677 / rhbz#186515 do not show math and startcenter |
# rhbz#156677 / rhbz#186515 do not show math and startcenter |
1286 |
sed -i -e /NoDisplay/s/false/true/ math.desktop startcenter.desktop |
sed -i -e /NoDisplay/s/false/true/ math.desktop startcenter.desktop |
1287 |
# relocate the .desktop and icon files |
# relocate the .desktop and icon files |
1288 |
mkdir -p %{buildroot}/%{_datadir}/applications |
mkdir -p %{buildroot}%{_datadir}/applications |
1289 |
for app in base calc draw impress math startcenter writer xsltfilter; do |
for app in base calc draw impress math startcenter writer xsltfilter; do |
1290 |
sed -i -e 's/\${UNIXBASISROOTNAME}/%{name}/' $app.desktop |
sed -i -e 's/\${UNIXBASISROOTNAME}/%{name}/' $app.desktop |
1291 |
desktop-file-validate $app.desktop |
desktop-file-validate $app.desktop |
1292 |
cp -p $app.desktop %{buildroot}/%{_datadir}/applications/libreoffice-$app.desktop |
cp -p $app.desktop %{buildroot}%{_datadir}/applications/libreoffice-$app.desktop |
1293 |
done |
done |
1294 |
popd |
popd |
1295 |
|
|
1373 |
#relocate the rest of them |
#relocate the rest of them |
1374 |
# rhbz#901346 512x512 icons are not used by anything |
# rhbz#901346 512x512 icons are not used by anything |
1375 |
for icon in `find icons -path '*/512x512' -prune -o -type f -print`; do |
for icon in `find icons -path '*/512x512' -prune -o -type f -print`; do |
1376 |
mkdir -p %{buildroot}/%{_datadir}/`dirname $icon` |
mkdir -p %{buildroot}%{_datadir}/`dirname $icon` |
1377 |
cp -p $icon %{buildroot}/%{_datadir}/`echo $icon | sed -e s@libreoffice$ICONVERSION-@libreoffice-@ | sed -e s@libreoffice$PRODUCTVERSION-@libreoffice-@` |
cp -p $icon %{buildroot}%{_datadir}/`echo $icon | sed -e s@libreoffice$ICONVERSION-@libreoffice-@ | sed -e s@libreoffice$PRODUCTVERSION-@libreoffice-@` |
1378 |
done |
done |
1379 |
|
mkdir -p %{buildroot}%{_datadir}/mime-info |
1380 |
mkdir -p %{buildroot}/%{_datadir}/mime-info |
cp -p mime-info/libreoffice$PRODUCTVERSION.keys %{buildroot}%{_datadir}/mime-info/libreoffice.keys |
1381 |
cp -p mime-info/libreoffice$PRODUCTVERSION.keys %{buildroot}/%{_datadir}/mime-info/libreoffice.keys |
cp -p mime-info/libreoffice$PRODUCTVERSION.mime %{buildroot}%{_datadir}/mime-info/libreoffice.mime |
|
cp -p mime-info/libreoffice$PRODUCTVERSION.mime %{buildroot}/%{_datadir}/mime-info/libreoffice.mime |
|
1382 |
#add our mime-types, e.g. for .oxt extensions |
#add our mime-types, e.g. for .oxt extensions |
1383 |
mkdir -p %{buildroot}/%{_datadir}/mime/packages |
mkdir -p %{buildroot}%{_datadir}/mime/packages |
1384 |
cp -p mime/packages/libreoffice$PRODUCTVERSION.xml %{buildroot}/%{_datadir}/mime/packages/libreoffice.xml |
cp -p mime/packages/libreoffice$PRODUCTVERSION.xml %{buildroot}%{_datadir}/mime/packages/libreoffice.xml |
1385 |
popd |
popd |
1386 |
|
|
1387 |
rm -rf %{buildroot}/%{baseinstdir}/readmes |
rm -rf %{buildroot}%{baseinstdir}/readmes |
1388 |
rm -rf %{buildroot}/%{baseinstdir}/licenses |
rm -rf %{buildroot}%{baseinstdir}/licenses |
1389 |
|
|
1390 |
mkdir -p %{buildroot}/%{baseinstdir}/share/psprint/driver |
mkdir -p %{buildroot}%{baseinstdir}/share/psprint/driver |
1391 |
cp -p psprint_config/configuration/ppds/SGENPRT.PS %{buildroot}/%{baseinstdir}/share/psprint/driver/SGENPRT.PS |
cp -p psprint_config/configuration/ppds/SGENPRT.PS %{buildroot}%{baseinstdir}/share/psprint/driver/SGENPRT.PS |
1392 |
|
|
1393 |
# rhbz#452385 to auto have postgres in classpath if subsequently installed |
# rhbz#452385 to auto have postgres in classpath if subsequently installed |
1394 |
sed -i -e "s#URE_MORE_JAVA_CLASSPATH_URLS.*#& file:///usr/share/java/postgresql-jdbc.jar#" %{buildroot}/%{baseinstdir}/program/fundamentalrc |
sed -i -e "s#URE_MORE_JAVA_CLASSPATH_URLS.*#& file:///usr/share/java/postgresql-jdbc.jar#" %{buildroot}%{baseinstdir}/program/fundamentalrc |
1395 |
# Br translation doesn't have any help |
# Br translation doesn't have any help |
1396 |
# Better use fr ones for now ( and check if this is still valid for next update ) |
# Better use fr ones for now ( and check if this is still valid for next update ) |
1397 |
pushd %buildroot%_libdir/libreoffice/help |
pushd %buildroot%_libdir/libreoffice/help |
1399 |
popd |
popd |
1400 |
|
|
1401 |
# move glade catalog to system glade dir |
# move glade catalog to system glade dir |
1402 |
mkdir -p %{buildroot}/%{_datadir}/glade3/catalogs |
mkdir -p %{buildroot}%{_datadir}/glade3/catalogs |
1403 |
mv %{buildroot}/%{baseinstdir}/share/glade/libreoffice-catalog.xml %{buildroot}/%{_datadir}/glade3/catalogs |
mv %{buildroot}%{baseinstdir}/share/glade/libreoffice-catalog.xml %{buildroot}%{_datadir}/glade3/catalogs |
1404 |
|
|
1405 |
# rhbz#1049543 install appdata |
# rhbz#1049543 install appdata |
1406 |
mkdir -p %{buildroot}%{_datadir}/appdata |
mkdir -p %{buildroot}%{_datadir}/appdata |