2011-04-11 08:09:21 +02:00
|
|
|
#!/bin/sh
|
|
|
|
# Slackware build script for SciTE
|
|
|
|
# Written by Iskar Enev <iskar.enev[@]gmail.com>
|
2011-12-29 11:59:14 +01:00
|
|
|
# v2.27: Some modifications by Jens Weber <jens@tuxane.com>
|
|
|
|
# v3.02: (jw) Some more changes, see README.Slackware and changelog
|
2012-06-26 03:23:22 +02:00
|
|
|
# v3.20: (jw) little changes, see README.Slackware and changelog
|
2014-04-10 03:22:38 +02:00
|
|
|
# v3.2.3: (jw) version bump to 3.2.3
|
|
|
|
# v3.2.4: (jw) version bump to 3.2.4
|
|
|
|
# v3.4.1: (jw) version bump to 3.4.1
|
2011-04-11 08:09:21 +02:00
|
|
|
|
|
|
|
PRGNAM=scite
|
2014-04-10 03:22:38 +02:00
|
|
|
VERSION=${VERSION:-3.4.1}
|
2011-04-11 08:09:21 +02:00
|
|
|
BUILD=${BUILD:-1}
|
|
|
|
TAG=${TAG:-_SBo}
|
|
|
|
|
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
|
|
|
i?86) ARCH=i486 ;;
|
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
*) ARCH=$( uname -m ) ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
|
|
|
CWD=$(pwd)
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
2011-12-29 11:59:14 +01:00
|
|
|
HELPBROWSER=mozilla
|
2011-04-11 08:09:21 +02:00
|
|
|
|
2011-07-24 20:09:52 +02:00
|
|
|
|
2011-04-11 08:09:21 +02:00
|
|
|
if [ "$ARCH" = "i486" ]; then
|
2012-06-26 03:23:22 +02:00
|
|
|
LIBDIRSUFFIX=""
|
2011-04-11 08:09:21 +02:00
|
|
|
elif [ "$ARCH" = "i686" ]; then
|
2012-06-26 03:23:22 +02:00
|
|
|
LIBDIRSUFFIX=""
|
2011-04-11 08:09:21 +02:00
|
|
|
elif [ "$ARCH" = "x86_64" ]; then
|
2012-06-26 03:23:22 +02:00
|
|
|
LIBDIRSUFFIX="64"
|
2011-04-11 08:09:21 +02:00
|
|
|
else
|
2012-06-26 03:23:22 +02:00
|
|
|
LIBDIRSUFFIX=""
|
2011-04-11 08:09:21 +02:00
|
|
|
fi
|
|
|
|
|
2011-07-24 20:09:52 +02:00
|
|
|
set -eu
|
2011-04-11 08:09:21 +02:00
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
|
|
|
rm -rf scite/ scintilla/
|
|
|
|
tar xvf $CWD/${PRGNAM}$(echo $VERSION | tr -d .).tgz
|
|
|
|
chown -R root:root scite/ scintilla/
|
|
|
|
chmod -R u+w,go+r-w,a-s scite/ scintilla/
|
|
|
|
|
2011-07-24 20:09:52 +02:00
|
|
|
cd $TMP/scintilla
|
|
|
|
make -C gtk prefix=/usr
|
2011-04-11 08:09:21 +02:00
|
|
|
|
2011-07-24 20:09:52 +02:00
|
|
|
cd $TMP/scite
|
2011-12-29 11:59:14 +01:00
|
|
|
sed -i "s%xdg-open%$HELPBROWSER%g" src/Embedded.properties
|
|
|
|
sed -i "s%xdg-open%$HELPBROWSER%g" src/SciTEGlobal.properties
|
2011-07-24 20:09:52 +02:00
|
|
|
make -C gtk prefix=/usr
|
|
|
|
make -C gtk install DESTDIR=$PKG
|
2011-04-11 08:09:21 +02:00
|
|
|
|
2011-05-01 16:19:23 +02:00
|
|
|
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
|
|
|
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
2011-04-11 08:09:21 +02:00
|
|
|
|
2011-07-24 20:09:52 +02:00
|
|
|
( cd $PKG/usr/bin ; ln -sf SciTE scite )
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/share/scite
|
2011-04-11 08:09:21 +02:00
|
|
|
mkdir -p $PKG/usr/man/man1
|
|
|
|
cat doc/scite.1 | gzip -9c > $PKG/usr/man/man1/scite.1.gz
|
|
|
|
|
2011-07-24 20:09:52 +02:00
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/html
|
|
|
|
cp -a README License.txt $PKG/usr/doc/$PRGNAM-$VERSION
|
2011-12-29 11:59:14 +01:00
|
|
|
cat $CWD/config/SciTEGlobal.properties.new >> $PKG/usr/doc/$PRGNAM-$VERSION/SciTEGlobal.properties.new
|
|
|
|
cat $CWD/config/SciTEUser.properties.new >> $PKG/usr/doc/$PRGNAM-$VERSION/SciTEUser.properties.new
|
|
|
|
cat $CWD/config/changelog >> $PKG/usr/doc/$PRGNAM-$VERSION/changelog
|
|
|
|
cat $CWD/config/README.Slackware >> $PKG/usr/doc/$PRGNAM-$VERSION/README.Slackware
|
|
|
|
|
2014-04-10 03:22:38 +02:00
|
|
|
|
2012-06-26 03:23:22 +02:00
|
|
|
for i in $PKG/usr/share/scite/*.html $PKG/usr/share/scite/*.png ; do
|
2011-07-24 20:09:52 +02:00
|
|
|
ln -s /usr/share/scite/$(basename $i) \
|
|
|
|
$PKG/usr/doc/$PRGNAM-$VERSION/html/$(basename $i) ;
|
|
|
|
done
|
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
|
|
|
2011-04-11 08:09:21 +02:00
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
|
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
|
|
|
|
|
|
|
cd $PKG
|
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|