aboutsummaryrefslogtreecommitdiff
path: root/system/slackins/slackins.SlackBuild
blob: 2f3eea0c243c45d7f399fa6de3036bb592292d95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/sh

# Slackware build script for slackins
# Written by ppr:kut <hmwiesinger@gmx.at>
# Modified by Robby Workman <rworkman@slackbuilds.org>

PRGNAM=slackins
VERSION=3.0
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

# This should be safe enough, as it's still only executable by members
# of the wheel group, AND it still asks for the root password before
# continuing.
SETSUID=${SETSUID:-yes}

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
fi

set -e

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvzf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --localstatedir=/var

make

# We won't be using the Makefile's 'install' target - it's ugly.  (--rworkman)

# Are we going to do this suid?
if [ "$SETSUID" = "yes" ]; then
  install -D -m 4750 -g wheel bin/slackins $PKG/usr/bin/slackins
else
  install -D -m 0750 -g wheel bin/slackins $PKG/usr/bin/slackins
fi

install -D -m 0755 src/script/removedlog $PKG/usr/bin/removedlog

# Add the icons and menu entry
install -D -m 0644 icon/s3.png $PKG/usr/share/pixmaps/s3.png
install -D -m 0644 icon/SlackIns.desktop $PKG/usr/share/applnk/Utilities/SlackIns.desktop

# Let's not clobber config files
install -D -m 0644 modules/slack-serv/conf/slackproc.conf $PKG/etc/slackins/slackproc.conf.new
install -D -m 0644 modules/slack-serv/conf/slack_descrc $PKG/etc/slackins/slack_descrc.new

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS ChangeLog COPYING INSTALL $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$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.tgz