summaryrefslogtreecommitdiff
path: root/development/bashdb/bashdb.SlackBuild
blob: 1566517e74521ec3d979e9cbf81d934248302bb0 (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
#!/bin/sh

# Slackware build script for bashdb
# Written by Erik Hanson  erik@slackbuilds.org

# This will build without readarray support. Read the INSTALL file in the
# source directory for instructions if you wish to enable readarray support.
# readarray speeds up initial loading of large scripts.

PRGNAM=bashdb
VERSION=3.1-0.09
ARCH=noarch
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

PKG_VER=$(echo $VERSION | tr '-' '_')

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

CFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --mandir=/usr/man \
  --infodir=/usr/info \
  || exit 1

make || exit 1
make install-strip DESTDIR=$PKG || exit 1

find $PKG/usr/man -type f -exec gzip -9 {} \;
gzip -9 $PKG/usr/info/*.info
rm -rf $PKG/usr/info/dir

mkdir -p $PKG/usr/doc/$PRGNAM-$PKG_VER
cp -a AUTHORS COPYING ChangeLog ChangeLog.0 INSTALL NEWS README THANKS TODO \
  $PKG/usr/doc/$PRGNAM-$PKG_VER
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$PKG_VER/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$PKG_VER-$ARCH-$BUILD$TAG.tgz