diff options
-rw-r--r-- | misc/dos2unix/README | 22 | ||||
-rw-r--r-- | misc/dos2unix/dos2unix.SlackBuild | 97 | ||||
-rw-r--r-- | misc/dos2unix/dos2unix.info | 10 | ||||
-rw-r--r-- | misc/dos2unix/slack-desc | 19 |
4 files changed, 148 insertions, 0 deletions
diff --git a/misc/dos2unix/README b/misc/dos2unix/README new file mode 100644 index 0000000000000..4a80ae8256178 --- /dev/null +++ b/misc/dos2unix/README @@ -0,0 +1,22 @@ +This is an update of Benjamin Lin's implementations of dos2unix and +unix2dos. Benjamin Lin's implementations of dos2unix and unix2dos +are part of several Linux distributions such as RedHat, Fedora, Suse, +Gentoo and some others. On Slackware one finds fromdos and todos but +these implementations are not included. This update includes all RedHat +patches and fixes several other problems. + +These implementations of dos2unix and unix2dos have been modelled after +dos2unix/unix2dos under SunOS/Solaris. They have similar conversion +modes, namely ascii, 7bit and iso. The first versions were made by +John Birchfield in 1989, and in 1995 rewritten from scratch by Benjamin +Lin. Mac to Unix conversion was added by Bernd Johannes Wuebben in 1998, +Unix to Mac by Erwin in 2010. + +Features: + Native language support: Dutch, English, Esperanto, German, Spanish. + Automatically skips binary and non-regular files In-place, paired, + or stdio mode conversion. Keep original file dates option. 7-bit and + iso conversion modes like SunOS dos2unix. + +Dos2Unix includes: dos2unix - DOS/MAC to UNIX text file format converter +unix2dos - UNIX to DOS/MAC text file format converter diff --git a/misc/dos2unix/dos2unix.SlackBuild b/misc/dos2unix/dos2unix.SlackBuild new file mode 100644 index 0000000000000..b78d18bd79368 --- /dev/null +++ b/misc/dos2unix/dos2unix.SlackBuild @@ -0,0 +1,97 @@ +#!/bin/sh + +# Slackware build script for dos2unix + +# Copyright 2011 Chris Abela, Malta +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIE +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=dos2unix +VERSION=${VERSION:-5.3.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -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 \ + prefix=$PKG/usr \ + docdir=$PKG/usr/doc/$PRGNAM-$VERSION \ + mandir=$PKG/usr/man \ + install + +# 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 + +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} diff --git a/misc/dos2unix/dos2unix.info b/misc/dos2unix/dos2unix.info new file mode 100644 index 0000000000000..c9a4faad3ff42 --- /dev/null +++ b/misc/dos2unix/dos2unix.info @@ -0,0 +1,10 @@ +PRGNAM="dos2unix" +VERSION="5.3.1" +HOMEPAGE="http://www.xs4all.nl/~waterlan/dos2unix.html" +DOWNLOAD="http://sourceforge.net/projects/dos2unix/files/dos2unix/5.3.1/dos2unix-5.3.1.tar.gz" +MD5SUM="438c48ebd6891b80b58de14c022ca69e" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Chris Abela" +EMAIL="kristofru@gmail.com" +APPROVED="Niels Horn" diff --git a/misc/dos2unix/slack-desc b/misc/dos2unix/slack-desc new file mode 100644 index 0000000000000..884e7bdc143c7 --- /dev/null +++ b/misc/dos2unix/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 ':' except on otherwise blank lines. + + |------handy-ruler-----------------------------------------------------| +dos2unix: dos2unix (DOS or Mac to Unix and v.v. text files conversion) +dos2unix: +dos2unix: This is an update of Benjamin Lin's implementations of dos2unix and +dos2unix: unix2dos. These implementations of dos2unix and unix2dos have been +dos2unix: modelled after dos2unix/unix2dos under SunOS/Solaris. They have +dos2unix: similar conversion modes, namely ascii, 7bit and iso. +dos2unix: +dos2unix: Homepage: http://dos2unix.sourceforge.net/ +dos2unix: +dos2unix: +dos2unix: |