summaryrefslogtreecommitdiffstats
path: root/system/fileschanged/fileschanged.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/fileschanged/fileschanged.SlackBuild')
-rw-r--r--system/fileschanged/fileschanged.SlackBuild39
1 files changed, 25 insertions, 14 deletions
diff --git a/system/fileschanged/fileschanged.SlackBuild b/system/fileschanged/fileschanged.SlackBuild
index 794b858388..71e963f10d 100644
--- a/system/fileschanged/fileschanged.SlackBuild
+++ b/system/fileschanged/fileschanged.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for fileschanged
@@ -22,10 +22,17 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220411 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - remove empty/useless docs (NEWS and INSTALL).
+# - stop configure script from writing outside of $TMP.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=fileschanged
VERSION=${VERSION:-0.6.9}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +42,11 @@ 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}
@@ -65,16 +76,21 @@ cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
+ -o -perm 511 \) -exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
# Remove compiler flag -Werror from some files
for datei in $( grep -Rl Werror * ); do
sed -i 's@-Werror@@g' $datei
done
+# 20220411 bkw: the configure script does something purely evil: it
+# creates a file in /usr/lib with a long name, to see whether long
+# filenames are supported. since it's not the 1980s, just force
+# the test result to 'yes' to avoid writing to the real /usr/lib.
CFLAGS="$SLKCFLAGS" \
+ac_cv_sys_long_file_names=yes \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
@@ -85,13 +101,8 @@ CFLAGS="$SLKCFLAGS" \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--build=$ARCH-slackware-linux
make
-make install DESTDIR=$PKG
-
-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
-
-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
+make install-strip DESTDIR=$PKG
+gzip -9 $PKG/usr/man/man*/*
rm -f $PKG/usr/info/dir
gzip -9 $PKG/usr/info/*.info*
@@ -99,7 +110,7 @@ gzip -9 $PKG/usr/info/*.info*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a COPYING $PKG/usr/doc/$PRGNAM-$VERSION
mv $PKG/usr/share/$PRGNAM/* $PKG/usr/doc/$PRGNAM-$VERSION
-rm -rf $PKG/usr/share/$PRGNAM
+rm -rf $PKG/usr/share/$PRGNAM $PKG/usr/doc/$PRGNAM-$VERSION/{NEWS,INSTALL}
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
@@ -107,4 +118,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