summaryrefslogtreecommitdiff
path: root/development/bashdb/bashdb.SlackBuild
blob: 58ee1d3142755a451c0116a22dcedbc368d5b551 (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
#!/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.2
ARCH=noarch
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

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

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$SRC_VERSION
tar xvf $CWD/$PRGNAM-$SRC_VERSION.tar.bz2
cd $PRGNAM-$SRC_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 \
  --docdir=/usr/doc/$PRGNAM-$VERSION \
  --disable-static

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-$VERSION
cp -a AUTHORS COPYING ChangeLog ChangeLog.0 INSTALL NEWS README THANKS TODO \
  $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

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