]> gitweb.fluxo.info Git - slackbuilds.git/commitdiff
correcao: broffice
authorrudson <rudson@370017ae-e619-0410-ac65-c121f96126d4>
Sat, 8 Sep 2007 01:28:06 +0000 (01:28 +0000)
committerrudson <rudson@370017ae-e619-0410-ac65-c121f96126d4>
Sat, 8 Sep 2007 01:28:06 +0000 (01:28 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@1365 370017ae-e619-0410-ac65-c121f96126d4

app/office/broffice/broffice.SlackBuild

index 1c4f8419e70e81534adc8a773976afcfb952aa31..4449df9d3c7b603b45ec6e7dd297fae5222ec30a 100755 (executable)
@@ -79,9 +79,9 @@ mkdir -p "$PKG_SRC" || exit $ERROR_MKDIR
 SRC="BrOo_${SRC_VERSION}_20070529_LinuxIntel_install_RPMS_pt-BR.tar.gz"
 URL="http://ftp.unicamp.br/pub/broffice/stable/2.2.1/$SRC"
 
-# if [ ! -s "$SRC_DIR/$SRC" ] || ! bunzip2 -t "$SRC_DIR/$SRC" 2> /dev/null; then
-#  wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
-fi
+if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then
+   wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET
+fi
 
 # Download source's MD5 checksum if necessary and check it
 if [ ! -s "$SRC_DIR/md5sum.txt" ]; then
@@ -98,35 +98,30 @@ cd $PKG_SRC
 tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR
 
 cd $PKG_SRC/RPMS
-# Converte pacotes rpm para tgz
+# Convert packges and install
 ALLPKGS=$( ls *.rpm | wc -l )
-j=1
 for i in *.rpm; do
-  rpm2tgz $i
-  let j++
+  echo -e "\nconvert $i"
+  rpm2tgz $i || exit $ERROR_TAR
+  tar xvf ${i//.rpm/.tgz} -C $PKG || exit $ERROR_TAR
 done
 rm *.rpm 2>/dev/null
 
 # Converte links to KDE - retirado p/ ooffice 2.2.1, jah exite um pacote para slackware
 cd desktop-integration
-# rpm2tgz broffice.org-suse-menus*.rpm
+echo -e "\nconvert broffice.org-suse-menus*.rpm"
+rpm2tgz broffice.org-suse-menus*.rpm || exit $ERROR_TAR
+tar xvf broffice.org-suse-menus*.tgz -C $PKG || exit $ERROR_TAR
 rm *.rpm *.deb 2>/dev/null
-
-
-# Install
-# Install files in $PKG
-tar xvf $( ls *.tgz ) -C $PKG || exit $ERROR_TAR
 cd ..
-for i in *.tgz; do
-  tar xvf $i -C $PKG || exit $ERROR_TAR
-done
 
 # fix opt layout
 mkdir $PKG/usr
-mv $PKG/opt/* $PKG/usr
+mv $PKG/opt/* $PKG/usr/
+#mv $PKG/usr/kde/share/* $PKG/usr/share/
+mv $PKG/usr/kde3/share/* $PKG/usr/share/
+rm -rf $PKG/opt
 
-#  Change KDE directory
-mv $PKG/usr/kde/share/* $PKG/usr/share/        
 
 cd $PKG/usr/bin
 rm * 2>/dev/null
@@ -144,25 +139,8 @@ exec /usr/broffice.org2.2/program/spadmin
 EOFBRADMIN
 
 chmod +x *
-
 ln -s ../../usr/broffice.org2.2/program/soffice soffice
 
-### do we really need that?
-# cd $PKG/usr/share/applications
-# rm *
-# for i in $( ls ../../../usr/broffice.org2.2/share/xdg/* ); do
-#   NAME=$( echo $i | sed 's/.*xdg\/\(.*\.desktop\)$/\1/' )
-#   ln -s $i $NAME
-# done
-
-### do we really need that?
-# if [ ! -z $SLACK_NEW ]; then
-#  cp -a $PKG/opt/kde/* $PKG/usr/
-#  cp -a $PKG/opt/gnome/* $PKG/usr/
-#  rm -rf $PKG/opt/kde
-#  rm -rf $PKG/opt/gnome
-# fi
-
 # Install documentation
 mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR
 mv $PKG/usr/broffice.org2.2/licenses/* $PKG/usr/doc/$PKG_NAME-$PKG_VERSION/