diff options
Diffstat (limited to 'misc/dos2unix/dos2unix.SlackBuild')
-rw-r--r-- | misc/dos2unix/dos2unix.SlackBuild | 50 |
1 files changed, 30 insertions, 20 deletions
diff --git a/misc/dos2unix/dos2unix.SlackBuild b/misc/dos2unix/dos2unix.SlackBuild index 3fdede8733..5f39d827ce 100644 --- a/misc/dos2unix/dos2unix.SlackBuild +++ b/misc/dos2unix/dos2unix.SlackBuild @@ -1,8 +1,14 @@ -#!/bin/sh +#!/bin/bash + # Slackware build script for dos2unix -# copyright 2017-2018 Donald Cooley, South Haven, IN, USA -# Ryan P.C. McQuen | Everett, WA | ryanpcmcquen@member.fsf.org +# Copyright 2023 K. Eugene Carlson, Tsukuba, Japan + +# Copyright 2022 Brandon Pribula, BC Canada + +# copyright 2017-2020 Donald Cooley, South Haven, IN, USA + +# Ryan P.C. McQuen | Everett, WA # Copyright 2011, 2012, 2013 Chris Abela, Malta # All rights reserved. @@ -24,10 +30,13 @@ # 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) + PRGNAM=dos2unix -VERSION=${VERSION:-7.4.0} +VERSION=${VERSION:-7.5.2} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -37,7 +46,14 @@ if [ -z "$ARCH" ]; then esac fi -CWD=$(pwd) +# 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 +fi + TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} @@ -59,42 +75,36 @@ find -L . \ if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" - LIBDIRSUFFIX="" fi RPM_OPT_FLAGS="$SLKCFLAGS" \ - make +make make check -make \ - prefix=$PKG/usr \ - docdir=$PKG/usr/doc/$PRGNAM-$VERSION \ - mandir=$PKG/usr/man \ - install +make strip +make install \ + prefix=/usr \ + docdir=/usr/doc/$PRGNAM-$VERSION \ + mandir=/usr/man \ + DESTDIR=$PKG # Put _all_ man pages under usr/man mv $PKG/usr/share/man/* $PKG/usr/man rmdir $PKG/usr/share/man -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 -cp -a INSTALL.txt $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild +rm $PKG/usr/doc/$PRGNAM-$VERSION/INSTALL.txt mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc 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 |