diff options
author | Christophe Trussardi <chris@teria.org> | 2013-01-02 21:12:20 +0100 |
---|---|---|
committer | dsomero <xgizzmo@slackbuilds.org> | 2013-01-09 18:52:16 -0500 |
commit | 7300e7bd4d79f84b00b0d31cb3fffc53e77f6299 (patch) | |
tree | 12bc071f57015762320d21b2309306dd80c556e8 /network/pure-ftpd/pure-ftpd.SlackBuild | |
parent | 77df938196d1ac4b21673e2daca6b080793d8894 (diff) |
network/pure-ftpd: Added (FTP server).
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'network/pure-ftpd/pure-ftpd.SlackBuild')
-rw-r--r-- | network/pure-ftpd/pure-ftpd.SlackBuild | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/network/pure-ftpd/pure-ftpd.SlackBuild b/network/pure-ftpd/pure-ftpd.SlackBuild new file mode 100644 index 0000000000000..d195cc9382613 --- /dev/null +++ b/network/pure-ftpd/pure-ftpd.SlackBuild @@ -0,0 +1,115 @@ +#!/bin/sh + +# Slackware build script for pure-ftpd + +# Copyright (c) 2012, Christophe Trussardi, Paris, France +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# 1.- Redistributions of source code 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=pure-ftpd +VERSION=${VERSION:-1.0.36} +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 + +[ "${MYSQL:-no}" = "no" ] || mysql_option="--with-mysql" +[ "${PGSQL:-no}" = "no" ] || pgsql_option="--with-pgsql" +[ "${TLS:-no}" = "no" ] || tls_option="--with-tls" +[ "${LANGUAGE:-english}" = "english" ] || lang_option="--with-language=$LANGUAGE" + +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 . +chmod -R u+w,go+r-w,a-s . + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib$LIBDIRSUFFIX \ + --sysconfdir=/etc/pure-ftpd \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --build=$ARCH-slackware-linux \ + --with-everything \ + --without-inetd \ + --without-capabilities \ + --without-pam \ + --with-virtualchroot \ + $mysql_option $pgsql_option $tls_option $lang_option + +make +make install-strip DESTDIR=$PKG + +install -m 0755 configuration-file/pure-config.pl $PKG/usr/sbin/pure-config.pl + +mkdir -p $PKG/etc/pure-ftpd $PKG/etc/rc.d +for configfile in pureftpd-ldap.conf pureftpd-mysql.conf pureftpd-pgsql.conf pureftpd.schema; do + install -m 0600 $configfile $PKG/etc/pure-ftpd/$configfile.new +done +cat $CWD/config/pure-ftpd.conf > $PKG/etc/pure-ftpd/pure-ftpd.conf.new +install -m 0755 $CWD/config/rc.pure-ftpd $PKG/etc/rc.d/rc.pure-ftpd.new + +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 + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +install -m 0644 \ + AUTHORS CONTACT COPYING ChangeLog FAQ HISTORY INSTALL NEWS README* THANKS pureftpd* \ + $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 +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |