#!/bin/sh # Heavily based on the Slackware 13.0 SlackBuild # http://www.pixelbeat.org/fslint/ # Packager Andrea Sciucca ( gohanz at infinito.it) # http://www.slacky.eu CWD=`pwd` TMP=${TMP:-/tmp/txz} NAME=fslint PKG=$TMP/package/$NAME VERSION=2.42 ARCH=${ARCH:-x86} BUILD=1as SOURCE=http://www.pixelbeat.org/fslint/$NAME-$VERSION.tar.gz if [ ! -e $NAME-$VERSION.tar.gz ]; then wget -c $SOURCE fi if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi cd $TMP tar xvzf $CWD/$NAME-$VERSION.tar.gz echo -e "\E[0;32m+-------------------------+\E[0;0m" echo -e "\E[0;32m| Start SlackBuild FSlint |\E[0;0m" echo -e "\E[0;32m+-------------------------+\E[0;0m" cd $NAME-$VERSION find . -perm 666 -exec chmod 644 {} \; find . -perm 664 -exec chmod 644 {} \; find . -perm 600 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; find . -perm 400 -exec chmod 644 {} \; find . -perm 440 -exec chmod 644 {} \; find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 511 -exec chmod 755 {} \; find . -perm 711 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; chown -R root:root . # Building FSlint package (cd po && make) mkdir -p $PKG/usr/bin cat << EOF > $PKG/usr/bin/fslint #!/bin/bash cd /usr/share/fslint exec /usr/share/fslint/fslint-gui EOF chmod 755 $PKG/usr/bin/* mkdir -p $PKG/usr/share/fslint cp -a -r * $PKG/usr/share/fslint mkdir -p $PKG/usr/share/applications cat << EOF > $PKG/usr/share/applications/$NAME.desktop [Desktop Entry] Type=Application Encoding=UTF-8 Name=FSlint GenericName=Filesystem Cleaner Comment=File System Lint Icon=fslint Exec=fslint Terminal=false StartupNotify=true Categories=System;Filesystem;GTK; EOF install -m 644 -p -D fslint_icon.png $PKG/usr/share/pixmaps/fslint.png mkdir -p $PKG/usr/doc/$NAME-$VERSION/SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/slack-desc > $PKG/usr/doc/$NAME-$VERSION/SlackBuild/slack-desc cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/SlackBuild/$NAME.SlackBuild mv $PKG/usr/share/fslint/doc/* $PKG/usr/doc/$NAME-$VERSION rm -r $PKG/usr/share/fslint/doc mkdir -p $PKG/usr/man/man1 cp -a $PKG/usr/share/fslint/man/* $PKG/usr/man/man1 echo "if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database &> /dev/null fi" >> $PKG/install/doinst.sh echo "" >> $PKG/install/doinst.sh echo "if [ -x /usr/bin/gtk-update-icon-cache ]; then /usr/bin/gtk-update-icon-cache -f -q /usr/share/icons/hicolor &> /dev/null fi" >> $PKG/install/doinst.sh echo "" >> $PKG/install/doinst.sh gzip -9 $PKG/usr/man/*/* cd $PKG requiredbuilder -v -y -s $CWD $PKG makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.txz if [ "$1" = "--cleanup" ]; then rm -rf $TMP fi