pureftpd.spec 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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 [BASE]
  36. Group: FTP
  37. License: GPL
  38. Version: 1.1.0
  39. Release: 20020819
  40. # list of sources
  41. Source0: http://belnet.dl.sourceforge.net/sourceforge/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. Options: with_pam=%{with_pam}
  65. %prep
  66. %setup -q -n pure-ftpd-%{version}
  67. %build
  68. CC="%{l_cc}" \
  69. CFLAGS="%{l_cflags -O}" \
  70. %if "%{with_pam}" == "yes"
  71. CPPFLAGS="-I`%{l_prefix}/etc/rc --query pam_incdir`" \
  72. LDFLAGS="-L`%{l_prefix}/etc/rc --query pam_libdir`" \
  73. %endif
  74. ./configure \
  75. --prefix=%{l_prefix} \
  76. --sysconfdir=%{l_prefix}/etc/pureftpd \
  77. --without-inetd \
  78. --without-humor \
  79. --without-cookie \
  80. --without-welcomemsg \
  81. %if "%{with_pam}" == "yes"
  82. --with-pam \
  83. %endif
  84. --with-ftpwho \
  85. --with-virtualhosts \
  86. --with-language=english
  87. %{l_make} %{l_mflags -O}
  88. %install
  89. rm -rf $RPM_BUILD_ROOT
  90. %{l_make} %{l_mflags} install AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT"
  91. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  92. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  93. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  94. %{SOURCE rc.pureftpd} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  95. strip $RPM_BUILD_ROOT%{l_prefix}/sbin/* >/dev/null 2>&1 || true
  96. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  97. %files -f files
  98. %clean
  99. rm -rf $RPM_BUILD_ROOT
  100. %post
  101. %if "%{with_pam}" == "yes"
  102. # add PAM configuration entry
  103. if [ $1 -eq 1 ]; then
  104. $RPM_INSTALL_PREFIX/sbin/pamtool -a -s -n "pureftpd"
  105. fi
  106. %endif
  107. %preun
  108. %if "%{with_pam}" == "yes"
  109. # remove PAM configuration entry
  110. if [ $1 -eq 0 ]; then
  111. $RPM_INSTALL_PREFIX/sbin/pamtool -r -s -n "pureftpd"
  112. fi
  113. %endif