teapop.spec 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. # 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.5
  35. Release: 20030328
  36. # list of sources
  37. Source0: http://www.toontown.org/pub/teapop/teapop-%{version}.tar.gz
  38. Source1: rc.teapop
  39. Source2: fsl.teapop
  40. # build information
  41. Prefix: %{l_prefix}
  42. BuildRoot: %{l_buildroot}
  43. BuildPreReq: OpenPKG, openpkg >= 20020206, fsl >= 1.0.6, gcc, make
  44. PreReq: OpenPKG, openpkg >= 20020206, fsl >= 1.0.6
  45. AutoReq: no
  46. AutoReqProv: no
  47. Provides: POP
  48. %description
  49. Teapop is an RFC1939 and RFC2449 compliant POP3-server, which is quickly
  50. gaining world-wide recognition. With its flexible virtual domain support,
  51. Teapop distinguishes itself from other POP3-servers.
  52. %prep
  53. %setup -q
  54. # Disabling check for PID file directory since it will be created later
  55. # during %install
  56. chmod u+w config/configure
  57. %{l_shtool} subst \
  58. -e 's;^elif test -d \$pop_piddir\; then$;elif true\; then;' \
  59. config/configure
  60. # Removing LOG_NDELAY in openlog(3) call which prevents fsl from logging.
  61. # Since we don't operate teapop in a chroot environment this shouldn't be
  62. # an issue.
  63. chmod u+w teapop/teapop.c
  64. %{l_shtool} subst \
  65. -e 's; | LOG_NDELAY;;' \
  66. teapop/teapop.c
  67. %build
  68. # Building Teapop with OSSP fsl
  69. CC="%{l_cc}" \
  70. CFLAGS="%{l_cflags} `%{l_prefix}/bin/fsl-config --all --cflags`" \
  71. CPPFLAGS="%{l_cppflags} `%{l_prefix}/bin/fsl-config --all --cflags`" \
  72. LDFLAGS="%{l_ldflags} `%{l_prefix}/bin/fsl-config --all --ldflags`" \
  73. LIBS="`%{l_prefix}/bin/fsl-config --all --libs`" \
  74. ./configure \
  75. --prefix=%{l_prefix} \
  76. --sysconfdir=%{l_prefix}/etc/teapop \
  77. --libexecdir=%{prefix}/sbin \
  78. --localstatedir=%{l_prefix}/var/teapop \
  79. --enable-piddir=%{l_prefix}/var/teapop \
  80. --enable-homespool=.mail/inbox \
  81. --disable-vpop
  82. %{l_make} %{l_mflags -O}
  83. %install
  84. rm -rf $RPM_BUILD_ROOT
  85. # Installing Teapop
  86. DESTDIR="$RPM_BUILD_ROOT" %{l_make} %{l_mflags} install
  87. # Creating run-command script
  88. %{l_shtool} mkdir -f -p -m 755 \
  89. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  90. %{l_shtool} install -c -m 755 -e 's;@l_prefix@;%{l_prefix};g' \
  91. -e 's;@l_susr@;%{l_susr};g' -e 's;@l_sgrp@;%{l_sgrp};g' \
  92. %{SOURCE rc.teapop} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  93. # Creating fsl directory
  94. %{l_shtool} mkdir -f -p -m 755 \
  95. $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
  96. %{l_shtool} install -c -m 644 -e 's;@l_prefix@;%{l_prefix};g' \
  97. %{SOURCE fsl.teapop} $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  98. # Stripping installation
  99. rm -f $RPM_BUILD_ROOT%{l_prefix}/sbin/cronpopauth.pl \
  100. >/dev/null 2>&1 || true
  101. # Determining installation tree files
  102. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
  103. '%config %attr(0600,%{l_susr},%{l_mgrp}) %{l_prefix}/etc/teapop/*' \
  104. '%config %{l_prefix}/etc/fsl/fsl.teapop' \
  105. '%not %dir %{l_prefix}/etc/fsl'
  106. %files -f files
  107. %clean
  108. rm -rf $RPM_BUILD_ROOT