teapop.spec 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. ##
  2. ## teapop.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2003 Cable & Wireless <http://www.cw.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: teapop
  27. Summary: Teapop POP3-Server
  28. URL: http://www.toontown.org/teapop/
  29. Vendor: ToonTown Consulting
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [PLUS]
  32. Group: Mail
  33. License: BSD
  34. Version: 0.3.6
  35. Release: 20030721
  36. # package options
  37. %option with_fsl yes
  38. # list of sources
  39. Source0: http://www.toontown.org/pub/teapop/teapop-%{version}.tar.gz
  40. Source1: rc.teapop
  41. Source2: fsl.teapop
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 20030718, gcc, make
  46. PreReq: OpenPKG, openpkg >= 20030718
  47. %if "%{with_fsl}" == "yes"
  48. BuildPreReq: fsl >= 1.0.6
  49. PreReq: fsl >= 1.0.6
  50. %endif
  51. AutoReq: no
  52. AutoReqProv: no
  53. Provides: POP
  54. %description
  55. Teapop is an RFC1939 and RFC2449 compliant POP3-server, which is quickly
  56. gaining world-wide recognition. With its flexible virtual domain support,
  57. Teapop distinguishes itself from other POP3-servers.
  58. %prep
  59. %setup -q
  60. # Disabling check for PID file directory since it will be created later
  61. # during %install
  62. %{l_shtool} subst \
  63. -e 's;^elif test -d \$pop_piddir\; then$;elif true\; then;' \
  64. config/configure
  65. # removing LOG_NDELAY in openlog(3) call which prevents fsl from logging.
  66. # Since we don't operate teapop in a chroot environment this shouldn't be
  67. # an issue.
  68. %{l_shtool} subst \
  69. -e 's; | LOG_NDELAY;;' \
  70. teapop/teapop.c
  71. %build
  72. CC="%{l_cc}" \
  73. CFLAGS="%{l_cflags}" \
  74. CPPFLAGS="%{l_cppflags}" \
  75. LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \
  76. LIBS="%{l_fsl_libs}" \
  77. ./configure \
  78. --prefix=%{l_prefix} \
  79. --sysconfdir=%{l_prefix}/etc/teapop \
  80. --libexecdir=%{prefix}/sbin \
  81. --localstatedir=%{l_prefix}/var/teapop \
  82. --enable-piddir=%{l_prefix}/var/teapop \
  83. --enable-homespool=.mail/inbox \
  84. --disable-vpop
  85. %{l_make} %{l_mflags -O}
  86. %install
  87. rm -rf $RPM_BUILD_ROOT
  88. # installing Teapop
  89. DESTDIR="$RPM_BUILD_ROOT" %{l_make} %{l_mflags} install
  90. # creating run-command script
  91. %{l_shtool} mkdir -f -p -m 755 \
  92. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  93. %{l_shtool} install -c -m 755 %{l_value -s -a} \
  94. %{SOURCE rc.teapop} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  95. # install OSSP fsl configuration
  96. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
  97. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  98. %{SOURCE fsl.teapop} \
  99. $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  100. # stripping installation
  101. rm -f $RPM_BUILD_ROOT%{l_prefix}/sbin/cronpopauth.pl \
  102. >/dev/null 2>&1 || true
  103. # determine installation files
  104. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  105. %{l_files_std} \
  106. '%not %dir %{l_prefix}/etc/fsl' \
  107. '%config %{l_prefix}/etc/fsl/fsl.teapop' \
  108. '%config %attr(0600,%{l_susr},%{l_mgrp}) %{l_prefix}/etc/teapop/*'
  109. %files -f files
  110. %clean
  111. rm -rf $RPM_BUILD_ROOT