proftpd.spec.in
上传用户:pycemail
上传日期:2007-01-04
资源大小:329k
文件大小:3k
- Summary: ProFTPD -- Professional FTP Server.
- Name: proftpd
- Version: @VERSION@
- Release: 1
- Source: ftp://ftp.tos.net/pub/proftpd/%{name}-%{version}.tar.gz
- Source1: proftpd.conf
- Copyright: GPL
- Group: System Environment/Daemons
- Packager: MacGyver (aka Habeeb J. Dihu) <macgyver@tos.net>
- Vendor: The ProFTPD Group
- Requires: pam >= 0.59
- Provides: ftpserver
- Prereq: fileutils
- BuildRoot: /var/tmp/%{name}-%{version}-root
- %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.
- %prep
- %setup -q
- ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/run --with-modules=mod_pam:mod_linuxprivs:mod_ratio:mod_readme
- %build
- make CFLAGS="$RPM_OPT_FLAGS"
- %install
- rm -rf $RPM_BUILD_ROOT
- make prefix=$RPM_BUILD_ROOT/usr localstatedir=$RPM_BUILD_ROOT/var/run rundir=$RPM_BUILD_ROOT/var/run/proftpd sysconfdir=$RPM_BUILD_ROOT/etc install
- mkdir -p $RPM_BUILD_ROOT/etc/pam.d
- mkdir -p $RPM_BUILD_ROOT/home/ftp
- install -m 644 contrib/ftp.pamd $RPM_BUILD_ROOT/etc/pam.d/ftp
- install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/proftpd.conf
- touch $RPM_BUILD_ROOT/etc/ftpusers
- %post
- # 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 || :
- %preun
- if [ $1 = 0 ]; then
- if [ -d /var/run/proftpd ]; then
- rm -rf /var/run/proftpd/*
- fi
- fi
- %postun
- if [ $1 = 0 ]; then
- if [ -d /var/run/proftpd ]; then
- rm -rf /var/run/proftpd
- fi
- # 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
- rm -rf $RPM_BUILD_ROOT
- %files
- %attr(-,root,man) /usr/man/*/*
- %doc README README.* doc/*
- %doc contrib/README contrib/README.* contrib/xferstats.holger-preiss
- %doc sample-configurations/*
- %config(noreplace) /etc/proftpd.conf
- %config(noreplace) /etc/pam.d/ftp
- %config(noreplace) /etc/ftpusers
- /usr/sbin/*
- /usr/bin/*
- %dir /var/run/proftpd
- %dir /home/ftp
- %changelog
- * Sat Jul 24 1999 MacGyver <macgyver@tos.net>
- Initial import of spec.