Search
j0ke.net Open Build Service
>
Projects
>
oldschool
>
proftpd
> proftpd-1.3.0a.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File proftpd-1.3.0a.spec of Package proftpd
%define TYPE UNSTABLE Summary: ProFTPD -- Professional FTP Server. Name: proftpd Version: 1.3.0a Release: 1 Copyright: GPL Group: System Environment/Daemons Vendor: InterNetX GmbH Packager: InterNetX Package Maintainer <packager@internetx.de> URL: http://www.proftpd.org/ # Source: ftp://ftp.proftpd.org/distrib/%{name}-%{version}.tar.bz2 Source: %{name}-%{version}.tar.bz2 Prefix: /usr BuildRoot: %{_tmppath}/%{name}-%{version}-root Requires: pam >= 0.72 BuildPreReq: patch gcc Provides: ftpserver Prereq: fileutils Patch: proftpd-1.2.10.diff # Obsoletes: proftpd-core %description ProFTPD is an enhanced FTP server with a focus toward simplicity, security, and ease of configuration. It features a very Apache-like configuration syntax, and a highly customizable server infrastructure, including support for multiple 'virtual' FTP servers, anonymous FTP, and permission-based directory visibility. There are two other packages you can use to setup for inetd or standalone operation. # %package standalone # Summary: ProFTPD -- Setup for standalone operation. # Group: System Environment/Daemons # Requires: proftpd chkconfig # Obsoletes: proftpd-inetd # %description standalone # This package is neccesary to setup ProFTPD in standalone operation. # %package inetd # Summary: ProFTPD -- Setup for inetd operation. # Group: System Environment/Daemons # Requires: proftpd # Obsoletes: proftpd-standalone # %description inetd # This package is neccesary to setup ProFTPD to run from inetd. %prep %setup -q CFLAGS="$RPM_OPT_FLAGS" ./configure \ --prefix=%{prefix} \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --enable-pam \ --localstatedir=/var/run \ --with-modules=mod_ratio:mod_readme %patch -p1 %build make %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT make prefix=$RPM_BUILD_ROOT%{prefix} \ mandir=$RPM_BUILD_ROOT/usr/share/man \ localstatedir=$RPM_BUILD_ROOT/var/run \ rundir=$RPM_BUILD_ROOT/var/run/proftpd \ INSTALL_USER=`id -un` INSTALL_GROUP=`id -gn` \ sysconfdir=$RPM_BUILD_ROOT/etc install mkdir -p $RPM_BUILD_ROOT/home/ftp mkdir -p $RPM_BUILD_ROOT/etc/pam.d mkdir -p $RPM_BUILD_ROOT/usr/sbin mkdir -p $RPM_BUILD_ROOT/usr/bin install -m 644 contrib/dist/rpm/ftp.pamd $RPM_BUILD_ROOT/etc/pam.d/ftp install -m 644 sample-configurations/basic.conf $RPM_BUILD_ROOT/etc/proftpd.conf install -m 755 proftpd ftpshut $RPM_BUILD_ROOT/usr/sbin install -m 755 ftpcount ftptop ftpwho $RPM_BUILD_ROOT/usr/bin mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d sed -e '/FTPSHUT=/c\' \ -e 'FTPSHUT=%{prefix}/sbin/ftpshut' \ contrib/dist/rpm/proftpd.init.d \ > contrib/dist/rpm/proftpd.init.d.tmp mv --force contrib/dist/rpm/proftpd.init.d.tmp contrib/dist/rpm/proftpd.init.d install contrib/dist/rpm/proftpd.init.d $RPM_BUILD_ROOT/etc/rc.d/init.d/proftpd mkdir -p $RPM_BUILD_ROOT/%{_docdir} install -m 644 COPYING CREDITS ChangeLog NEWS $RPM_BUILD_ROOT/%{_docdir} mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates cp PATCH/rc.config.proftpd $RPM_BUILD_ROOT/var/adm/fillup-templates mkdir -p $RPM_BUILD_ROOT/etc/init.d install PATCH/proftpd $RPM_BUILD_ROOT/etc/init.d/proftpd ln -s /etc/init.d/proftpd $RPM_BUILD_ROOT/usr/sbin/rcproftpd ln -s /usr/sbin/proftpd $RPM_BUILD_ROOT/usr/sbin/in.proftpd cp PATCH/proftpd.conf $RPM_BUILD_ROOT/etc # %pre # if [ ! -f /etc/ftpusers ]; then # touch /etc/ftpusers # IFS=":" # while { read username nu nu gid nu; }; do # if [ $gid -le 100 -a "$username" != "ftp" ]; then # echo $username # fi # done < /etc/passwd > /etc/ftpusers # fi %post echo "Updating etc/rc.config..." if [ -x bin/fillup ] ; then bin/fillup -q -d = etc/rc.config var/adm/fillup-templates/rc.config.proftpd else echo "ERROR: fillup not found. This should not happen. Please compare" echo "etc/rc.config and var/adm/fillup-templates/rc.config.proftpd and" echo "update by hand." fi # Create symbolic run level links during installation sbin/insserv /etc/init.d/proftpd %preun sbin/insserv etc/init.d/ # %preun # if [ "$1" = 0 ]; then # if [ -d /var/run/proftpd ]; then # rm -rf /var/run/proftpd/* # fi # fi # %post standalone # /sbin/chkconfig --add proftpd # # Force the "ServerType" directive for this operation type. # tmpfile=/tmp/proftpd-conf.$$ # sed -e '/ServerType/c\' \ # -e 'ServerType standalone' \ # /etc/proftpd.conf \ # > $tmpfile # mv $tmpfile /etc/proftpd.conf # %preun standalone # if [ "$1" = 0 ]; then # /sbin/chkconfig --del proftpd # fi # %post inetd # # Force the "ServerType" directive for this operation type. # tmpfile=/tmp/proftpd-conf.$$ # sed -e '/ServerType/c\' \ # -e 'ServerType inetd' \ # /etc/proftpd.conf \ # > $tmpfile # mv $tmpfile /etc/proftpd.conf # # # Look if there is already an entry for 'ftp' service even when commented. # grep '^[#[:space:]]*ftp' /etc/inetd.conf > /dev/null # errcode=$? # if [ $errcode -eq 0 ]; then # # Found, replace the 'in.ftpd' with 'in.proftpd' # tmpfile=/tmp/proftpd-inetd.$$ # sed -e '/^[#[:space:]]*ftp/{' \ # -e 's^in.ftpd.*$^in.proftpd^' \ # -e '}' \ # /etc/inetd.conf \ # > $tmpfile # mv $tmpfile /etc/inetd.conf # else # # Not found, append a new entry. # echo 'ftp stream tcp nowait root /usr/sbin/tcpd in.proftpd' >> /etc/inetd.conf # fi # # Reread 'inetd.conf' file. # killall -HUP inetd || : # %postun inetd # if [ "$1" = 0 ]; then # # Remove ProFTPD entry from /etc/inetd.conf # tmpfile=/tmp/proftpd-inetd.$$ # sed -e '/^.*proftpd.*$/d' /etc/inetd.conf > $tmpfile # mv $tmpfile /etc/inetd.conf # killall -HUP inetd || : # fi %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT rm -rf %{_builddir}/%{name}-%{version} %files %defattr(-,root,root) /etc/init.d/proftpd /usr/sbin/* /usr/bin/* /var/adm/fillup-templates/rc.config.proftpd %dir /var/run/proftpd # %dir /home/ftp %config(noreplace) /etc/pam.d/ftp %config(noreplace) /etc/proftpd.conf %doc COPYING CREDITS ChangeLog NEWS %doc README* doc/* %doc contrib/xferstats.holger-preiss %doc sample-configurations /usr/share/man/*/* # %files standalone # %defattr(-,root,root) # /etc/rc.d/init.d/proftpd # %config(noreplace) /etc/proftpd.conf # %files inetd # %defattr(-,root,root) # %config(noreplace) /etc/proftpd.conf