summaryrefslogtreecommitdiffstats
path: root/source/d/poke
diff options
context:
space:
mode:
Diffstat (limited to 'source/d/poke')
-rw-r--r--source/d/poke/poke-elf.url1
-rwxr-xr-xsource/d/poke/poke.SlackBuild85
-rw-r--r--source/d/poke/poke.url1
3 files changed, 67 insertions, 20 deletions
diff --git a/source/d/poke/poke-elf.url b/source/d/poke/poke-elf.url
new file mode 100644
index 000000000..72a8488b8
--- /dev/null
+++ b/source/d/poke/poke-elf.url
@@ -0,0 +1 @@
+https://jemarch.net/poke-elf
diff --git a/source/d/poke/poke.SlackBuild b/source/d/poke/poke.SlackBuild
index f6be2bd07..75a172768 100755
--- a/source/d/poke/poke.SlackBuild
+++ b/source/d/poke/poke.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/bash
-# Copyright 2021 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2021, 2024 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,8 +23,11 @@
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=poke
-VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | cut -f 1 -d " " | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-2}
+
+# Bundle poke-elf?
+WITHPOKEELF=${WITHPOKEELF:-TRUE}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -108,6 +111,65 @@ CXXFLAGS="$SLKCFLAGS" \
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
+# Add a documentation directory:
+mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
+cp -a \
+ AUTHORS* ChangeLog COPYING* DEPENDENCIES* LICENSE* NEWS* README* THANKS* TODO* \
+ $PKG/usr/doc/${PKGNAM}-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+if [ "$WITHPOKEELF" = "TRUE" ]; then
+ cd $CWD
+ # Add in poke-elf:
+ POKEELFVER=${POKEELFVER:-$(echo poke-elf-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+ cd $TMP
+ rm -rf poke-elf-$POKEELFVER
+ tar xvf $CWD/poke-elf-$POKEELFVER.tar.?z || exit 1
+ cd poke-elf-$POKEELFVER || exit 1
+ chown -R root:root .
+ find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \+ -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \+
+ if [ ! -r configure ]; then
+ if [ -x ./autogen.sh ]; then
+ NOCONFIGURE=1 ./autogen.sh
+ else
+ autoreconf -vif
+ fi
+ fi
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ ./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --docdir=/usr/doc/poke-elf-$POKEELFVER \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --disable-static \
+ --build=$ARCH-slackware-linux || exit 1
+ make $NUMJOBS || make || exit 1
+ make install DESTDIR=$PKG || exit 1
+ # Add a documentation directory:
+ mkdir -p $PKG/usr/doc/poke-elf-$POKEELFVER
+ cp -a \
+ AUTHORS* COPYING* README* \
+ $PKG/usr/doc/poke-elf-$POKEELFVER
+fi
+
# Don't ship .la files:
rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
@@ -129,22 +191,5 @@ if [ -d $PKG/usr/info ]; then
)
fi
-# Add a documentation directory:
-mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
-cp -a \
- AUTHORS* ChangeLog COPYING* DEPENDENCIES* LICENSE* NEWS* README* THANKS* TODO* \
- $PKG/usr/doc/${PKGNAM}-$VERSION
-
-# If there's a ChangeLog, installing at least part of the recent history
-# is useful, but don't let it get totally out of control:
-if [ -r ChangeLog ]; then
- DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
- cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
- touch -r ChangeLog $DOCSDIR/ChangeLog
-fi
-
-mkdir -p $PKG/install
-cat $CWD/slack-desc > $PKG/install/slack-desc
-
cd $PKG
/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
diff --git a/source/d/poke/poke.url b/source/d/poke/poke.url
new file mode 100644
index 000000000..f9eeffaf3
--- /dev/null
+++ b/source/d/poke/poke.url
@@ -0,0 +1 @@
+ftp://ftp.gnu.org/pub/gnu/poke