diff options
author | B. Watson <yalhcru@gmail.com> | 2019-12-28 11:51:50 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-12-31 18:06:25 +0700 |
commit | 5b5f2d950d38f8d5706bfb4981826cb6d4891cb5 (patch) | |
tree | 569e07a5341289d6bc9c0c91f3c2bc9e95bc5eea /development/as31 | |
parent | 0030076b42dd6011a3215af1c30ebd57d24500b3 (diff) |
development/as31: Minor build fix.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'development/as31')
-rw-r--r-- | development/as31/README | 4 | ||||
-rw-r--r-- | development/as31/as31.SlackBuild | 26 |
2 files changed, 17 insertions, 13 deletions
diff --git a/development/as31/README b/development/as31/README index f34c466546cb..7cda78377d2b 100644 --- a/development/as31/README +++ b/development/as31/README @@ -3,3 +3,7 @@ as31 (8031/8051 cross assembler) as31 is an assembler for the 8031 and 8051 microcontrollers. It produces output in several different formats, including Intel hex format and Motorola s-records. + +Note: the download filename gets mangled by certain browsers and other +web clients. If the SlackBuild complains that it can't find the source, +you can force the source filename with the SRC environment variable. diff --git a/development/as31/as31.SlackBuild b/development/as31/as31.SlackBuild index 0ce5baa510b4..4ea2db547001 100644 --- a/development/as31/as31.SlackBuild +++ b/development/as31/as31.SlackBuild @@ -40,23 +40,25 @@ fi set -e -# for some reason, upstream uses colons for separators in its URL -if [ -e "wiki:projects:linux:as31:$PRGNAM-$VERSION.tar.gz" ]; then - mv "wiki:projects:linux:as31:$PRGNAM-$VERSION.tar.gz" $PRGNAM-$VERSION.tar.gz -fi +# For some reason, upstream uses colons for separators in its URL. +# Some clients might save the file with hex escapes in the name... +# If all else fails, accept SRC from the environment. +for i in "${SRC:-$PRGNAM-$VERSION.tar.gz}" \ + "wiki:projects:linux:as31:$PRGNAM-$VERSION.tar.gz" \ + "wiki%3Aprojects%3Alinux%3Aas31%3A$PRGNAM-$VERSION.tar.gz"; +do + [ -e "$CWD/$i" ] && SRC="$CWD/$i" +done rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +tar xvf $SRC 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 {} \; +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+ # Patch from Debian, check return value from getline(), seems like # a good idea. @@ -78,9 +80,7 @@ sh ./configure \ make make install-strip DESTDIR=$PKG - -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 +gzip -9 $PKG/usr/man/man1/$PRGNAM.1 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/examples cp -a COPYING AUTHORS ChangeLog NEWS README $PKG/usr/doc/$PRGNAM-$VERSION |