From afdd8484177554b1a13a86d3ce269466196ab186 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 17 Apr 2024 21:50:46 +0700 Subject: libraries/td_lib: Added (ded library). Signed-off-by: Willy Sudiarto Raharjo --- libraries/td_lib/README | 7 +++ libraries/td_lib/slack-desc | 19 ++++++++ libraries/td_lib/td_lib.SlackBuild | 96 ++++++++++++++++++++++++++++++++++++++ libraries/td_lib/td_lib.info | 10 ++++ 4 files changed, 132 insertions(+) create mode 100644 libraries/td_lib/README create mode 100644 libraries/td_lib/slack-desc create mode 100644 libraries/td_lib/td_lib.SlackBuild create mode 100644 libraries/td_lib/td_lib.info (limited to 'libraries') diff --git a/libraries/td_lib/README b/libraries/td_lib/README new file mode 100644 index 0000000000..2d4a7dac55 --- /dev/null +++ b/libraries/td_lib/README @@ -0,0 +1,7 @@ +td_lib (support library for ded) + +This is a common library of procedures which are shared not only among +the CM_TOOLS utilities, but also with other programs which are not +part of CM_TOOLS. + +In practice, the only program that uses this library is "ded". diff --git a/libraries/td_lib/slack-desc b/libraries/td_lib/slack-desc new file mode 100644 index 0000000000..cd92a5ba4c --- /dev/null +++ b/libraries/td_lib/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +td_lib: td_lib (support library for ded) +td_lib: +td_lib: This is a common library of procedures which are shared not only among +td_lib: the CM_TOOLS utilities, but also with other programs which are not +td_lib: part of CM_TOOLS. +td_lib: +td_lib: In practice, the only program that uses this library is "ded". +td_lib: +td_lib: +td_lib: +td_lib: diff --git a/libraries/td_lib/td_lib.SlackBuild b/libraries/td_lib/td_lib.SlackBuild new file mode 100644 index 0000000000..bf0f96fd88 --- /dev/null +++ b/libraries/td_lib/td_lib.SlackBuild @@ -0,0 +1,96 @@ +#!/bin/bash + +# Slackware build script for td_lib + +# Written by B. Watson (urchlay@slackware.uk) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +# For a long time, this was bundled with ded. However, recent versions +# of ded have configure scripts and makefiles that have grown too +# complex to easily force it to find td_lib in a custom directory. The +# path of least resistance is to break this library out into its own +# build, even though nothing else besides ded uses it. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=td_lib +VERSION=${VERSION:-20230122} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +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" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tgz +cd $PRGNAM-$VERSION +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 {} + + +# "checking for long filenames" wants to create files in /usr/lib and +# /var/lib. Violates the principle of least surprise: users don't expect +# configure scripts (or SlackBuilds) to touch their system directories. +# We skip this check with an environment variable. + +ac_cv_sys_long_file_names="set" \ +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --disable-static \ + --build=$ARCH-slackware-linux + +# Yes, the -j1's are necessary. +make -j1 +make -j1 install DESTDIR=$PKG + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a CHANGES COPYING README $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$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.$PKGTYPE diff --git a/libraries/td_lib/td_lib.info b/libraries/td_lib/td_lib.info new file mode 100644 index 0000000000..038ea2d55b --- /dev/null +++ b/libraries/td_lib/td_lib.info @@ -0,0 +1,10 @@ +PRGNAM="td_lib" +VERSION="20230122" +HOMEPAGE="http://invisible-island.net/ded/" +DOWNLOAD="https://invisible-mirror.net/archives/ded/td_lib-20230122.tgz" +MD5SUM="bb6d9f756b77e2c5eaa1260a3f98bd0b" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="urchlay@slackware.uk" -- cgit v1.2.3