diff options
author | B. Watson <yalhcru@gmail.com> | 2020-02-07 17:27:49 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-02-08 15:03:27 +0700 |
commit | e0dbe8f87d76d7b6668819beb6fd6b4e9fd6ab88 (patch) | |
tree | 7081f4db2e145366b693b650bd38b82181b663a0 /development/astyle/astyle.SlackBuild | |
parent | 62cc1495333e42f27edb77ac6b4096d083f4d7e1 (diff) |
development/astyle: New maintainer, various enhancements.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'development/astyle/astyle.SlackBuild')
-rw-r--r-- | development/astyle/astyle.SlackBuild | 91 |
1 files changed, 52 insertions, 39 deletions
diff --git a/development/astyle/astyle.SlackBuild b/development/astyle/astyle.SlackBuild index a864c0005ffc..07cf9d9c5783 100644 --- a/development/astyle/astyle.SlackBuild +++ b/development/astyle/astyle.SlackBuild @@ -2,17 +2,19 @@ # Slackware build script for Artistic Style -# Copyright 2017,2018 Nate Bargmann <n0nb@arrl.net> +# Copyright 2020 B. Watson <yalhcru@gmail.com> -# Ryan P.C. McQuen | Everett, WA | ryanpcmcquen@member.fsf.org +# Copyright 2017,2018 Nate Bargmann <email removed> -# Maintained by Daniel Jordan, daniel.budd.j@gmail.com +# Ryan P.C. McQuen | Everett, WA | <email removed> + +# Formerly maintained by Daniel Jordan <email removed> # - updated version number # - added default variable options # - auto detect ARCH -# - build and install shared libraries +# - build and install shared libraries [bkw: say what?] # -# Originally by Dugan Chen (dugan_c@fastmail.fm) +# Originally by Dugan Chen <email removed> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -32,12 +34,24 @@ # along with this program (most likely, a file named COPYING). If # not, see <http://www.gnu.org/licenses/>. +# 20200113 bkw: +# - Take over maintenance. +# - Add man page and privacy patch, BUILD=2. +# - Get rid of "shared" from make command. We weren't installing the +# shared library anyway, despite the comment above from Daniel +# Jordan. The only thing that lists astyle as a dependency is ebe, +# and that's a runtime dep (it executes the astyle command, doesn't +# link the shared lib). If someone needs the shared lib, I can add +# it to the build, but for now I'm leaving it alone because the +# .so isn't versioned (upgrades may cause breakage). +# - Simplify and tweak the script. + PRGNAM=astyle VERSION=${VERSION:-3.1} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} -SRCPK=astyle_$VERSION\_linux.tar.gz +TARBALL="astyle_${VERSION}_linux.tar.gz" if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -72,40 +86,39 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM -tar -xzvf $CWD/$SRCPK +tar xvf $CWD/$TARBALL cd $PRGNAM 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 {} \; - -cd build/gcc -CFLAGS="$SLKCFLAGS" \ -CXXFLAGS="$SLKCFLAGS" \ -make release shared - -inst_pfx=$PKG/usr -make install prefix=$inst_pfx SYSCONF_PATH=$inst_pfx/doc/$PRGNAM-$VERSION - -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 - -cd $TMP/$PRGNAM -for file in *.md -do - cat $file > $PKG/usr/doc/$PRGNAM-$VERSION/$file -done - -mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/file -cd $TMP/$PRGNAM/file -for file in *.ini -do - fromdos < $file > $PKG/usr/doc/$PRGNAM-$VERSION/file/$file -done - -cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +# Don't change this back to template please. Every file in the tarball +# is +x, and *none* of them need to be. +find -L . -type d -a -exec chmod 755 {} \+ -o \ + -type f -a -exec chmod 644 {} \+ + +DOCDIR=$PKG/usr/doc/$PRGNAM-$VERSION + +# This patch (from Debian) prevents the user's browser from trying to +# load images from sourceforge, when viewing the *local* HTML docs in +# a browser. +patch -p1 < $CWD/privacy.patch + +CFLAGS="$SLKCFLAGS -Wl,-s" \ +CXXFLAGS="$SLKCFLAGS -Wl,-s" \ + make -C build/gcc release + make -C build/gcc install prefix=$PKG/usr SYSCONF_PATH=$DOCDIR + +# Man page borrowed from Debian. It's kind of a placeholder, will +# expand it someday. +mkdir -p $PKG/usr/man/man1 +sed -e "s|@VERSION@|$VERSION|" \ + -e "s|@DATE@|$( date +"%B %e, %Y" )|" \ + $CWD/$PRGNAM.1 | \ + gzip -9c > $PKG/usr/man/man1/$PRGNAM.1.gz + +cp -a *.md file $DOCDIR +sed -i 's,\r,,' $DOCDIR/file/* + +cat $CWD/$PRGNAM.SlackBuild > $DOCDIR/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc |