summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
author slakmagik <slakmagik@gmail.com>2011-01-28 23:10:34 -0500
committer Robby Workman <rworkman@slackbuilds.org>2011-03-01 09:24:18 -0600
commit526942b9da975aeb244037edfd0743b9a2c7ef31 (patch)
tree4ea978b26686d7fc6c7584ef7e41d9323213e4b6 /graphics
parentc4ada052955ffca83ff56840afa97e1aed954309 (diff)
downloadslackbuilds-526942b9da975aeb244037edfd0743b9a2c7ef31.tar.gz
slackbuilds-526942b9da975aeb244037edfd0743b9a2c7ef31.tar.xz
graphics/mtpaint: Miscellaneous cleanups and a bugfix
Fix indentation. Move the sed before configuring, just as if it were a patch. Remove useless strip and compress code and comment why. Make the handbook handling better via an 'else' but also fix a bug where we were in the wrong directory and copied the wrong COPYING/README files and missed NEWS altogether. Now cd in a subshell and grab that COPYING as COPYING.handbook. Bump BUILD because of this. Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'graphics')
-rw-r--r--graphics/mtpaint/mtpaint.SlackBuild33
1 files changed, 15 insertions, 18 deletions
diff --git a/graphics/mtpaint/mtpaint.SlackBuild b/graphics/mtpaint/mtpaint.SlackBuild
index 6c84f2b7ab..f75d8063a6 100644
--- a/graphics/mtpaint/mtpaint.SlackBuild
+++ b/graphics/mtpaint/mtpaint.SlackBuild
@@ -6,7 +6,7 @@
PRGNAM=mtpaint
VERSION=${VERSION:-3.31}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -37,14 +37,15 @@ else
fi
if [ "$GTK1" = yes ]; then
- GTK1=gtk1
+ GTK1=gtk1
fi
if [ "$TKWIDGETS" = yes ]; then
- TKWIDGETS="gtkfilesel gtkcolsel"
+ TKWIDGETS="gtkfilesel gtkcolsel"
fi
if [ "$INTL" = yes ]; then
- INTL=intl
+ INTL=intl
fi
+HANDBOOK=${HANDBOOK:-no}
set -e
@@ -61,31 +62,25 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 \
-o -perm 400 \) -exec chmod 644 {} \;
+# bring deprecated function call into conformance with libpng14
+sed -i~ 's/png_set_gray_1_2_4_to_8/png_set_expand_gray_1_2_4_to_8/' src/png.c
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure cflags man $GTK1 $TKWIDGETS $INTL \
--prefix=/usr \
--mandir=/usr/man/man1 \
--docdir=/usr/doc/$PRGNAM-$VERSION
-# bring deprecated function call into conformance with libpng14
-sed -i~ 's/png_set_gray_1_2_4_to_8/png_set_expand_gray_1_2_4_to_8/' src/png.c
+# mtpaint autostrips the binary and autocompresses the manpage but doesn't
+# automatically create the viewer link
make
make DESTDIR=$PKG install
(cd $PKG/usr/bin && ln -s mtpaint mtv)
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
- | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
-find $PKG/usr/man -type f -exec gzip -9 {} \;
-for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-
-# go ahead and make this in case the handbook is skipped
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-
if [ "$HANDBOOK" = yes ]; then
- unzip $CWD/${PRGNAM}_handbook-$VERSION.zip
- cd ${PRGNAM}_handbook-$VERSION
+ unzip $CWD/${PRGNAM}_handbook-$VERSION.zip
+ ( cd ${PRGNAM}_handbook-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -93,8 +88,10 @@ if [ "$HANDBOOK" = yes ]; then
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 \
-o -perm 400 \) -exec chmod 644 {} \;
make DOCDIR=$PKG/usr/doc/$PRGNAM-$VERSION install
+ cp -a COPYING $PKG/usr/doc/$PRGNAM-$VERSION/COPYING.handbook )
+else
+ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
fi
-
cp -a [CNR]* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild