qpopper.spec 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  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 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 [REL]
  32. Group: Mail
  33. License: GPL
  34. Version: 4.0.3
  35. Release: 20020206
  36. # list of sources
  37. Source0: ftp://ftp.qualcomm.com/eudora/servers/unix/popper/qpopper%{version}.tar.gz
  38. Source1: fakesyslog.tar.gz
  39. Source2: rc.qpopper
  40. Patch0: qpopper.patch
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20020206, MTA, openssl
  45. PreReq: OpenPKG, openpkg >= 20020206, MTA, openssl
  46. AutoReq: no
  47. AutoReqProv: no
  48. Provides: POP
  49. %description
  50. Qualcom Popper is a POP3 Daemon.
  51. %prep
  52. %setup0 -q -c -a 0
  53. %setup1 -q -T -D -a 1
  54. cd qpopper%{version}
  55. %patch0 -p0
  56. %build
  57. # build faked syslog(3) library
  58. fakesyslogdir="`pwd`/fakesyslog"
  59. ( cd fakesyslog
  60. CC="%{l_cc}" \
  61. CFLAGS="%{l_cflags -O}" \
  62. ./configure \
  63. --with-logfile=%{l_prefix}/var/qpopper/qpopper.log
  64. %{l_make} %{l_mflags}
  65. )
  66. # build qpopper
  67. ( cd qpopper%{version}
  68. CC="%{l_cc}" \
  69. CFLAGS="%{l_cflags -O}" \
  70. OS_DEFS="-DPIDFILE=\\\"%{l_prefix}/var/qpopper/qpopper.pid\\\"" \
  71. LIBS="-L$fakesyslogdir -lfakesyslog" \
  72. ./configure \
  73. --prefix=%{l_prefix} \
  74. --sbindir=%{l_prefix}/sbin \
  75. --disable-bulldb \
  76. --enable-servermode \
  77. --enable-standalone \
  78. --enable-log-login \
  79. --with-pam=qpopper \
  80. --enable-home-dir-mail=.mail/inbox \
  81. --with-log-facility=LOG_MAIL \
  82. --enable-nonauth-file=%{l_prefix}/etc/qpopper/users.deny \
  83. --with-openssl=%{l_prefix} \
  84. --disable-nls
  85. %{l_rpmtool} subst \
  86. 's;\(MAIL_COMMAND[^"]*"\)[^"]*;\1%{l_prefix}/sbin/sendmail;' \
  87. -- config.h
  88. %{l_make} %{l_mflags -O}
  89. )
  90. %install
  91. rm -rf $RPM_BUILD_ROOT
  92. # create installation area
  93. %{l_shtool} mkdir -f -p -m 755 \
  94. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  95. $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  96. $RPM_BUILD_ROOT%{l_prefix}/etc/qpopper \
  97. $RPM_BUILD_ROOT%{l_prefix}/var/qpopper
  98. # install qpopper
  99. ( cd qpopper%{version}
  100. %{l_shtool} install -c -m 644 \
  101. samples/qpopper.config $RPM_BUILD_ROOT%{l_prefix}/etc/qpopper/
  102. %{l_shtool} install -c -s -m 755 \
  103. popper/popper $RPM_BUILD_ROOT%{l_prefix}/sbin/qpopper
  104. %{l_shtool} install -c -m 644 \
  105. man/popper.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/qpopper.8
  106. )
  107. # add more stuff
  108. %{l_shtool} install -c -m 644 \
  109. /dev/null $RPM_BUILD_ROOT%{l_prefix}/etc/qpopper/users.deny
  110. %{l_shtool} mkdir -f -p -m 755 \
  111. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  112. %{l_shtool} install -c -m 755 \
  113. -e 's;@l_prefix@;%{l_prefix};g' \
  114. -e 's;@l_musr@;%{l_musr};g' \
  115. -e 's;@l_mgrp@;%{l_mgrp};g' \
  116. %{SOURCE rc.qpopper} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  117. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  118. %files -f files
  119. %clean
  120. rm -rf $RPM_BUILD_ROOT
  121. %post
  122. # add PAM configuration entry
  123. if [ -f /etc/pam.conf ]; then
  124. ( case "%{l_target}" in
  125. *-freebsd* ) echo "qpopper auth required pam_unix.so try_first_pass" ;;
  126. *-linux* ) echo "qpopper auth required /lib/security/pam_unix.so shadow nodelay" ;;
  127. *-solaris* ) echo "qpopper auth required /usr/lib/security/pam_unix.so try_first_pass" ;;
  128. esac
  129. ) |\
  130. $RPM_INSTALL_PREFIX/sbin/rpmtool config \
  131. -a -s -i "$RPM_INSTALL_PREFIX:qpopper" /etc/pam.conf
  132. fi
  133. %preun
  134. # remove PAM configuration entry
  135. if [ -f /etc/pam.conf ]; then
  136. $RPM_INSTALL_PREFIX/sbin/rpmtool config \
  137. -r -s -i "$RPM_INSTALL_PREFIX:qpopper" /etc/pam.conf
  138. fi