Browse Source

a/davfs2: Upgraded to version 1.4.0.

slackware-14.2
Damien Goutte-Gattat 13 years ago
parent
commit
4dfd099a02
  1. 1
      a/davfs2/davfs2-1.3.2.tar.gz.sha1
  2. 1
      a/davfs2/davfs2-1.4.0.tar.gz.sha1
  3. 61
      a/davfs2/davfs2.SlackBuild
  4. 22
      a/davfs2/doinst.sh

1
a/davfs2/davfs2-1.3.2.tar.gz.sha1

@ -1 +0,0 @@
eab54322b80a4813b726f696d8ccc13d591262b0 davfs2-1.3.2.tar.gz

1
a/davfs2/davfs2-1.4.0.tar.gz.sha1

@ -0,0 +1 @@
ffd739b5980fcf37e9fa8b4179e1eb5fa2cdc3af davfs2-1.4.0.tar.gz

61
a/davfs2/davfs2.SlackBuild

@ -1,38 +1,41 @@
#!/bin/bash
# Build script for Slackware
# Damien Goutte-Gattat "gouttegd" <damien.goutte-gattat at e.ujf-grenoble.fr>
# Copyright (C) 2008,2009 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications, is
# permitted provided that the following conditions are met:
# Redistribution and use of this script, with or without modifications,
# 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.
# 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.
# 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.
#
# Contact: Damien Goutte-Gattat <damien.goutte-gattat@e.ujf-grenoble.fr>
#
# Latest davfs2 sourcecode is available at:
# http://dav.sourceforge.net/
# <http://savannah.nongnu.org/projects/davfs2>.
# Source package infos
NAMESRC=${NAMESRC:-davfs2}
VERSION=${VERSION:-1.3.2}
VERSION=${VERSION:-1.4.0}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
WGET=${WGET:-http://mesh.dl.sourceforge.net/sourceforge/dav/$ARCHIVE}
WGET=${WGET:-http://mirrors.linhub.com/savannah/davfs2/$ARCHIVE}
# Built package infos
# Build infos
NAMETGZ=${NAMETGZ:-davfs2}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-i486}
TARGET=${TARGET:-i486}
JOBS=${JOBS:-1}
# Directories
TMP=${TMP:-/tmp}
@ -57,6 +60,9 @@ case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
;;
x86_64)
CPUOPT="-O2 -fPIC"
;;
*)
CPUOPT="-O2"
;;
@ -67,7 +73,7 @@ if [ ! -r $ARCHIVE ]; then
wget "$WGET"
fi
sha1sum -c $ARCHIVE.sha1
NAME=$(tar ft $ARCHIVE | head -1 | cut -d / -f 1)
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
# Compile
cd $TMP
@ -79,12 +85,14 @@ CXXFLAGS=$CPUOPT \
LINGUAS=en \
dav_user=davfs2 \
dav_group=davfs2 \
dav_localstatedir=/var/run \
dav_syscachedir=/var/cache \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/man \
--docdir=/usr/doc/$NAME
make -j 3
make -j $JOBS
make install DESTDIR=$PKG
# Strip binaries
@ -95,14 +103,23 @@ find $PKG | xargs file | grep "ELF 32-bit LSB" | cut -d : -f 1 | \
# in the wrong place (despite --mandir)...
mv $PKG/usr/share/man $PKG/usr/man
# What remains in /usr/share seems unnecessary (it's a copy of the
# configuration files already installed in /etc/davfs2)
rm -rf $PKG/usr/share
# Protect existing configuration files
mv $PKG/etc/davfs2/davfs2.conf $PKG/etc/davfs2/davfs2.conf.new
mv $PKG/etc/davfs2/secrets $PKG/etc/davfs2/secrets.new
# Fix symlinks in /sbin
rm $PKG/sbin/{,u}mount.davfs
ln -sv /usr/sbin/mount.davfs $PKG/sbin/mount.davfs
ln -sv /usr/sbin/umount.davfs $PKG/sbin/umount.davfs
# Copy slack-desc file
# Copy slack-desc and doinst.sh files
mkdir -p $PKG/install
install -m 644 $CWD/slack-desc $PKG/install/slack-desc
install -m 755 $CWD/doinst.sh $PKG/install/doinst.sh
# Package the tree
cd $PKG

22
a/davfs2/doinst.sh

@ -0,0 +1,22 @@
#!/bin/sh
config()
{
NEW="$1"
OLD="`dirname $NEW`/`basename $NEW .new`"
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then
rm $NEW
fi
}
config /etc/davfs2/davfs2.conf.new
config /etc/davfs2/secrets.new
if ! grep ^davfs2 /etc/group > /dev/null ; then
/usr/sbin/groupadd davfs2
fi
if ! grep ^davfs2 /etc/passwd > /dev/null ; then
/usr/sbin/useradd -c WebDAV -d /var/cache/davfs2 -g davfs2 davfs2 \
-s /bin/false
fi
Loading…
Cancel
Save