gmime.spec 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. ##
  2. ## gmime.spec -- OpenPKG RPM Package Specification
  3. ## Copyright (c) 2000-2009 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.4
  25. %define V_minor 11
  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: 20091108
  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.gz
  43. Source1: http://www.cpan.org/modules/by-module/MIME/MIME-Fast-%{V_perl}.tar.gz
  44. Patch0: gmime.patch
  45. # build information
  46. Prefix: %{l_prefix}
  47. BuildRoot: %{l_buildroot}
  48. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make, pkgconfig
  49. PreReq: OpenPKG, openpkg >= 20040130
  50. BuildPreReq: glib2, libiconv, zlib
  51. PreReq: glib2, libiconv, zlib
  52. %if "%{with_perl}" == "yes"
  53. BuildPreReq: perl, perl-openpkg
  54. PreReq: perl
  55. %endif
  56. AutoReq: no
  57. AutoReqProv: no
  58. %description
  59. The GMime suite provides a core library and set of utilities which
  60. may be used for the creation and parsing of messages using the
  61. Multipurpose Internet Mail Extension (MIME).
  62. %track
  63. prog gmime = {
  64. version = %{version}
  65. url = http://download.gnome.org/sources/gmime
  66. regex = (\d+\.\d+)/
  67. url = http://download.gnome.org/sources/gmime/__NEWVER__/
  68. regex = gmime-(__VER__)\.tar\.gz
  69. }
  70. prog gmime:MIME-Fast = {
  71. version = %{V_perl}
  72. url = http://www.cpan.org/modules/by-module/MIME/
  73. regex = MIME-Fast-(__VER__)\.tar\.gz
  74. }
  75. %prep
  76. %setup -q
  77. %setup -q -D -T -a 1
  78. %patch -p0
  79. %build
  80. %{l_shtool} subst %{l_value -s -a} \
  81. MIME-Fast-%{V_perl}/Makefile.PL
  82. CC="%{l_cc}" \
  83. CFLAGS="%{l_cflags -O}" \
  84. CPPFLAGS="%{l_cppflags}" \
  85. LDFLAGS="%{l_ldflags}" \
  86. GREP="grep" \
  87. ./configure \
  88. --prefix=%{l_prefix} \
  89. --datadir=%{l_prefix}/share/gmime \
  90. --with-glib-prefix=%{l_prefix} \
  91. --with-libiconv-prefix=%{l_prefix} \
  92. --disable-gtk-doc \
  93. --disable-mono \
  94. --disable-shared
  95. %{l_make} %{l_mflags -O}
  96. %if "%{with_perl}" == "yes"
  97. %{l_prefix}/bin/perl-openpkg prepare
  98. %{l_prefix}/bin/perl-openpkg -d MIME-Fast-%{V_perl} configure build
  99. %endif
  100. %install
  101. rm -rf $RPM_BUILD_ROOT
  102. %{l_make} %{l_mflags} install \
  103. prefix=$RPM_BUILD_ROOT%{l_prefix} \
  104. exec_prefix=$RPM_BUILD_ROOT%{l_prefix} \
  105. datadir=$RPM_BUILD_ROOT%{l_prefix}/share/gmime
  106. %if "%{with_perl}" == "yes"
  107. %{l_prefix}/bin/perl-openpkg -d MIME-Fast-%{V_perl} install
  108. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  109. %else
  110. >perl-openpkg-files
  111. %endif
  112. rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/uu*
  113. rm -rf $RPM_BUILD_ROOT%{l_prefix}/share/gmime
  114. mv $RPM_BUILD_ROOT%{l_prefix}/include/gmime-*/gmime \
  115. $RPM_BUILD_ROOT%{l_prefix}/include/gmime
  116. rm -rf $RPM_BUILD_ROOT%{l_prefix}/include/gmime-*
  117. %{l_shtool} subst \
  118. -e 's;/include/gmime-[0-9.]*;/include;g' \
  119. $RPM_BUILD_ROOT%{l_prefix}/bin/gmime-config
  120. %{l_shtool} subst \
  121. -e 's;includedir}/gmime-[0-9.]*;includedir};g' \
  122. $RPM_BUILD_ROOT%{l_prefix}/lib/pkgconfig/gmime*.pc
  123. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  124. %{l_files_std} `cat perl-openpkg-files`
  125. %files -f files
  126. %clean
  127. rm -rf $RPM_BUILD_ROOT