summaryrefslogtreecommitdiffstats
path: root/development/cgdb/cgdb.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/cgdb/cgdb.SlackBuild')
-rw-r--r--development/cgdb/cgdb.SlackBuild57
1 files changed, 32 insertions, 25 deletions
diff --git a/development/cgdb/cgdb.SlackBuild b/development/cgdb/cgdb.SlackBuild
index aa10b306b2..c72982f689 100644
--- a/development/cgdb/cgdb.SlackBuild
+++ b/development/cgdb/cgdb.SlackBuild
@@ -1,7 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for cgdb
+# 2023-05-08 updated for 0.8.0 by D Woodfall <dave@slackbuilds.org>
+
# Copyright 2009-2010 Sean Donner (sean.donner@gmail.com)
# All rights reserved.
#
@@ -22,26 +24,36 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20230701 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - add doinst/douninst to handle /usr/info/dir
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=cgdb
-VERSION=${VERSION:-0.6.6}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-0.8.0}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+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" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -62,42 +74,37 @@ cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
-chown root:root . -R
+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 {} \+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
- --mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--infodir=/usr/info \
--build=$ARCH-slackware-linux
make
-make install DESTDIR=$PKG
-
-find $PKG -exec file {} + | sed -n '/ELF.*executable\|shared object/s/:.*$//p' | \
- xargs strip --strip-unneeded 2> /dev/null || true
-find $PKG -exec file {} + | sed -n '/current ar archive/s/:.*$//p' | \
- xargs strip --strip-debug 2> /dev/null || true
-
-find $PKG/usr/man -type f -exec gzip -9 {} +
-find $PKG/usr/man -type l -print0 | while IFS= read -r -d $'\0' link; do
- ln -s $(readlink "$link").gz "${link}.gz"
- rm "$link"
-done
+make install-strip DESTDIR=$PKG
+# No man page, only an info and a text file
rm -f $PKG/usr/info/dir
gzip -9 $PKG/usr/info/*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING ChangeLog NEWS README TODO \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a AUTHORS COPYING NEWS $PKG/usr/share/cgdb/cgdb.txt \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cat $CWD/$PRGNAM.pdf > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.pdf
+
+rm -rf $PKG/usr/share
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+cat $CWD/doinst.sh > $PKG/install/douninst.sh
cd $PKG
-find . -perm /111 -exec chmod 755 {} + -o -perm /444 ! -perm /111 -exec chmod 644 {} +
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE