qpopper.spec 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. ##
  2. ## qpopper.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: 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: 20030709
  36. # package options
  37. %option with_fsl yes
  38. %option with_pam no
  39. # list of sources
  40. Source0: ftp://ftp.qualcomm.com/eudora/servers/unix/popper/qpopper%{version}.tar.gz
  41. Source1: rc.qpopper
  42. Source2: fsl.qpopper
  43. Patch0: qpopper.patch
  44. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20030415, MTA, openssl
  48. PreReq: OpenPKG, openpkg >= 20030415, MTA, openssl
  49. %if "%{with_fsl}" == "yes"
  50. BuildPreReq: fsl
  51. PreReq: fsl
  52. %endif
  53. %if "%{with_pam}" == "yes"
  54. BuildPreReq: PAM
  55. PreReq: PAM
  56. %endif
  57. AutoReq: no
  58. AutoReqProv: no
  59. Provides: POP
  60. %description
  61. Qualcom Popper is a full-featured POP3 daemon.
  62. %prep
  63. %setup -q -n qpopper%{version}
  64. %patch -p0
  65. %build
  66. # build qpopper
  67. CC="%{l_cc}" \
  68. CFLAGS="%{l_cflags}" \
  69. CPPFLAGS="%{l_cppflags}" \
  70. LDFLAGS="%{l_ldflags} %{l_fsl_ldflags}" \
  71. LIBS="%{l_fsl_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. %if "%{with_fsl}" == "yes"
  90. --with-log-facility=LOG_USER \
  91. %else
  92. --with-log-facility=LOG_MAIL \
  93. %endif
  94. --enable-nonauth-file=%{l_prefix}/etc/qpopper/users.deny \
  95. --with-openssl=%{l_prefix} \
  96. --disable-nls
  97. %{l_shtool} subst \
  98. -e 's;\(MAIL_COMMAND[^"]*"\)[^"]*;\1%{l_prefix}/sbin/sendmail;' \
  99. config.h
  100. %{l_make} %{l_mflags -O}
  101. %install
  102. rm -rf $RPM_BUILD_ROOT
  103. # create installation area
  104. %{l_shtool} mkdir -f -p -m 755 \
  105. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  106. $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  107. $RPM_BUILD_ROOT%{l_prefix}/var/qpopper \
  108. $RPM_BUILD_ROOT%{l_prefix}/etc/qpopper
  109. # install qpopper
  110. %{l_shtool} install -c -m 644 \
  111. samples/qpopper.config $RPM_BUILD_ROOT%{l_prefix}/etc/qpopper/
  112. %{l_shtool} install -c -s -m 755 \
  113. popper/popper $RPM_BUILD_ROOT%{l_prefix}/sbin/qpopper
  114. %{l_shtool} install -c -m 644 \
  115. man/popper.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/qpopper.8
  116. # add more stuff
  117. %{l_shtool} install -c -m 644 \
  118. /dev/null $RPM_BUILD_ROOT%{l_prefix}/etc/qpopper/users.deny
  119. %{l_shtool} mkdir -f -p -m 755 \
  120. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  121. %{l_shtool} install -c -m 755 \
  122. -e 's;@l_prefix@;%{l_prefix};g' \
  123. -e 's;@l_susr@;%{l_susr};g' \
  124. -e 's;@l_rusr@;%{l_rusr};g' \
  125. -e 's;@l_rgrp@;%{l_rgrp};g' \
  126. %{SOURCE rc.qpopper} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  127. # install OSSP fsl configuration
  128. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
  129. %{l_shtool} install -c -m 644 \
  130. -e 's;@l_prefix@;%{l_prefix};g' \
  131. %{SOURCE fsl.qpopper} \
  132. $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  133. # determine installation files
  134. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  135. %{l_files_std} \
  136. '%not %dir %{l_prefix}/etc/fsl' \
  137. '%config %{l_prefix}/etc/fsl/fsl.qpopper' \
  138. '%config %{l_prefix}/etc/qpopper/qpopper.config'
  139. %files -f files
  140. %clean
  141. rm -rf $RPM_BUILD_ROOT
  142. %post
  143. %if "%{with_pam}" == "yes"
  144. # add PAM configuration entry
  145. if [ $1 -eq 1 ]; then
  146. $RPM_INSTALL_PREFIX/sbin/pamtool --add --smart --name=qpopper
  147. fi
  148. %endif
  149. %preun
  150. %if "%{with_pam}" == "yes"
  151. # remove PAM configuration entry
  152. if [ $1 -eq 0 ]; then
  153. $RPM_INSTALL_PREFIX/sbin/pamtool --remove --smart --name=qpopper
  154. fi
  155. %endif