qpopper.spec 5.1 KB

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