qpopper.spec 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. ##
  2. ## qpopper.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2001 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2001 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: 20011201
  36. # list of sources
  37. Source0: ftp://ftp.qualcomm.com/eudora/servers/unix/popper/qpopper%{version}.tar.gz
  38. Source1: rc.qpopper
  39. # build information
  40. Prefix: %{l_prefix}
  41. BuildRoot: %{l_buildroot}
  42. BuildPreReq: OpenPKG, openpkg >= 20011126.0, MTA, openssl
  43. PreReq: OpenPKG, openpkg >= 20011126.0, MTA, openssl
  44. AutoReq: no
  45. AutoReqProv: no
  46. %description
  47. Qualcom Popper is a POP3 Daemon.
  48. %prep
  49. %setup0 -q -n qpopper%{version}
  50. %build
  51. CC="%{l_cc}" \
  52. CFLAGS="%{l_cflags -O}" \
  53. ./configure \
  54. --prefix=%{l_prefix} \
  55. --sbindir=%{l_prefix}/sbin \
  56. --disable-bulldb \
  57. --enable-servermode \
  58. --enable-standalone \
  59. --enable-log-login \
  60. --with-pam=qpopper \
  61. --enable-home-dir-mail=.mail/inbox \
  62. --with-log-facility=LOG_LOCAL5 \
  63. --enable-nonauth-file=%{l_prefix}/etc/qpopper/users.deny \
  64. --with-openssl=%{l_prefix} \
  65. --disable-nls
  66. %{l_rpmtool} subst \
  67. 's;\(MAIL_COMMAND[^"]*"\)[^"]*;\1%{l_prefix}/sbin/sendmail;' \
  68. -- config.h
  69. %{l_make} %{l_mflags -O}
  70. %install
  71. rm -rf $RPM_BUILD_ROOT
  72. %{l_shtool} mkdir -f -p -m 755 \
  73. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  74. $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  75. $RPM_BUILD_ROOT%{l_prefix}/etc/qpopper
  76. %{l_shtool} install -c -m 644 \
  77. samples/qpopper.config $RPM_BUILD_ROOT%{l_prefix}/etc/qpopper/
  78. %{l_shtool} install -c -s -m 755 \
  79. popper/popper $RPM_BUILD_ROOT%{l_prefix}/sbin/qpopper
  80. %{l_shtool} install -c -m 644 \
  81. man/popper.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/qpopper.8
  82. %{l_shtool} install -c -m 644 \
  83. /dev/null $RPM_BUILD_ROOT%{l_prefix}/etc/qpopper/users.deny
  84. %{l_shtool} mkdir -f -p -m 755 \
  85. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  86. %{l_shtool} install -c -m 755 -e "s;@l_prefix@;%{l_prefix};g" \
  87. %{SOURCE rc.qpopper} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  88. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  89. %files -f files
  90. %clean
  91. rm -rf $RPM_BUILD_ROOT
  92. %post
  93. # add PAM configuration entry
  94. check=`grep '^#<OpenPKG pkg=qpopper>' /etc/pam.conf`
  95. if [ ".$check" = . ]; then
  96. ( echo "#<OpenPKG pkg=qpopper>"
  97. case "%{l_target}" in
  98. *-freebsd* )
  99. echo "qpopper auth required pam_unix.so try_first_pass"
  100. ;;
  101. *-linux* )
  102. echo "qpopper auth required /lib/security/pam_unix.so shadow nodelay"
  103. ;;
  104. *-solaris* )
  105. echo "qpopper auth required /usr/lib/security/pam_unix.so try_first_pass"
  106. ;;
  107. esac
  108. echo "#</OpenPKG>"
  109. ) >>/etc/pam.conf
  110. fi
  111. %preun
  112. # remove PAM configuration entry
  113. check=`grep '^#<OpenPKG pkg=qpopper>' /etc/pam.conf`
  114. if [ ".$check" != . ]; then
  115. cp /etc/pam.conf /etc/pam.conf.tmp && \
  116. sed -e '/^#<OpenPKG pkg=qpopper>/,/^#<\/OpenPKG>/d' \
  117. </etc/pam.conf.tmp >/etc/pam.conf && \
  118. rm -f /etc/pam.conf.tmp
  119. fi