From bbd69cf4230e3a17b9100620d488c9a2aca21028 Mon Sep 17 00:00:00 2001 From: Larry Hajali Date: Fri, 6 Jan 2012 06:59:45 -0600 Subject: libraries/libnfs: Added (a client library for accessing NFS shares) Signed-off-by: Erik Hanson --- libraries/libnfs/README | 5 +++ libraries/libnfs/libnfs.SlackBuild | 81 ++++++++++++++++++++++++++++++++++++++ libraries/libnfs/libnfs.info | 10 +++++ libraries/libnfs/slack-desc | 19 +++++++++ 4 files changed, 115 insertions(+) create mode 100644 libraries/libnfs/README create mode 100644 libraries/libnfs/libnfs.SlackBuild create mode 100644 libraries/libnfs/libnfs.info create mode 100644 libraries/libnfs/slack-desc diff --git a/libraries/libnfs/README b/libraries/libnfs/README new file mode 100644 index 0000000000..1b4c36bb95 --- /dev/null +++ b/libraries/libnfs/README @@ -0,0 +1,5 @@ +LIBNFS is a client library for accessing NFS shares over a network. + +Note: when downloading with wget or through sbopkg add the +'--content-disposition' flag to get proper tarball. Otherwise, it will +just be downloaded as libnfs-$VERSION. :/ diff --git a/libraries/libnfs/libnfs.SlackBuild b/libraries/libnfs/libnfs.SlackBuild new file mode 100644 index 0000000000..1adcce5dde --- /dev/null +++ b/libraries/libnfs/libnfs.SlackBuild @@ -0,0 +1,81 @@ +#!/bin/sh + +# Slackware build script for libnfs + +# Written by Larry Hajali + +PRGNAM=libnfs +VERSION=${VERSION:-1.2.0} +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} + +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 + +set -e + +[ -e ${PRGNAM}-${VERSION} ] && mv ${PRGNAM}-${VERSION} sahlberg-$PRGNAM-$PRGNAM-$VERSION-0-g345422a.tar.gz +DIRNAME=$(tar -tf $CWD/sahlberg-$PRGNAM-$PRGNAM-$VERSION-0-g345422a.tar.gz | head -1) + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $DIRNAME +tar xvf $CWD/sahlberg-$PRGNAM-$PRGNAM-$VERSION-0-g345422a.tar.gz +cd $DIRNAME +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 {} \; + +./bootstrap + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --enable-static=no \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +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 + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYING README $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/libraries/libnfs/libnfs.info b/libraries/libnfs/libnfs.info new file mode 100644 index 0000000000..850f1b1732 --- /dev/null +++ b/libraries/libnfs/libnfs.info @@ -0,0 +1,10 @@ +PRGNAM="libnfs" +VERSION="1.2.0" +HOMEPAGE="https://github.com/sahlberg/libnfs" +DOWNLOAD="https://github.com/sahlberg/libnfs/tarball/libnfs-1.2.0" +MD5SUM="470d4d3a27bd3c20abb7a0a8b57974f3" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Larry Hajali" +EMAIL="larryhaja[at]gmail[dot]com" +APPROVED="Erik Hanson" diff --git a/libraries/libnfs/slack-desc b/libraries/libnfs/slack-desc new file mode 100644 index 0000000000..44d8465b90 --- /dev/null +++ b/libraries/libnfs/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------------------------------------------------------| +libnfs: libnfs (a client library for accessing NFS shares) +libnfs: +libnfs: LIBNFS is a client library for accessing NFS shares over a network. +libnfs: +libnfs: Homepage: https://github.com/sahlberg/libnfs +libnfs: +libnfs: +libnfs: +libnfs: +libnfs: +libnfs: -- cgit v1.2.3