diff options
Diffstat (limited to 'multimedia/nted/nted.SlackBuild')
-rw-r--r-- | multimedia/nted/nted.SlackBuild | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/multimedia/nted/nted.SlackBuild b/multimedia/nted/nted.SlackBuild index c8edc7bc36..9fd6a40fdf 100644 --- a/multimedia/nted/nted.SlackBuild +++ b/multimedia/nted/nted.SlackBuild @@ -1,8 +1,6 @@ -#!/bin/sh +#!/bin/bash # Slackware build script for nted -#(http://vsr.informatik.tu-chemnitz.de/staff/jan/nted/nted.xhtml) -# 20180905 bkw: original homepage is long gone. # Copyright 2008 Corrado Franco (email removed) # All rights reserved. @@ -26,6 +24,13 @@ # Modified by the SlackBuilds.org project +# 20230103 bkw: BUILD=3, get rid of useless install instructions. + +# 20210910 bkw: fix build on -current (gcc11) +# TODO: occasionally nted segfaults on exit, fix if possible. It's +# difficult to reproduce, and when I compile with debugging symbols +# I can't get it to happen at all. + # 20180905 bkw: upstream has been dead a while, switch homepage to # debian's package page, and use their patches. VERSION now 1.10.18_12, # original version + debian patchlevel 12. The debian patches fix a few @@ -34,10 +39,13 @@ # 20170621 bkw: fix build on -current (gcc7's pickier, use -Wno-narrowing) +cd $(dirname $0) ; CWD=$(pwd) + PRGNAM=nted VERSION=${VERSION:-1.10.18_12} -BUILD=${BUILD:-1} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -47,12 +55,17 @@ if [ -z "$ARCH" ]; then 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} -DOCS="ABOUT* AUTHORS COPYING* ChangeLog FAQ INSTALL NEWS README" +# 20210910 bkw: NEWS and ChangeLog are 0-byte placeholders, ignore +DOCS="ABOUT* AUTHORS COPYING* FAQ README" if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" @@ -81,6 +94,8 @@ 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 {} \+ +patch -p1 < $CWD/compilefix.diff + for i in $( cat debian/patches/series ); do patch -p1 < debian/patches/$i done @@ -110,13 +125,12 @@ CXXFLAGS="$SLKCFLAGS -fpermissive -Wno-narrowing" \ make make install-strip DESTDIR=$PKG +gzip -9 $PKG/usr/man/man?/*.* -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild - -find $PKG/usr/man -type f -exec gzip -9 {} \; -for i in $(find $PKG/usr/man -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a $DOCS $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild # Overwrite shipped .desktop file with fixed one that validates cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop @@ -126,4 +140,4 @@ 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:-tgz} +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE |