#!/bin/sh # SOURCE-URL: http://www.abisource.com/downloads/abiword/ CWD=`pwd` TMP=`pwd` TMP=$TMP/tempfiles mkdir -p $TMP ABIWORDVERSION=2.6.3 ARCH=i486 SLKCFLAGS="-O2 -march=i486 -mtune=i686" BUILD=52.1 PKG=$TMP/package-abi rm -rf $PKG mkdir -p $PKG cd $TMP if [ ! -f abiword-$ABIWORDVERSION.tar.gz ]; then tar xvf $CWD/abiword-$ABIWORDVERSION.tar.gz else echo "File $CWD/abiword-$ABIWORDVERSION.tar.gz not found" exit 1 fi if [ ! -f abiword-plugins-$ABIWORDVERSION.tar.gz ]; then tar xvf $CWD/abiword-plugins-$ABIWORDVERSION.tar.gz else echo "File $CWD/abiword-plugins-$ABIWORDVERSION.tar.gz not found" exit 1 fi if [ ! -f abiword-extras-$ABIWORDVERSION.tar.gz ]; then tar xvf $CWD/abiword-extras-$ABIWORDVERSION.tar.gz else echo "File $CWD/abiword-extras-$ABIWORDVERSION.tar.gz not found" exit 1 fi cd abiword-$ABIWORDVERSION VERSION=$ABIWORDVERSION PKG=$TMP/package-abi/ #======== Start Abiwordbase if [ ! -r configure ]; then sh autogen.sh fi CFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var/lib # --enable-libabiword # --disable-gnomeui \ # --disable-gnomevfs make mkdir -p $PKG/usr/doc/abiword-$VERSION/docs cp -a BUILD.TXT BiDiReadme.txt COPYING CREDITS.TXT README.TXT \ COPYRIGHT.TXT \ $PKG/usr/doc/abiword-$VERSION cp -a \ docs/*.abw \ $PKG/usr/doc/abiword-$VERSION/docs find $PKG/usr/doc/abiword-$VERSION/ -type f -exec chmod 644 {} \; chown -R root.root $PKG/usr/doc/abiword-$VERSION/* make install DESTDIR=$PKG cd $PKG mkdir $PKG mkdir -p $PKG/usr/share/pixmaps gzip -9 $PKG/usr/man/*/* cd $PKG makepkg -l y -c n $TMP/abiwordbase-$VERSION-$ARCH-$BUILD.tgz installpkg $TMP/abiwordbase-$VERSION-$ARCH-$BUILD.tgz #======== End Abiwordbase #======== Start Abiwordplugins cd $TMP/abiword-plugins-$VERSION/ # if [ ! -r configure ]; then sh autogen.sh fi CFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr \ --with-abiword=../abiword-$VERSION/ \ --without-gremlin \ --without-abicollab \ --without-google \ --disable-abimathview \ --without-abigrammar make make install DESTDIR=$PKG cd $PKG #======== End Abiwordplugins #======== Start Abiwordplugins Collab cd $TMP/abiword-plugins-$VERSION/ ( CFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr \ --with-abiword=../abiword-$VERSION/ \ --with-abicollab make mkdir $PKG make install DESTDIR=$PKG ) removepkg abiwordbase #======== Start Abiwordextras cd $TMP/abiword-extras-$VERSION/ mkdir -p $PKG/usr/share/abiword-2.6/ cp -r clipart templates $PKG/usr/share/abiword-2.6/ cd $PKG #======== Start repackaging echo "Start repackaging" cd $PKG # # make a slack-desc file # cat <<"EOF" > $PKG/usr/share/applications/abiword.desktop [Desktop Entry] Exec=abiword Icon=abiword.png Terminal=false Type=Application Categories=Application;Office;WordProcessor;X-Red-Hat-Base; StartupNotify=true Encoding=UTF-8 X-Desktop-File-Install-Version=0.9 MimeType=application/x-abiword;text/x-abiword;text/x-xml-abiword;text/plain;application/vnd.ms-word;application/rtf;application/vnd.plain;application/xhtml+xml;text/html; Name=AbiWord GenericName=Word Processor Comment=AbiWord Word Processor Name[de]=Textverarbeitung Comment[de]=AbiWord Textverarbeitung Name[nb]=Tekstbehandling Comment[nb]=AbiWord Tekstbehandling Name[nl]=Tekstverwerker Comment[nl]=AbiWord tekstverwerker Name[nn]=Tekstbehandling Comment[nn]=AbiWord Tekstbehandling Name[no]=Tekstbehandler Comment[no]=AbiWord Tekstbehandler Name[pt]=Processador de Texto Comment[pt]=AbiWord Processador de Texto EOF find $PKG -type f | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded strip --strip-unneeded $PKG/usr/lib/abiword-2.6/plugins/*.so mkdir -p $PKG/usr/src/abiword-$VERSION/ cp $CWD/build-abiword.sh $PKG/usr/src/abiword-$VERSION/ mkdir -p $PKG/usr/share/icons/hicolor/48x48/apps mv $PKG/usr/share/icons/abiword_48.png $PKG/usr/share/icons/hicolor/48x48/apps/abiword.png # # make a slack-desc file # mkdir -p $PKG/install/ cat << "EOF" > $PKG/install/slack-desc # HOW TO EDIT THIS FILE: # The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' # on the right side marks the last column you can put a character in. You must # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. |-----handy-ruler------------------------------------------------------| abiword: abiword (word processor) abiword: abiword: AbiWord Personal is a lean and fast full-featured word processor. It abiword: can import many formats including Word97/2000 and RTF, Palm, Psion, abiword: DocBook and XHTML documents, and can export to RTF, Palm, Psion, abiword: XHTML, Text, and LaTeX formats. Linux Journal calls it "an elegant, abiword: open source word processor that delivers the Word functionality most abiword: people use." This version is built against gnome-libs. abiword: abiword: abiword: EOF cd $PKG makepkg -l y -c n ../abiword-$VERSION-$ARCH-$BUILD.tgz cd $TMP md5sum abiword-$VERSION-$ARCH-$BUILD.tgz > $TMP/abiword-$VERSION-$ARCH-$BUILD.md5