pureftpd.spec 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. ##
  2. ## pureftpd.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2003 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 information
  26. Name: pureftpd
  27. Summary: Alternative FTP Server
  28. URL: http://www.pureftpd.org/
  29. Vendor: A.Gulbrandsen, Frank DENIS
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [BASE]
  32. Group: FTP
  33. License: GPL
  34. Version: 1.1.0
  35. Release: 20030103
  36. # package options
  37. %option with_pam no
  38. # list of sources
  39. Source0: http://osdn.dl.sourceforge.net/sourceforge/pureftpd/pure-ftpd-%{version}.tar.gz
  40. Source1: rc.pureftpd
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20030103, make
  45. PreReq: OpenPKG, openpkg >= 20030103
  46. %if "%{with_pam}" == "yes"
  47. BuildPreReq: PAM
  48. PreReq: PAM
  49. %endif
  50. AutoReq: no
  51. AutoReqProv: no
  52. %description
  53. Pure-FTPd is a fast, production-quality, standard-conformant FTP
  54. server, based upon Troll-FTPd. Unlike other popular FTP servers,
  55. it's designed to be secure in default configuration, has no known
  56. buffer overflow, it is really trivial to set up and it is especially
  57. designed for modern kernels. Features include PAM support, IPv6,
  58. chroot()ed home directories, virtual domains, built-in 'ls',
  59. anti-warez system, bounded ports for passive downloads, FXP
  60. protocol, bandwidth throttling, ratios, LDAP, XML and HTML reports,
  61. support for external programs to post-process uploads and more.
  62. %prep
  63. %setup -q -n pure-ftpd-%{version}
  64. %build
  65. CC="%{l_cc}" \
  66. CFLAGS="%{l_cflags -O}" \
  67. %if "%{with_pam}" == "yes"
  68. CPPFLAGS="-I`%{l_prefix}/etc/rc --query pam_incdir`" \
  69. LDFLAGS="-L`%{l_prefix}/etc/rc --query pam_libdir`" \
  70. %endif
  71. ./configure \
  72. --prefix=%{l_prefix} \
  73. --sysconfdir=%{l_prefix}/etc/pureftpd \
  74. --without-inetd \
  75. --without-humor \
  76. --without-cookie \
  77. --without-welcomemsg \
  78. %if "%{with_pam}" == "yes"
  79. --with-pam \
  80. %endif
  81. --with-ftpwho \
  82. --with-virtualhosts \
  83. --with-language=english
  84. %{l_make} %{l_mflags -O}
  85. %install
  86. rm -rf $RPM_BUILD_ROOT
  87. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  88. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  89. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  90. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  91. %{SOURCE rc.pureftpd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  92. strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
  93. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  94. %files -f files
  95. %clean
  96. rm -rf $RPM_BUILD_ROOT
  97. %post
  98. %if "%{with_pam}" == "yes"
  99. # add PAM configuration entry
  100. if [ $1 -eq 1 ]; then
  101. $RPM_INSTALL_PREFIX/sbin/pamtool --add --smart --name=pureftpd
  102. fi
  103. %endif
  104. %preun
  105. %if "%{with_pam}" == "yes"
  106. # remove PAM configuration entry
  107. if [ $1 -eq 0 ]; then
  108. $RPM_INSTALL_PREFIX/sbin/pamtool --remove --smart --name=pureftpd
  109. fi
  110. %endif