pureftpd.spec 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. ##
  2. ## pureftpd.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2002 Ralf S. Engelschall <rse@engelschall.com>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package options
  26. %ifndef with_pam
  27. %define with_pam no
  28. %endif
  29. # package information
  30. Name: pureftpd
  31. Summary: Alternative FTP Server
  32. URL: http://www.pureftpd.org/
  33. Vendor: A.Gulbrandsen, Frank DENIS
  34. Packager: The OpenPKG Project
  35. Distribution: OpenPKG [REL]
  36. Group: FTP
  37. License: GPL
  38. Version: 1.1.0
  39. Release: 20020315
  40. # list of sources
  41. Source0: http://prdownloads.sourceforge.net/pureftpd/pure-ftpd-%{version}.tar.gz
  42. Source1: rc.pureftpd
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20020206, make
  47. PreReq: OpenPKG, openpkg >= 20020206
  48. %if "%{with_pam}" == "yes"
  49. BuildPreReq: PAM
  50. PreReq: PAM
  51. %endif
  52. AutoReq: no
  53. AutoReqProv: no
  54. %description
  55. Pure-FTPd is a fast, production-quality, standard-conformant FTP
  56. server, based upon Troll-FTPd. Unlike other popular FTP servers,
  57. it's designed to be secure in default configuration, has no known
  58. buffer overflow, it is really trivial to set up and it is especially
  59. designed for modern kernels. Features include PAM support, IPv6,
  60. chroot()ed home directories, virtual domains, built-in 'ls',
  61. anti-warez system, bounded ports for passive downloads, FXP
  62. protocol, bandwidth throttling, ratios, LDAP, XML and HTML reports,
  63. support for external programs to post-process uploads and more.
  64. %prep
  65. %setup -q -n pure-ftpd-%{version}
  66. %build
  67. CC="%{l_cc}" \
  68. CFLAGS="%{l_cflags -O}" \
  69. %if "%{with_pam}" == "yes"
  70. CPPFLAGS="-I`%{l_prefix}/etc/rc --query pam_incdir`" \
  71. LDFLAGS="-L`%{l_prefix}/etc/rc --query pam_libdir`" \
  72. %endif
  73. ./configure \
  74. --prefix=%{l_prefix} \
  75. --sysconfdir=%{l_prefix}/etc/pureftpd \
  76. --without-inetd \
  77. --without-humor \
  78. --without-cookie \
  79. --without-welcomemsg \
  80. %if "%{with_pam}" == "yes"
  81. --with-pam \
  82. %endif
  83. --with-ftpwho \
  84. --with-virtualhosts \
  85. --with-language=english
  86. %{l_make} %{l_mflags -O}
  87. %install
  88. rm -rf $RPM_BUILD_ROOT
  89. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  90. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  91. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  92. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  93. %{SOURCE rc.pureftpd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  94. strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
  95. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  96. %files -f files
  97. %clean
  98. rm -rf $RPM_BUILD_ROOT
  99. %post
  100. %if "%{with_pam}" == "yes"
  101. # add PAM configuration entry
  102. if [ $1 -eq 1 ]; then
  103. $RPM_INSTALL_PREFIX/sbin/pamtool -a -s -n "pureftpd"
  104. fi
  105. %endif
  106. %preun
  107. %if "%{with_pam}" == "yes"
  108. # remove PAM configuration entry
  109. if [ $1 -eq 0 ]; then
  110. $RPM_INSTALL_PREFIX/sbin/pamtool -r -s -n "pureftpd"
  111. fi
  112. %endif