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

# 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=4.0-0.1
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.bz2
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .

# Hack configure, upstream has "tested on bash 3.1 and 4.0 alpha"
sed -i "s/'4.0'|'3.2')/'4.0'|'3.2'|'3.1')/" configure

./configure \
  --prefix=/usr \
  --sysconfdir=/etc \
  --localstatedir=/var \
  --mandir=/usr/man \
  --infodir=/usr/info

make
make install-strip DESTDIR=$PKG

find $PKG/usr/man/man1 -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