qpopper.spec 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. ##
  2. ## qpopper.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@engelschall.com>
  5. ##
  6. ## Permission to use, copy, modify, and distribute this software for
  7. ## any purpose with or without fee is hereby granted, provided that
  8. ## the above copyright notice and this permission notice appear in all
  9. ## copies.
  10. ##
  11. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  12. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  13. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  14. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  15. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  16. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  17. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  18. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  19. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  20. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  21. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  22. ## SUCH DAMAGE.
  23. ##
  24. # package information
  25. Name: qpopper
  26. Summary: POP3 Daemon
  27. URL: http://www.eudora.com/qpopper/
  28. Vendor: Qualcom
  29. Packager: The OpenPKG Project
  30. Distribution: OpenPKG [EXP]
  31. Group: Mail
  32. License: GPL
  33. Version: 4.0.3
  34. Release: 5
  35. # list of sources
  36. Source0: ftp://ftp.qualcomm.com/eudora/servers/unix/popper/qpopper%{version}.tar.gz
  37. Source1: rc.qpopper
  38. # build information
  39. Prefix: %{l_prefix}
  40. BuildRoot: %{l_buildroot}
  41. BuildPreReq: OpenPKG, openpkg >= 0.9-33, MTA, openssl
  42. PreReq: OpenPKG, openpkg >= 0.9-33, MTA, openssl
  43. AutoReq: no
  44. AutoReqProv: no
  45. %description
  46. Qualcom Popper is a POP3 Daemon.
  47. %prep
  48. %setup0 -q -n qpopper%{version}
  49. %build
  50. CC="%{l_cc}" \
  51. CFLAGS="%{l_cflags -O}" \
  52. ./configure \
  53. --prefix=%{l_prefix} \
  54. --sbindir=%{l_prefix}/sbin \
  55. --disable-bulldb \
  56. --enable-servermode \
  57. --enable-standalone \
  58. --enable-log-login \
  59. --with-pam=qpopper \
  60. --enable-home-dir-mail=.mail/inbox \
  61. --with-log-facility=LOG_LOCAL5 \
  62. --enable-nonauth-file=%{l_prefix}/etc/qpopper/users.deny \
  63. --with-openssl=%{l_prefix} \
  64. --disable-nls
  65. %{l_rpmtool} subst \
  66. 's;\(MAIL_COMMAND[^"]*"\)[^"]*;\1%{l_prefix}/sbin/sendmail;' \
  67. -- config.h
  68. %{l_make} %{l_mflags -O}
  69. %install
  70. rm -rf $RPM_BUILD_ROOT
  71. %{l_shtool} mkdir -f -p -m 755 \
  72. $RPM_BUILD_ROOT%{l_prefix}/sbin \
  73. $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
  74. $RPM_BUILD_ROOT%{l_prefix}/etc/qpopper
  75. %{l_shtool} install -c -m 644 \
  76. samples/qpopper.config $RPM_BUILD_ROOT%{l_prefix}/etc/qpopper/
  77. %{l_shtool} install -c -s -m 755 \
  78. popper/popper $RPM_BUILD_ROOT%{l_prefix}/sbin/qpopper
  79. %{l_shtool} install -c -m 644 \
  80. man/popper.8 $RPM_BUILD_ROOT%{l_prefix}/man/man8/qpopper.8
  81. %{l_shtool} install -c -m 644 \
  82. /dev/null $RPM_BUILD_ROOT%{l_prefix}/etc/qpopper/users.deny
  83. %{l_shtool} mkdir -f -p -m 755 \
  84. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  85. %{l_shtool} install -c -m 755 -e "s;@l_prefix@;%{l_prefix};g" \
  86. %{SOURCE rc.qpopper} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  87. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  88. %files -f files
  89. %clean
  90. rm -rf $RPM_BUILD_ROOT
  91. %post
  92. # add PAM configuration entry
  93. check=`grep '^#<OpenPKG pkg=qpopper>' /etc/pam.conf`
  94. if [ ".$check" = . ]; then
  95. ( echo "#<OpenPKG pkg=qpopper>"
  96. case "%{l_target}" in
  97. *-freebsd* )
  98. echo "qpopper auth required pam_unix.so try_first_pass"
  99. ;;
  100. *-linux* )
  101. echo "qpopper auth required /lib/security/pam_unix.so shadow nodelay"
  102. ;;
  103. *-solaris* )
  104. echo "qpopper auth required /usr/lib/security/pam_unix.so try_first_pass"
  105. ;;
  106. esac
  107. echo "#</OpenPKG>"
  108. ) >>/etc/pam.conf
  109. fi
  110. %preun
  111. # remove PAM configuration entry
  112. check=`grep '^#<OpenPKG pkg=qpopper>' /etc/pam.conf`
  113. if [ ".$check" != . ]; then
  114. cp /etc/pam.conf /etc/pam.conf.tmp && \
  115. sed -e '/^#<OpenPKG pkg=qpopper>/,/^#<\/OpenPKG>/d' \
  116. </etc/pam.conf.tmp >/etc/pam.conf && \
  117. rm -f /etc/pam.conf.tmp
  118. fi