diff options
author | Steven King <kingrst@gmail.com> | 2010-11-27 23:35:39 -0600 |
---|---|---|
committer | Heinz Wiesinger <pprkut@slackbuilds.org> | 2010-11-29 12:45:56 +0100 |
commit | 5cce8befbc806b5511dfc3b8936d32aa67747934 (patch) | |
tree | d7953be9a8a494480150d985367f499ef2d69446 /network/csync | |
parent | 31ececa12a18aeb26c845ac9a5ec01296f14172b (diff) |
network/csync: Added (file synchronizer)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'network/csync')
-rw-r--r-- | network/csync/README | 8 | ||||
-rw-r--r-- | network/csync/csync.SlackBuild | 105 | ||||
-rw-r--r-- | network/csync/csync.info | 10 | ||||
-rw-r--r-- | network/csync/doinst.sh | 17 | ||||
-rw-r--r-- | network/csync/slack-desc | 19 |
5 files changed, 159 insertions, 0 deletions
diff --git a/network/csync/README b/network/csync/README new file mode 100644 index 0000000000000..323a087faf0a7 --- /dev/null +++ b/network/csync/README @@ -0,0 +1,8 @@ +Csync is a file synchronizer especially designed for you, the normal user. + +To be more precise csync is a client only bidirectional file synchronizer. +You can use csync for different things. The intention is to provide Roaming +Home Directories for Linux but you can use it to synchronize your music +collection or create a backup of a directory. + +Csync requires log4c, iniparser, and check. diff --git a/network/csync/csync.SlackBuild b/network/csync/csync.SlackBuild new file mode 100644 index 0000000000000..e26ded724b67e --- /dev/null +++ b/network/csync/csync.SlackBuild @@ -0,0 +1,105 @@ +#!/bin/sh + +# Slackware build script for Csync + +# Copyright 2010, Steven King <kingrst@gmail.com> +# 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=csync +VERSION=0.44.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 + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +rm -rf $TMP/$PRGNAM-$VERSION +cd $TMP +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +# Make our build directory +mkdir build +cd build + cmake .. \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_INSTALL_DIR=/usr/lib${LIBDIRSUFFIX} \ + -DLIB_SUFFIX=64 \ + -DSYSCONF_INSTALL_DIR=/etc \ + -DMAN_INSTALL_DIR=/usr/man + make + make install DESTDIR=$PKG +cd .. + +# Don't clobber config files +mv $PKG/etc/csync/csync_exclude.conf $PKG/etc/csync/csync_exclude.conf.new +mv $PKG/etc/csync/csync.conf $PKG/etc/csync/csync.conf.new +mv $PKG/etc/csync/csync_log.conf $PKG/etc/csync/csync_log.conf.new + +find $PKG | xargs 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 {} \; + +mkdir $PKG/usr/doc +mv $PKG/usr/share/doc/csync $PKG/usr/doc/$PRGNAM-$VERSION +rm -rf $PKG/usr/share/doc ; rmdir $PKG/usr/share 2>/dev/null || true +cp -a \ + AUTHORS COPYING ChangeLog INSTALL README TODO \ + $PKG/usr/doc/$PRGNAM-$VERSION +find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \; +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/network/csync/csync.info b/network/csync/csync.info new file mode 100644 index 0000000000000..13eb5916029cb --- /dev/null +++ b/network/csync/csync.info @@ -0,0 +1,10 @@ +PRGNAM="csync" +VERSION="0.44.0" +HOMEPAGE="http://www.csync.org" +DOWNLOAD="http://www.csync.org/files/csync-0.44.0.tar.gz" +MD5SUM="9f3a38d1608146ad0775feb475567972" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Steven King" +EMAIL="kingrst@gmail.com" +APPROVED="rworkman" diff --git a/network/csync/doinst.sh b/network/csync/doinst.sh new file mode 100644 index 0000000000000..c9db1e855800f --- /dev/null +++ b/network/csync/doinst.sh @@ -0,0 +1,17 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/csync/csync_exclude.conf +config etc/csync/csync.conf +config etc/csync/csync_log.conf + diff --git a/network/csync/slack-desc b/network/csync/slack-desc new file mode 100644 index 0000000000000..cebaaba27164d --- /dev/null +++ b/network/csync/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 ':'. + + |-----handy-ruler------------------------------------------------------| +csync: csync (file synchronizer) +csync: +csync: Csync is a file synchronizer especially designed for you, +csync: the normal user. +csync: +csync: Homepage: http://www.csync.org/ +csync: +csync: +csync: +csync: +csync: |