diff options
Diffstat (limited to '')
-rwxr-xr-x | source/d/gnucobol/gnucobol.SlackBuild (renamed from source/d/gnu-cobol/gnu-cobol.SlackBuild) | 41 | ||||
-rw-r--r-- | source/d/gnucobol/slack-desc | 19 |
2 files changed, 42 insertions, 18 deletions
diff --git a/source/d/gnu-cobol/gnu-cobol.SlackBuild b/source/d/gnucobol/gnucobol.SlackBuild index 142c5cf7b..e297a6403 100755 --- a/source/d/gnu-cobol/gnu-cobol.SlackBuild +++ b/source/d/gnucobol/gnucobol.SlackBuild @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -# Copyright 2013, 2014 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2013, 2014, 2017, 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -20,15 +20,16 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) -PKGNAM=gnu-cobol -VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-1} +PKGNAM=gnucobol +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} +BUILD=${BUILD:-2} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$(uname -m)" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;; # Unless $ARCH is already set, use uname -m for all other archs: *) ARCH=$(uname -m) ;; @@ -36,15 +37,17 @@ if [ -z "$ARCH" ]; then export ARCH 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 "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" + exit 0 +fi + NUMJOBS=${NUMJOBS:-" -j7 "} -if [ "$ARCH" = "i386" ]; then - SLKCFLAGS="-O2 -march=i386 -mcpu=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i586" ]; then +if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then @@ -64,7 +67,6 @@ else LIBDIRSUFFIX="" fi -CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-$PKGNAM @@ -73,8 +75,8 @@ mkdir -p $TMP $PKG cd $TMP rm -rf $PKGNAM-$VERSION -tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1 -cd $PKGNAM-$VERSION +tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1 +cd $PKGNAM-$VERSION || exit 1 chown -R root:root . find . \ @@ -91,12 +93,15 @@ CFLAGS="$SLKCFLAGS" \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --mandir=/usr/man \ --infodir=/usr/info \ - --build=$ARCH-slackware-linux + --build=$ARCH-slackware-linux || exit 1 # Build and install: make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 +# Don't ship .la files: +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la + # Strip binaries: ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null @@ -106,7 +111,7 @@ make install DESTDIR=$PKG || exit 1 # Add a documentation directory: mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION cp -a \ - ABOUT-NLS AUTHORS COPYING* ChangeLog INSTALL NEWS README* THANKS TODO \ + ABOUT-NLS AUTHORS COPYING* ChangeLog INSTALL NEWS* README* THANKS TODO \ $PKG/usr/doc/${PKGNAM}-$VERSION # Compress info files, if any: diff --git a/source/d/gnucobol/slack-desc b/source/d/gnucobol/slack-desc new file mode 100644 index 000000000..58bdb56ed --- /dev/null +++ b/source/d/gnucobol/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +gnucobol: gnucobol (open source COBOL compiler) +gnucobol: +gnucobol: GNU Cobol is an open source COBOL compiler. GNU Cobol implements a +gnucobol: substantial part of the COBOL 85, COBOL 2002, and COBOL 2014 +gnucobol: standards, as well as many extensions of the existent COBOL compilers. +gnucobol: GNU Cobol translates COBOL into C and compiles the translated code +gnucobol: using the native C compiler. GNU Cobol was written by Roger While and +gnucobol: Keisuke Nishida, with the invaluable assistance of many others. +gnucobol: +gnucobol: Homepage: ftp://ftp.gnu.org/gnu/gnucobol +gnucobol: |