qpopper.spec 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. ##
  2. ## qpopper.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: qpopper
  27. Summary: POP3 Daemon
  28. URL: http://www.eudora.com/qpopper/
  29. Vendor: Qualcom
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [BASE]
  32. Group: Mail
  33. License: GPL
  34. Version: 4.0.5
  35. Release: 20030404
  36. # package options
  37. %option with_pam no
  38. # list of sources
  39. Source0: ftp://ftp.qualcomm.com/eudora/servers/unix/popper/qpopper%{version}.tar.gz
  40. Source1: rc.qpopper
  41. Source2: fsl.qpopper
  42. Patch0: qpopper.patch
  43. # build information
  44. Prefix: %{l_prefix}
  45. BuildRoot: %{l_buildroot}
  46. BuildPreReq: OpenPKG, openpkg >= 20030103, MTA, openssl, fsl
  47. PreReq: OpenPKG, openpkg >= 20030103, MTA, openssl, fsl
  48. %if "%{with_pam}" == "yes"
  49. BuildPreReq: PAM
  50. PreReq: PAM
  51. %endif
  52. AutoReq: no
  53. AutoReqProv: no
  54. Provides: POP
  55. Conflicts: teapop
  56. %description
  57. Qualcom Popper is a full-featured POP3 daemon.
  58. %prep
  59. %setup -q -n qpopper%{version}
  60. %patch -p0
  61. %build
  62. # build qpopper
  63. CC="%{l_cc}" \
  64. CFLAGS="`%{l_prefix}/bin/fsl-config --all --cflags`" \
  65. CPPFLAGS="`%{l_prefix}/bin/fsl-config --all --cflags`" \
  66. LDFLAGS="`%{l_prefix}/bin/fsl-config --all --ldflags`" \
  67. LIBS="`%{l_prefix}/bin/fsl-config --all --libs`" \
  68. %if "%{with_pam}" == "yes"
  69. CFLAGS="$CFLAGS -I`%{l_prefix}/etc/rc --query pam_incdir`" \
  70. CPPFLAGS="$CPPFLAGS -I`%{l_prefix}/etc/rc --query pam_incdir`" \
  71. LDFLAGS="$LDFLAGS -L`%{l_prefix}/etc/rc --query pam_libdir`" \
  72. %endif
  73. OS_DEFS="-DPIDFILE=\\\"%{l_prefix}/var/qpopper/qpopper.pid\\\"" \
  74. ./configure \
  75. --prefix=%{l_prefix} \
  76. --sbindir=%{l_prefix}/sbin \
  77. --disable-bulldb \
  78. --enable-servermode \
  79. --enable-standalone \
  80. --enable-log-login \
  81. %if "%{with_pam}" == "yes"
  82. --with-pam=qpopper \
  83. %endif
  84. --enable-home-dir-mail=.mail/inbox \
  85. --with-log-facility=LOG_MAIL \
  86. --enable-nonauth-file=%{l_prefix}/etc/qpopper/users.deny \
  87. --with-openssl=%{l_prefix} \
  88. --disable-nls
  89. %{l_shtool} subst \
  90. -e 's;\(MAIL_COMMAND[^"]*"\)[^"]*;\1%{l_prefix}/sbin/sendmail;' \
  91. config.h
  92. %{l_make} %{l_mflags -O}
  93. %install
  94. rm -rf $RPM_BUILD_ROOT
  95. # create installation area
  96. %{l_shtool} mkdir -f -p -m 755 \
  97. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  98. $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  99. $RPM_BUILD_ROOT%{l_prefix}/var/qpopper \
  100. $RPM_BUILD_ROOT%{l_prefix}/etc/qpopper \
  101. $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
  102. # install qpopper
  103. %{l_shtool} install -c -m 644 \
  104. samples/qpopper.config $RPM_BUILD_ROOT%{l_prefix}/etc/qpopper/
  105. %{l_shtool} install -c -s -m 755 \
  106. popper/popper $RPM_BUILD_ROOT%{l_prefix}/sbin/qpopper
  107. %{l_shtool} install -c -m 644 \
  108. man/popper.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/qpopper.8
  109. # add more stuff
  110. %{l_shtool} install -c -m 644 \
  111. /dev/null $RPM_BUILD_ROOT%{l_prefix}/etc/qpopper/users.deny
  112. %{l_shtool} mkdir -f -p -m 755 \
  113. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  114. %{l_shtool} install -c -m 755 \
  115. -e 's;@l_prefix@;%{l_prefix};g' \
  116. -e 's;@l_musr@;%{l_musr};g' \
  117. -e 's;@l_mgrp@;%{l_mgrp};g' \
  118. %{SOURCE rc.qpopper} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  119. %{l_shtool} install -c -m 644 -e 's;@l_prefix@;%{l_prefix};g' \
  120. %{SOURCE fsl.qpopper} $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  121. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} \
  122. '%config %{l_prefix}/etc/qpopper/qpopper.config' \
  123. '%config %{l_prefix}/etc/fsl/fsl.qpopper' \
  124. '%not %dir %{l_prefix}/etc/fsl'
  125. %files -f files
  126. %clean
  127. rm -rf $RPM_BUILD_ROOT
  128. %post
  129. %if "%{with_pam}" == "yes"
  130. # add PAM configuration entry
  131. if [ $1 -eq 1 ]; then
  132. $RPM_INSTALL_PREFIX/sbin/pamtool --add --smart --name=qpopper
  133. fi
  134. %endif
  135. %preun
  136. %if "%{with_pam}" == "yes"
  137. # remove PAM configuration entry
  138. if [ $1 -eq 0 ]; then
  139. $RPM_INSTALL_PREFIX/sbin/pamtool --remove --smart --name=qpopper
  140. fi
  141. %endif