mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
office/openoffice.org: Fix build.
Signed-off-by: Ryan P.C. McQuen <ryan.q@linux.com>
This commit is contained in:
parent
4a9b022462
commit
8915120b24
1 changed files with 32 additions and 10 deletions
|
@ -28,10 +28,11 @@
|
|||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
PRGNAM=openoffice.org
|
||||
SRCNAM=openoffice
|
||||
VERSION=${VERSION:-4.1.1}
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
TAG=${TAG:-_SBo}
|
||||
SRCSHORT=$(echo $VERSION | cut -f1-2 -d.)
|
||||
SRCSHORT=$(echo $VERSION | cut -f1 -d.)
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
|
@ -77,6 +78,8 @@ SOURCEDIR=$(tar tzf $CWD/$TARNAME 2>/dev/null | head -n 1 | tr -d \/)
|
|||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
mkdir -p $PKG/usr/bin/
|
||||
mkdir -p $PKG/usr/share/applications/
|
||||
rm -rf $TMP/$SOURCEDIR
|
||||
|
||||
# Extract tarball
|
||||
|
@ -94,12 +97,33 @@ rm -rf desktop-integration *.rpm
|
|||
mv opt $PKG
|
||||
cd $PKG
|
||||
|
||||
# Remove DejaVu fonts - these are included in other packages
|
||||
rm -f $PKG/opt/openoffice4/share/fonts/truetype/DejaVu*.ttf
|
||||
## Remove DejaVu fonts - these are included in other packages
|
||||
#rm -f $PKG/opt/${SRCNAM}${SRCSHORT}/share/fonts/truetype/DejaVu*.ttf
|
||||
|
||||
# Move docs to their expected locations
|
||||
## Create symlinks in /usr/bin to actual binaries
|
||||
cd $PKG/usr/bin/
|
||||
for FILE in \
|
||||
sbase scalc sdraw simpress smath soffice spadmin swriter unopkg ; do
|
||||
rm -f $FILE
|
||||
ln -sfv ../../opt/${SRCNAM}${SRCSHORT}/program/$FILE open-$FILE ;
|
||||
done
|
||||
cd -
|
||||
|
||||
## fix desktop files, so they can launch
|
||||
cat <<EOT > $PKG/usr/bin/${SRCNAM}4
|
||||
#!/bin/sh
|
||||
/opt/${SRCNAM}${SRCSHORT}/program/soffice "\$@"
|
||||
EOT
|
||||
chmod 755 $PKG/usr/bin/${SRCNAM}4
|
||||
|
||||
## desktop files!
|
||||
for APP in base calc draw impress math writer; do
|
||||
cp -av $PKG/opt/${SRCNAM}${SRCSHORT}/share/xdg/$APP.desktop $PKG/usr/share/applications/open-$APP.desktop ;
|
||||
done
|
||||
|
||||
## Move docs to their expected locations
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cd $PKG/opt/openoffice4
|
||||
cd $PKG/opt/${SRCNAM}${SRCSHORT}
|
||||
mv README* share/readme/* $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
rmdir share/readme
|
||||
cd -
|
||||
|
@ -110,12 +134,10 @@ mkdir -p $PKG/install
|
|||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
||||
|
||||
mv $TMP/$OOLANG $PKG/opt/${SRCNAM}${SRCSHORT}/lang/
|
||||
|
||||
# Fix ownership and permissions and make the package
|
||||
chown -R root:root .
|
||||
find . -type d -exec chmod 755 {} \;
|
||||
chmod -R u+rw,go+r-w,a-s .
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-${VERSION}_${PKG_LANG}-$PKGARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|
||||
|
||||
# Cleanup
|
||||
cd $TMP
|
||||
rm -rf $OOLANG $PKG
|
||||
|
|
Loading…
Reference in a new issue