summaryrefslogtreecommitdiffstats
path: root/development/tcc/tcc.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'development/tcc/tcc.SlackBuild')
-rw-r--r--development/tcc/tcc.SlackBuild53
1 files changed, 27 insertions, 26 deletions
diff --git a/development/tcc/tcc.SlackBuild b/development/tcc/tcc.SlackBuild
index 6ad1628225..0faa04ae86 100644
--- a/development/tcc/tcc.SlackBuild
+++ b/development/tcc/tcc.SlackBuild
@@ -25,11 +25,22 @@
#
# Markus Reichelt, slackbuilds@mareichelt.de, 0xCCEEF115
# in memoriam of Georg Ohler
+# Now maintained by B. Watson (urchlay@slackware.uk).
+
+# 20230815 bkw:
+# - take over maintenance.
+# - update for 0.9.27+20230811_d1c1077.
+# - make CROSS=yes the default.
+# - add TODO and USES to the doc dir.
+# - mention github repo in README.
+
+# 20230627 bkw: Modified by SlackBuilds.org, BUILD=2:
+# - add doinst.sh and douninst.sh to manage /usr/info/dir.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=tcc
-VERSION=${VERSION:-20220221_308d8d1}
+VERSION=${VERSION:-0.9.27+20230811_d1c1077}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -42,9 +53,6 @@ if [ -z "$ARCH" ]; then
esac
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
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
@@ -74,21 +82,16 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
+tar xvf $CWD/$PRGNAM-$VERSION.tar.xz
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 \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-
-if [ "$CROSS" = "yes" ]; then
- OPT="--enable-cross"
- else OPT=""
-fi
+find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
+ \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
-mkdir -p $PKG/usr/bin $PKG/usr/man/man1 $PKG/usr/doc $PKG/usr/include
+[ "${CROSS:-yes}" = "yes" ] && CROSSOPT="--enable-cross"
+
+DOC=/usr/doc/$PRGNAM-$VERSION
+PKGDOC=$PKG/$DOC
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -96,26 +99,24 @@ CXXFLAGS="$SLKCFLAGS" \
--prefix=/usr \
--sharedir=/usr \
--libdir=/usr/lib$LIBDIRSUFFIX \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- $OPT
+ --docdir=$DOC \
+ $CROSSOPT
make
make -j1 test
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
-
+strip $PKG/usr/bin/*
+gzip -9 $PKG/usr/man/man1/*
gzip -9 $PKG/usr/info/*.info
-cp -a README* Changelog* COPYING RELICENSING examples/ $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cp -a README* Changelog* COPYING RELICENSING TODO USES examples/ $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+cat $CWD/doinst.sh > $PKG/install/douninst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE