qpopper.spec 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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: 20030624
  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. --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. %install
  98. rm -rf $RPM_BUILD_ROOT
  99. # create installation area
  100. %{l_shtool} mkdir -f -p -m 755 \
  101. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  102. $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  103. $RPM_BUILD_ROOT%{l_prefix}/var/qpopper \
  104. $RPM_BUILD_ROOT%{l_prefix}/etc/qpopper
  105. # install qpopper
  106. %{l_shtool} install -c -m 644 \
  107. samples/qpopper.config $RPM_BUILD_ROOT%{l_prefix}/etc/qpopper/
  108. %{l_shtool} install -c -s -m 755 \
  109. popper/popper $RPM_BUILD_ROOT%{l_prefix}/sbin/qpopper
  110. %{l_shtool} install -c -m 644 \
  111. man/popper.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/qpopper.8
  112. # add more stuff
  113. %{l_shtool} install -c -m 644 \
  114. /dev/null $RPM_BUILD_ROOT%{l_prefix}/etc/qpopper/users.deny
  115. %{l_shtool} mkdir -f -p -m 755 \
  116. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  117. %{l_shtool} install -c -m 755 \
  118. -e 's;@l_prefix@;%{l_prefix};g' \
  119. -e 's;@l_susr@;%{l_susr};g' \
  120. -e 's;@l_rusr@;%{l_rusr};g' \
  121. -e 's;@l_rgrp@;%{l_rgrp};g' \
  122. %{SOURCE rc.qpopper} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  123. # OSSP fake syslog library
  124. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
  125. %{l_shtool} install -c -m 644 \
  126. -e 's;@l_prefix@;%{l_prefix};g' \
  127. %{SOURCE fsl.%{name}} \
  128. $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
  129. # determine installation files
  130. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  131. %{l_files_std} \
  132. '%not %dir %{l_prefix}/etc/fsl' \
  133. '%config %{l_prefix}/etc/fsl/fsl.%{name}' \
  134. '%config %{l_prefix}/etc/qpopper/qpopper.config'
  135. %files -f files
  136. %clean
  137. rm -rf $RPM_BUILD_ROOT
  138. %post
  139. %if "%{with_pam}" == "yes"
  140. # add PAM configuration entry
  141. if [ $1 -eq 1 ]; then
  142. $RPM_INSTALL_PREFIX/sbin/pamtool --add --smart --name=qpopper
  143. fi
  144. %endif
  145. %preun
  146. %if "%{with_pam}" == "yes"
  147. # remove PAM configuration entry
  148. if [ $1 -eq 0 ]; then
  149. $RPM_INSTALL_PREFIX/sbin/pamtool --remove --smart --name=qpopper
  150. fi
  151. %endif