fetchmail.spec 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. ##
  2. ## fetchmail.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ## Copyright (c) 2000-2006 Ralf S. Engelschall <http://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: fetchmail
  26. Summary: Batch Client for POP and IMAP Protocols
  27. URL: http://www.fetchmail.info/
  28. Vendor: Eric S. Raymond
  29. Packager: OpenPKG
  30. Distribution: OpenPKG
  31. Class: BASE
  32. Group: Mail
  33. License: GPL
  34. Version: 6.3.5
  35. Release: 20061011
  36. # package options
  37. %option with_conf no
  38. # list of sources
  39. Source0: http://download.berlios.de/fetchmail/fetchmail-%{version}.tar.bz2
  40. Source1: rc.fetchmail
  41. Source2: fetchmail.master
  42. Source3: fetchmail.users
  43. Patch0: fetchmail.patch
  44. # build information
  45. Prefix: %{l_prefix}
  46. BuildRoot: %{l_buildroot}
  47. BuildPreReq: OpenPKG, openpkg >= 20060823, make, flex, bison, config
  48. PreReq: OpenPKG, openpkg >= 20060823
  49. BuildPreReq: openssl
  50. PreReq: openssl
  51. %if "%{with_conf}" == "yes"
  52. PreReq: python
  53. %endif
  54. AutoReq: no
  55. AutoReqProv: no
  56. %description
  57. Fetchmail is a full-featured, robust, well-documented remote-mail
  58. retrieval and forwarding utility intended to be used over on-demand
  59. TCP/IP links (such as SLIP or PPP connections). It supports every
  60. remote-mail protocol now in use on the Internet: POP2, POP3, RPOP,
  61. APOP, KPOP, all flavors of IMAP, and ESMTP ETRN. It can even support
  62. IPv6 and IPSEC.
  63. %track
  64. prog fetchmail = {
  65. version = %{version}
  66. url = http://developer.berlios.de/project/showfiles.php?group_id=1824
  67. regex = fetchmail-(__VER__(-rc\d+)?)\.tar\.(gz|bz2)
  68. }
  69. %prep
  70. %setup -q
  71. %patch -p0
  72. %build
  73. CC="%{l_cc}" \
  74. CFLAGS="%{l_cflags -O}" \
  75. CPPFLAGS="%{l_cppflags}" \
  76. LDFLAGS="%{l_ldflags}" \
  77. ./configure \
  78. --prefix=%{l_prefix} \
  79. --with-ssl=%{l_prefix} \
  80. --without-kerberos \
  81. --without-kerberos5 \
  82. --without-hesiod \
  83. --disable-nls
  84. %{l_make} %{l_mflags}
  85. %install
  86. rm -rf $RPM_BUILD_ROOT
  87. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  88. strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
  89. %{l_shtool} mkdir -f -p -m 755 \
  90. $RPM_BUILD_ROOT%{l_prefix}/var/fetchmail \
  91. $RPM_BUILD_ROOT%{l_prefix}/etc/fetchmail \
  92. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
  93. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  94. %{SOURCE fetchmail.master} \
  95. %{SOURCE fetchmail.users} \
  96. $RPM_BUILD_ROOT%{l_prefix}/etc/fetchmail/
  97. %{l_shtool} install -c -m 644 %{l_value -s -a} \
  98. %{SOURCE rc.fetchmail} \
  99. $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
  100. %if "%{with_conf}" != "yes"
  101. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/fetchmailconf
  102. rm -f $RPM_BUILD_ROOT%{l_prefix}/man/man1/fetchmailconf.1
  103. rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/python
  104. %endif
  105. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  106. %{l_files_std} \
  107. '%config %{l_prefix}/etc/fetchmail/fetchmail.master' \
  108. '%config %{l_prefix}/etc/fetchmail/fetchmail.users'
  109. %files -f files
  110. %clean
  111. rm -rf $RPM_BUILD_ROOT
  112. %post
  113. # after upgrade, restart service
  114. [ $1 -eq 2 ] || exit 0
  115. eval `%{l_rc} fetchmail status 2>/dev/null`
  116. [ ".$fetchmail_active" = .yes ] && %{l_rc} fetchmail restart
  117. exit 0
  118. %preun
  119. # before erase, stop service
  120. [ $1 -eq 0 ] || exit 0
  121. %{l_rc} fetchmail stop 2>/dev/null
  122. exit 0