|
|
|
@@ -3,16 +3,15 @@
|
|
|
|
|
# Slackware build script for cthulhu
|
|
|
|
|
# Created based on PKGBUILD from Storm Dragon <storm_dragon@stormux.org>
|
|
|
|
|
|
|
|
|
|
cd $(dirname $0) ; CWD=$(pwd)
|
|
|
|
|
cd "$(dirname "$0")" ; CWD=$(pwd)
|
|
|
|
|
|
|
|
|
|
PRGNAM=cthulhu
|
|
|
|
|
VERSION=${VERSION:-0.4}
|
|
|
|
|
VERSION=${VERSION:-2026.05.25}
|
|
|
|
|
BUILD=${BUILD:-1}
|
|
|
|
|
TAG=storm
|
|
|
|
|
PKGTYPE=txz
|
|
|
|
|
export PYTHON=/usr/bin/python3.11
|
|
|
|
|
|
|
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
|
if [ -z "${ARCH:-}" ]; then
|
|
|
|
|
case "$( uname -m )" in
|
|
|
|
|
i?86) ARCH=i586 ;;
|
|
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
@@ -23,7 +22,7 @@ fi
|
|
|
|
|
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
|
|
|
|
|
# the name of the created package would be, and then exit. This information
|
|
|
|
|
# could be useful to other scripts.
|
|
|
|
|
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
|
|
|
|
if [ -n "${PRINT_PACKAGE_NAME:-}" ]; then
|
|
|
|
|
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
|
|
|
|
exit 0
|
|
|
|
|
fi
|
|
|
|
@@ -48,12 +47,12 @@ fi
|
|
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
|
cd $TMP
|
|
|
|
|
rm -rf $PRGNAM-$VERSION
|
|
|
|
|
git clone https://git.stormux.org/storm/cthulhu.git $PRGNAM-$VERSION
|
|
|
|
|
cd $PRGNAM-$VERSION
|
|
|
|
|
rm -rf "$PKG"
|
|
|
|
|
mkdir -p "$TMP" "$PKG" "$OUTPUT"
|
|
|
|
|
cd "$TMP"
|
|
|
|
|
rm -rf "$PRGNAM-$VERSION"
|
|
|
|
|
git clone --branch "$VERSION" --depth 1 https://git.stormux.org/storm/cthulhu.git "$PRGNAM-$VERSION"
|
|
|
|
|
cd "$PRGNAM-$VERSION"
|
|
|
|
|
chown -R root:root .
|
|
|
|
|
find -L . \
|
|
|
|
|
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
|
|
|
@@ -61,38 +60,31 @@ find -L . \
|
|
|
|
|
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
|
|
|
|
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
|
|
|
|
|
|
|
|
|
# Prepare the source
|
|
|
|
|
NOCONFIGURE=1 ./autogen.sh
|
|
|
|
|
|
|
|
|
|
CFLAGS="$SLKCFLAGS" \
|
|
|
|
|
CXXFLAGS="$SLKCFLAGS" \
|
|
|
|
|
./configure \
|
|
|
|
|
meson setup _build \
|
|
|
|
|
--prefix=/usr \
|
|
|
|
|
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
|
|
|
|
--libdir="/usr/lib${LIBDIRSUFFIX}" \
|
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
|
--localstatedir=/var \
|
|
|
|
|
--mandir=/usr/man \
|
|
|
|
|
--docdir=/usr/doc/$PRGNAM-$VERSION \
|
|
|
|
|
--build=$ARCH-slackware-linux
|
|
|
|
|
--buildtype=release
|
|
|
|
|
meson compile -C _build
|
|
|
|
|
DESTDIR="$PKG" meson install -C _build
|
|
|
|
|
|
|
|
|
|
make
|
|
|
|
|
make install DESTDIR=$PKG
|
|
|
|
|
|
|
|
|
|
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
|
|
|
|
find "$PKG" -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
|
|
|
|
|
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
|
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
|
cp -a AUTHORS COPYING ChangeLog README.md \
|
|
|
|
|
$PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
|
|
|
rm -f "$PKG/usr/share/icons/hicolor/icon-theme.cache"
|
|
|
|
|
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
|
|
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
|
|
|
|
mkdir -p "$PKG/usr/doc/$PRGNAM-$VERSION"
|
|
|
|
|
cp -a COPYING HACKING README.md README-DEVELOPMENT.md RELEASE-HOWTO \
|
|
|
|
|
"$PKG/usr/doc/$PRGNAM-$VERSION"
|
|
|
|
|
cat "$CWD/$PRGNAM.SlackBuild" > "$PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild"
|
|
|
|
|
|
|
|
|
|
cd $PKG
|
|
|
|
|
# let's avoid a "bad interpreter error
|
|
|
|
|
sed "s,#!python3.11,#!/usr/bin/python3.11," usr/bin/cthulhu > dummy
|
|
|
|
|
mv dummy usr/bin/cthulhu
|
|
|
|
|
chmod 755 usr/bin/cthulhu
|
|
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
|
|
|
|
|
mkdir -p "$PKG/install"
|
|
|
|
|
cat "$CWD/slack-desc" > "$PKG/install/slack-desc"
|
|
|
|
|
cat "$CWD/doinst.sh" > "$PKG/install/doinst.sh"
|
|
|
|
|
|
|
|
|
|
cd "$PKG"
|
|
|
|
|
/sbin/makepkg -l y -c n "$OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
|
|
|
|