gmime.spec 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. ##
  2. ## gmime.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 version
  25. %define V_major 2.2
  26. %define V_minor 1
  27. %define V_perl 1.6
  28. # package information
  29. Name: gmime
  30. Summary: MIME Toolkit
  31. URL: http://spruce.sourceforge.net/gmime/
  32. Vendor: Jeffrey Stedfast
  33. Packager: OpenPKG
  34. Distribution: OpenPKG
  35. Class: PLUS
  36. Group: Converter
  37. License: GPL
  38. Version: %{V_major}.%{V_minor}
  39. Release: 20060317
  40. # package options
  41. %option with_perl no
  42. # list of sources
  43. Source0: http://spruce.sourceforge.net/gmime/sources/v%{V_major}/gmime-%{version}.tar.gz
  44. Source1: http://www.cpan.org/modules/by-module/MIME/MIME-Fast-%{V_perl}.tar.gz
  45. Patch0: gmime.patch
  46. # build information
  47. Prefix: %{l_prefix}
  48. BuildRoot: %{l_buildroot}
  49. BuildPreReq: OpenPKG, openpkg >= 20040130, gcc, make, pkgconfig
  50. PreReq: OpenPKG, openpkg >= 20040130
  51. BuildPreReq: glib2, libiconv, zlib
  52. PreReq: glib2, libiconv, zlib
  53. %if "%{with_perl}" == "yes"
  54. BuildPreReq: perl, perl-openpkg
  55. PreReq: perl
  56. %endif
  57. AutoReq: no
  58. AutoReqProv: no
  59. %description
  60. The GMime suite provides a core library and set of utilities which
  61. may be used for the creation and parsing of messages using the
  62. Multipurpose Internet Mail Extension (MIME).
  63. %track
  64. prog gmime = {
  65. version = %{version}
  66. url = http://spruce.sourceforge.net/gmime/sources/
  67. regex = (v\d+\.\d+)
  68. url = http://spruce.sourceforge.net/gmime/sources/__NEWVER__/
  69. regex = gmime-(__VER__)\.tar\.gz
  70. }
  71. prog gmime:MIME-Fast = {
  72. version = %{V_perl}
  73. url = http://www.cpan.org/modules/by-module/MIME/
  74. regex = MIME-Fast-(__VER__)\.tar\.gz
  75. }
  76. %prep
  77. %setup -q
  78. %setup -q -D -T -a 1
  79. %patch -p0
  80. %build
  81. %{l_shtool} subst %{l_value -s -a} \
  82. MIME-Fast-%{V_perl}/Makefile.PL
  83. CC="%{l_cc}" \
  84. CFLAGS="%{l_cflags -O}" \
  85. CPPFLAGS="%{l_cppflags}" \
  86. LDFLAGS="%{l_ldflags}" \
  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. '%not %dir %{l_prefix}/lib/pkgconfig'
  126. %files -f files
  127. %clean
  128. rm -rf $RPM_BUILD_ROOT