You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
194 baris
7.6 KiB
194 baris
7.6 KiB
## |
|
## proftpd.spec -- OpenPKG RPM Specification |
|
## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH |
|
## Copyright (c) 2000-2001 The OpenPKG Project <http://www.openpkg.org/> |
|
## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@engelschall.com> |
|
## |
|
## Permission to use, copy, modify, and distribute this software for |
|
## any purpose with or without fee is hereby granted, provided that |
|
## the above copyright notice and this permission notice appear in all |
|
## copies. |
|
## |
|
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
|
## CONTRIBUTORS 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. |
|
## |
|
|
|
# package information |
|
Name: proftpd |
|
Summary: Professional FTP Daemon |
|
URL: http://www.proftpd.net/ |
|
Vendor: The ProFTPD Project |
|
Packager: The OpenPKG Project |
|
Distribution: OpenPKG [REL] |
|
Group: FTP |
|
License: GPL |
|
Version: 1.2.4 |
|
Release: 20011222 |
|
|
|
# list of sources |
|
Source0: ftp://ftp.proftpd.net/distrib/proftpd-%{version}.tar.bz2 |
|
Source1: proftpd.conf |
|
Source2: proftpd.msg.goaway |
|
Source3: proftpd.msg.login |
|
Source4: rc.proftpd |
|
Patch0: proftpd-%{version}.patch |
|
|
|
# build information |
|
Prefix: %{l_prefix} |
|
BuildRoot: %{l_buildroot} |
|
BuildPreReq: OpenPKG, openpkg >= 20011227, make |
|
PreReq: OpenPKG, openpkg >= 20011227 |
|
AutoReq: no |
|
AutoReqProv: no |
|
|
|
%description |
|
ProFTPD grew out of the desire to have a secure and configurable FTP |
|
server, and out of a significant admiration of the Apache web server. |
|
There are currently a very limited number of FTP servers running on unix |
|
(or unix-like) hosts. The most commonly used server is probably wu-ftpd. |
|
While wu-ftpd provides excellent performance and is generally a good |
|
product, it lacks numerous features found in newer Win32 FTP servers, and |
|
has a poor security history. Many people, including the developers who |
|
work on ProFTPD have spent a great deal of time fixing bugs and hacking |
|
features into wu-ftpd. Unfortunately, it quickly became clear that a |
|
complete redesign was necessary in order to implement the configurability |
|
and features desired. ProFTPD is not a hack based on any other server, |
|
it's an independent source tree from the ground up. Click here for a small |
|
list of some of the sites ProFTPD powers -- many of them handling large |
|
volumes of traffic on a daily basis. |
|
|
|
%prep |
|
%setup -q |
|
%patch -p0 |
|
|
|
%build |
|
# make non-standard "rundir" the same as standard "sysconfdir" |
|
%{l_rpmtool} subst \ |
|
's;^\(rundir=@localstatedir@\)/proftpd;\1;' \ |
|
-- Make.rules.in |
|
|
|
# configure the ProFTPd source tree |
|
CC="%{l_cc}" \ |
|
CFLAGS="%{l_cflags -O}" \ |
|
./configure \ |
|
--prefix=%{l_prefix} \ |
|
--sysconfdir=%{l_prefix}/etc/proftpd \ |
|
--localstatedir=%{l_prefix}/var/proftpd \ |
|
--with-modules=mod_ratio:mod_readme \ |
|
--enable-pam |
|
|
|
# build ProFTPd programs |
|
%{l_make} %{l_mflags -O} |
|
|
|
%install |
|
rm -rf $RPM_BUILD_ROOT |
|
|
|
# make sure the "install" procedure does not try |
|
# to perform explicit ownership assignments |
|
%{l_rpmtool} subst -v \ |
|
's;-o $(INSTALL_USER) -g $(INSTALL_GROUP);;g' \ |
|
's;chown;true;g' \ |
|
-- Makefile |
|
|
|
# perform the "install" procedure while redirecting |
|
# it to the temporarily install area |
|
%{l_make} %{l_mflags} \ |
|
install-proftpd install-utils install-man \ |
|
prefix=$RPM_BUILD_ROOT%{l_prefix} \ |
|
sysconfdir=$RPM_BUILD_ROOT%{l_prefix}/etc/proftpd \ |
|
localstatedir=$RPM_BUILD_ROOT%{l_prefix}/var/proftpd \ |
|
rundir=$RPM_BUILD_ROOT%{l_prefix}/var/proftpd |
|
|
|
# strip installation |
|
rm -f $RPM_BUILD_ROOT%{l_prefix}/sbin/in.proftpd |
|
|
|
# install more stuff manually |
|
%{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/share/proftpd |
|
%{l_shtool} install -c -m 644 doc/FAQ-config.html \ |
|
$RPM_BUILD_ROOT%{l_prefix}/share/proftpd/faq.html |
|
%{l_shtool} install -c -m 644 doc/Configuration.html \ |
|
$RPM_BUILD_ROOT%{l_prefix}/share/proftpd/cfg.html |
|
|
|
# extended installation with own stuff |
|
%{l_shtool} install -c -m 644 \ |
|
-e "s;@l_prefix@;%{l_prefix};g" \ |
|
-e "s;@l_npusr@;%{l_npusr};g" \ |
|
-e "s;@l_npgrp@;%{l_npgrp};g" \ |
|
%{SOURCE proftpd.conf} $RPM_BUILD_ROOT%{l_prefix}/etc/proftpd/ |
|
%{l_shtool} install -c -m 644 \ |
|
%{SOURCE proftpd.msg.goaway} \ |
|
%{SOURCE proftpd.msg.login} \ |
|
$RPM_BUILD_ROOT%{l_prefix}/etc/proftpd/ |
|
%{l_shtool} install -c -m 644 \ |
|
%{SOURCE proftpd.msg.login} \ |
|
$RPM_BUILD_ROOT%{l_prefix}/share/proftpd/.msg.login |
|
%{l_shtool} install -c -m 644 \ |
|
%{SOURCE proftpd.msg.goaway} \ |
|
$RPM_BUILD_ROOT%{l_prefix}/share/proftpd/.msg.goaway |
|
%{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d |
|
%{l_shtool} install -c -m 755 -e "s;@l_prefix@;%{l_prefix};g" \ |
|
%{SOURCE rc.proftpd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/ |
|
|
|
# determine the package ingredients |
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \ |
|
%{l_files_std} \ |
|
'%config %{l_prefix}/etc/proftpd/proftpd.conf' |
|
|
|
%files -f files |
|
|
|
%clean |
|
rm -rf $RPM_BUILD_ROOT |
|
|
|
%post |
|
# add PAM configuration entry |
|
check=`grep '^#<OpenPKG pkg=proftpd>' /etc/pam.conf` |
|
if [ ".$check" = . ]; then |
|
( echo "#<OpenPKG pkg=proftpd>" |
|
case "%{l_target}" in |
|
*-freebsd* ) |
|
echo "proftpd auth sufficient pam_skey.so" |
|
echo "proftpd auth required pam_unix.so try_first_pass" |
|
echo "proftpd account required pam_unix.so try_first_pass" |
|
echo "proftpd session required pam_permit.so" |
|
;; |
|
*-linux* ) |
|
echo "proftpd auth required /lib/security/pam_unix.so shadow nodelay" |
|
echo "proftpd auth required /lib/security/pam_nologin.so" |
|
echo "proftpd account required /lib/security/pam_unix.so" |
|
echo "proftpd session required /lib/security/pam_unix.so" |
|
;; |
|
*-solaris* ) |
|
echo "proftpd auth required /usr/lib/security/pam_unix.so try_first_pass" |
|
echo "proftpd account required /usr/lib/security/pam_unix.so try_first_pass" |
|
echo "proftpd session required /usr/lib/security/pam_unix.so" |
|
;; |
|
esac |
|
echo "#</OpenPKG>" |
|
) >>/etc/pam.conf |
|
fi |
|
|
|
%preun |
|
# remove PAM configuration entry |
|
if [ $1 -eq 0 ]; then |
|
check=`grep '^#<OpenPKG pkg=proftpd>' /etc/pam.conf` |
|
if [ ".$check" != . ]; then |
|
cp /etc/pam.conf /etc/pam.conf.tmp && \ |
|
sed -e '/^#<OpenPKG pkg=proftpd>/,/^#<\/OpenPKG>/d' \ |
|
</etc/pam.conf.tmp >/etc/pam.conf && \ |
|
rm -f /etc/pam.conf.tmp |
|
fi |
|
$RPM_INSTALL_PREFIX/etc/rc proftpd stop |
|
rm -f $RPM_INSTALL_PREFIX/var/proftpd/*.log |
|
rm -f $RPM_INSTALL_PREFIX/var/proftpd/*.pid |
|
fi |
|
|
|
|