mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
bc3ea99a83
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
139 lines
3.8 KiB
Bash
139 lines
3.8 KiB
Bash
#!/bin/bash
|
|
|
|
# Slackware build script for rxvt
|
|
|
|
# Written by B. Watson (urchlay@slackware.uk)
|
|
|
|
# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
|
|
|
|
# This is loosely based on Pat Volkerding's rxvt from Slackware 14.2's
|
|
# patches/ (same ./configure options and patches). Since his last BUILD
|
|
# was 5, I'm submitting this with BUILD=6 to start out with.
|
|
|
|
# The original upstream site is long gone. I was gonna link to an
|
|
# archive.org copy of it for the screenshots in the HTML doc, but
|
|
# the screenshot (the only one) isn't archived. So the docs have dead
|
|
# links, *shrug*.
|
|
|
|
cd $(dirname $0) ; CWD=$(pwd)
|
|
|
|
PRGNAM=rxvt
|
|
VERSION=${VERSION:-2.7.10}
|
|
BUILD=${BUILD:-6}
|
|
TAG=${TAG:-_SBo}
|
|
PKGTYPE=${PKGTYPE:-tgz}
|
|
|
|
if [ -z "$ARCH" ]; then
|
|
case "$( uname -m )" in
|
|
i?86) ARCH=i586 ;;
|
|
arm*) ARCH=arm ;;
|
|
*) ARCH=$( uname -m ) ;;
|
|
esac
|
|
fi
|
|
|
|
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
|
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
|
exit 0
|
|
fi
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
PKG=$TMP/package-$PRGNAM
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
if [ "$ARCH" = "i586" ]; then
|
|
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
|
elif [ "$ARCH" = "i686" ]; then
|
|
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
|
elif [ "$ARCH" = "x86_64" ]; then
|
|
SLKCFLAGS="-O2 -fPIC"
|
|
else
|
|
SLKCFLAGS="-O2"
|
|
fi
|
|
|
|
set -e
|
|
|
|
rm -rf $PKG
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
cd $TMP
|
|
rm -rf $PRGNAM-$VERSION
|
|
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
|
|
cd $PRGNAM-$VERSION
|
|
chown -R root:root .
|
|
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
|
|
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
|
|
|
|
# Patches came from:
|
|
# https://ftp.slackware.com/pub/slackware/slackware-14.2/patches/source/rxvt/
|
|
# ...though I gunzipped them since SBo prefers that.
|
|
patch -p1 < $CWD/rxvt-integer-overflow-fix.diff
|
|
patch -p1 < $CWD/rxvt.utempter.diff
|
|
|
|
# Same configure options as Pat used:
|
|
CFLAGS="$SLKCFLAGS" \
|
|
CXXFLAGS="$SLKCFLAGS" \
|
|
./configure \
|
|
--prefix=/usr \
|
|
--enable-languages \
|
|
--enable-utmp \
|
|
--enable-wtmp \
|
|
--enable-xpm-background \
|
|
--enable-transparency \
|
|
--enable-menubar \
|
|
--enable-graphics \
|
|
--enable-rxvt-scroll \
|
|
--enable-next-scroll \
|
|
--enable-xterm-scroll \
|
|
--enable-xim \
|
|
--enable-frills \
|
|
--enable-linespace \
|
|
--enable-24bit \
|
|
--enable-keepscrolling \
|
|
--enable-mousewheel \
|
|
--enable-slipwheeling \
|
|
--enable-xgetdefault \
|
|
--enable-old-selection \
|
|
--build=$ARCH-slackware-linux
|
|
|
|
make
|
|
make install DESTDIR=$PKG
|
|
strip $PKG/usr/bin/*
|
|
gzip -9 $PKG/usr/man/man*/*
|
|
|
|
# Cleanup on aisle six: empty dirs and a duplicate binary.
|
|
rmdir $PKG/usr/lib $PKG/usr/include
|
|
rm -rf $PKG/usr/bin/$PRGNAM-$VERSION
|
|
|
|
# Note to self: do not include the terminfo entry, even though it's
|
|
# present in the source. Slackware's already got it, in the ncurses
|
|
# package.
|
|
|
|
# Pat's package didn't include an icon or a .desktop. rxvt-logo.png
|
|
# came from upstream's web site, and the .desktop is a modified version
|
|
# of the one from rxvt-unicode.
|
|
APPS=$PKG/usr/share/applications
|
|
ICONS=$PKG/usr/share/icons/hicolor/32x32/apps
|
|
PMAPS=$PKG/usr/share/pixmaps
|
|
|
|
mkdir -p $APPS $ICONS $PMAPS
|
|
cat $CWD/$PRGNAM.desktop > $APPS/$PRGNAM.desktop
|
|
cat $CWD/rxvt-logo.png > $ICONS/$PRGNAM.png
|
|
ln -s ../icons/hicolor/32x32/apps/$PRGNAM.png $PMAPS/$PRGNAM.png
|
|
|
|
# Here we differ from Pat's package: not going to include the entire
|
|
# contents of doc/, since some of it's YODL source for the HTML, and there
|
|
# are Makefiles...
|
|
PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
|
|
mkdir -p $PKGDOC
|
|
chmod 644 doc/menu/*
|
|
cp -a ChangeLog \
|
|
*.lsm \
|
|
doc/{etc/*.ad,menu,BUGS,FAQ,README.*,TODO,*.{txt,html,seq}} \
|
|
rclock/*.html $PKGDOC
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
|
|
|
|
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
|