diff options
Diffstat (limited to 'libraries/libcsv')
-rw-r--r-- | libraries/libcsv/Makefile.patch | 25 | ||||
-rw-r--r-- | libraries/libcsv/README | 4 | ||||
-rwxr-xr-x | libraries/libcsv/libcsv.SlackBuild | 96 | ||||
-rw-r--r-- | libraries/libcsv/libcsv.info | 10 | ||||
-rw-r--r-- | libraries/libcsv/slack-desc | 18 |
5 files changed, 153 insertions, 0 deletions
diff --git a/libraries/libcsv/Makefile.patch b/libraries/libcsv/Makefile.patch new file mode 100644 index 0000000000000..bb2aedbd138a8 --- /dev/null +++ b/libraries/libcsv/Makefile.patch @@ -0,0 +1,25 @@ +diff -Nur libcsv-3.0.0.orig//Makefile libcsv-3.0.0/Makefile +--- libcsv-3.0.0.orig//Makefile 2008-07-26 20:48:28.000000000 -0500 ++++ libcsv-3.0.0/Makefile 2010-05-11 00:01:39.900783556 -0500 +@@ -17,6 +17,7 @@ + install_static: install_headers install_static_lib + + install_man: csv.3.gz ++ mkdir -p $(DESTDIR)$(MANDIR)/ + cp -f $^ $(DESTDIR)$(MANDIR)/ + + install_headers: csv.h +@@ -24,11 +25,13 @@ + cp -f $^ $(DESTDIR)$(INCDIR)/libcsv/ + + install_shared_lib: libcsv.so ++ mkdir -p $(DESTDIR)$(LIBDIR) + cp -f $< $(DESTDIR)$(LIBDIR)/$<.$(VERSION) + ln -sf $<.$(VERSION) $(DESTDIR)$(LIBDIR)/$<.3 + ln -sf $<.3 $(DESTDIR)$(LIBDIR)/$< + + install_static_lib: libcsv.a ++ mkdir -p $(DESTDIR)$(LIBDIR) + cp -f $< $(DESTDIR)$(LIBDIR)/$< + + libcsv.o: libcsv.c csv.h diff --git a/libraries/libcsv/README b/libraries/libcsv/README new file mode 100644 index 0000000000000..3807591eabf10 --- /dev/null +++ b/libraries/libcsv/README @@ -0,0 +1,4 @@ +libcsv is a small, simple and fast CSV library written in pure ANSI C89 that +can read and write CSV data. It provides a straight-forward interface using +callback functions to handle parsed fields and rows and can parse improperly +formatted CSV files. diff --git a/libraries/libcsv/libcsv.SlackBuild b/libraries/libcsv/libcsv.SlackBuild new file mode 100755 index 0000000000000..b25f008d8ab03 --- /dev/null +++ b/libraries/libcsv/libcsv.SlackBuild @@ -0,0 +1,96 @@ +#!/bin/sh + +# Copyright 2008, 2009, 2010 Tarantino Antonino, Palermo, Italy. +# 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 IMPLIED +# 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=libcsv +VERSION=${VERSION:-"3.0.0"} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +# Automatically determine architecture for build & packaging: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* || exit 1 +cd $PRGNAM-$VERSION || exit 1 +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 {} \; + +# Make sure the Makefile creates all needed directories before installing +patch -p1 < $CWD/Makefile.patch + +make \ + CC="gcc $SLKCFLAGS" \ + LIBDIR=/usr/lib${LIBDIRSUFFIX} \ + MANDIR=/usr/man/man3 + +make install \ + CC="gcc $SLKCFLAGS" \ + LIBDIR=/usr/lib${LIBDIRSUFFIX} \ + MANDIR=/usr/man/man3 \ + DESTDIR=$PKG + +find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + Changelog FAQ INSTALL LICENSE README \ + $PKG/usr/doc/$PRGNAM-$VERSION +chmod 0644 $PKG/usr/doc/$PRGNAM-$VERSION/* + +mkdir $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/libraries/libcsv/libcsv.info b/libraries/libcsv/libcsv.info new file mode 100644 index 0000000000000..a390649f0e9ea --- /dev/null +++ b/libraries/libcsv/libcsv.info @@ -0,0 +1,10 @@ +PRGNAM="libcsv" +VERSION="3.0.0" +HOMEPAGE="http://sourceforge.net/projects/libcsv/" +DOWNLOAD="http://downloads.sourceforge.net/libcsv/libcsv-3.0.0.tar.gz" +MD5SUM="04ade4e8198c920c7e7857c47e24b818" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Tarantino Antonino" +EMAIL="metrofox9@gmail.com" +APPROVED="rworkman" diff --git a/libraries/libcsv/slack-desc b/libraries/libcsv/slack-desc new file mode 100644 index 0000000000000..948e6900688a0 --- /dev/null +++ b/libraries/libcsv/slack-desc @@ -0,0 +1,18 @@ +# 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--------------------------------------------------------| +libcsv: libcsv( CSV's Library ) +libcsv: +libcsv: libcsv is a small, simple and fast CSV library written in pure +libcsv: ANSI C89 that can read and write CSV data. It provides a +libcsv: straight-forward interface using callback functions to handle +libcsv: fields and rows and can parse improperly formatted CSV files. +libcsv: +libcsv: +libcsv: +libcsv: Homepage: http://sourceforge.net/projects/libcsv/ +libcsv: |