teapop.spec 4.5 KB

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