gmime.spec 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. ##
  2. ## gmime.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2012 OpenPKG Foundation e.V. <http://openpkg.net/>
  4. ##
  5. ## Permission to use, copy, modify, and distribute this software for
  6. ## any purpose with or without fee is hereby granted, provided that
  7. ## the above copyright notice and this permission notice appear in all
  8. ## copies.
  9. ##
  10. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  11. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  12. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  13. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  14. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  15. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  16. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  17. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  18. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  19. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  20. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  21. ## SUCH DAMAGE.
  22. ##
  23. # package version
  24. %define V_major 2.6
  25. %define V_minor 10
  26. %define V_perl 1.6
  27. # package information
  28. Name: gmime
  29. Summary: MIME Toolkit
  30. URL: http://spruce.sourceforge.net/gmime/
  31. Vendor: Jeffrey Stedfast
  32. Packager: OpenPKG Foundation e.V.
  33. Distribution: OpenPKG Community
  34. Class: PLUS
  35. Group: Libraries
  36. License: LGPL
  37. Version: %{V_major}.%{V_minor}
  38. Release: 20120614
  39. # package options
  40. %option with_perl no
  41. # list of sources
  42. Source0: http://download.gnome.org/sources/gmime/%{V_major}/gmime-%{version}.tar.xz
  43. Source1: http://www.cpan.org/modules/by-module/MIME/MIME-Fast-%{V_perl}.tar.gz
  44. Patch0: gmime.patch
  45. # build information
  46. BuildPreReq: OpenPKG, openpkg >= 20120101, gcc, make, pkgconfig
  47. PreReq: OpenPKG, openpkg >= 20120101
  48. BuildPreReq: glib2, libiconv, zlib
  49. PreReq: glib2, libiconv, zlib
  50. %if "%{with_perl}" == "yes"
  51. BuildPreReq: perl, perl-openpkg
  52. PreReq: perl
  53. %endif
  54. %description
  55. The GMime suite provides a core library and set of utilities which
  56. may be used for the creation and parsing of messages using the
  57. Multipurpose Internet Mail Extension (MIME).
  58. %track
  59. prog gmime = {
  60. version = %{version}
  61. url = http://download.gnome.org/sources/gmime
  62. regex = (\d+\.[02468])/
  63. url = http://download.gnome.org/sources/gmime/__NEWVER__/
  64. regex = gmime-(\d+\.[02468]\.\d+)\.tar\.xz
  65. }
  66. prog gmime:MIME-Fast = {
  67. version = %{V_perl}
  68. url = http://www.cpan.org/modules/by-module/MIME/
  69. regex = MIME-Fast-(__VER__)\.tar\.gz
  70. }
  71. %prep
  72. %setup -q
  73. %setup -q -D -T -a 1
  74. %patch -p0
  75. %build
  76. CC="%{l_cc}" \
  77. CFLAGS="%{l_cflags -O}" \
  78. CPPFLAGS="%{l_cppflags}" \
  79. LDFLAGS="%{l_ldflags}" \
  80. GREP="grep" \
  81. ./configure \
  82. --prefix=%{l_prefix} \
  83. --datadir=%{l_prefix}/share/gmime \
  84. --with-libiconv-prefix=%{l_prefix} \
  85. --disable-cryptography \
  86. --disable-gtk-doc \
  87. --disable-mono \
  88. --disable-shared
  89. %{l_make} %{l_mflags -O}
  90. %if "%{with_perl}" == "yes"
  91. %{l_prefix}/bin/perl-openpkg prepare
  92. %{l_prefix}/bin/perl-openpkg -d MIME-Fast-%{V_perl} configure build
  93. %endif
  94. %install
  95. %{l_make} %{l_mflags} install \
  96. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  97. exec_prefix=$RPM_BUILD_ROOT%{l_prefix} \
  98. datadir=$RPM_BUILD_ROOT%{l_prefix}/share/gmime
  99. %if "%{with_perl}" == "yes"
  100. %{l_prefix}/bin/perl-openpkg -d MIME-Fast-%{V_perl} install
  101. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  102. %else
  103. >perl-openpkg-files
  104. %endif
  105. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/uu*
  106. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gmime
  107. mv $RPM_BUILD_ROOT%{l_prefix}/include/gmime-*/gmime \
  108. $RPM_BUILD_ROOT%{l_prefix}/include/gmime
  109. rm -rf $RPM_BUILD_ROOT%{l_prefix}/include/gmime-*
  110. %{l_shtool} subst \
  111. -e 's;/include/gmime-[0-9.]*;/include;g' \
  112. $RPM_BUILD_ROOT%{l_prefix}/bin/gmime-config
  113. %{l_shtool} subst \
  114. -e 's;includedir}/gmime-[0-9.]*;includedir};g' \
  115. $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/gmime*.pc
  116. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  117. %{l_files_std} `cat perl-openpkg-files`
  118. %files -f files
  119. %clean