perl-gtk.spec 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. ##
  2. ## perl-gtk.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 versions
  24. %define V_perl 5.10
  25. %define V_gtk_perl 0.7009
  26. %define V_cairo 1.060
  27. %define V_glib 1.183
  28. %define V_gtk2 1.183
  29. # package information
  30. Name: perl-gtk
  31. Summary: Perl Modules for use with the Gtk GUI
  32. URL: http://www.cpan.org/
  33. Vendor: Perl Community
  34. Packager: OpenPKG Foundation e.V.
  35. Distribution: OpenPKG Community
  36. Class: EVAL
  37. Group: Perl
  38. License: GPL/Artistic
  39. Version: %{V_perl}
  40. Release: 20090904
  41. # package options
  42. %option with_gtk1 yes
  43. %option with_gtk2 yes
  44. # list of sources
  45. Source0: http://www.cpan.org/modules/by-module/Gtk/Gtk-Perl-%{V_gtk_perl}.tar.gz
  46. Source1: http://switch.dl.sourceforge.net/sourceforge/gtk2-perl/Cairo-%{V_cairo}.tar.gz
  47. Source2: http://switch.dl.sourceforge.net/sourceforge/gtk2-perl/Glib-%{V_glib}.tar.gz
  48. Source3: http://switch.dl.sourceforge.net/sourceforge/gtk2-perl/Gtk2-%{V_gtk2}.tar.gz
  49. Patch0: perl-gtk.patch
  50. # build information
  51. Prefix: %{l_prefix}
  52. BuildRoot: %{l_buildroot}
  53. BuildPreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126, make, pkgconfig
  54. PreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}
  55. %if "%{with_gtk1}" == "yes"
  56. BuildPreReq: gtk, perl-xml
  57. PreReq: gtk, perl-xml
  58. %endif
  59. %if "%{with_gtk2}" == "yes"
  60. BuildPreReq: perl-module, perl-xml >= %{V_perl}-20030920, gtk2, pango, atk, cairo
  61. PreReq: perl-module, perl-xml >= %{V_perl}-20030920, gtk2, pango, atk, cairo
  62. %endif
  63. AutoReq: no
  64. AutoReqProv: no
  65. %description
  66. Perl modules for use with Gtk GUI:
  67. %if "%{with_gtk1}" == "yes"
  68. - Gtk-Perl (%{V_gtk_perl}) [for GLib/Gtk+ 1.x]
  69. %endif
  70. %if "%{with_gtk2}" == "yes"
  71. - Glib (%{V_glib}) [for GLib/Gtk+ 2.x]
  72. - Gtk2 (%{V_gtk2}) [for GLib/Gtk+ 2.x]
  73. - Cairo (%{V_cairo}) [for GLib/Gtk+ 2.x]
  74. %endif
  75. %track
  76. prog perl-gtk:Gtk-Perl = {
  77. version = %{V_gtk_perl}
  78. url = http://www.cpan.org/modules/by-module/Gtk/
  79. regex = Gtk-Perl-(__VER__)\.tar\.gz
  80. }
  81. prog perl-gtk:Gtk2-Perl:Glib = {
  82. version = %{V_glib}
  83. url = http://sourceforge.net/projects/gtk2-perl/files/
  84. regex = Glib-(__VER__)\.tar\.gz
  85. }
  86. prog perl-gtk:Gtk2-Perl:Gtk = {
  87. version = %{V_gtk2}
  88. url = http://sourceforge.net/projects/gtk2-perl/files/
  89. regex = Gtk2-(__VER__)\.tar\.gz
  90. }
  91. prog perl-gtk:Gtk2-Perl:Cairo = {
  92. version = %{V_cairo}
  93. url = http://sourceforge.net/projects/gtk2-perl/files/
  94. regex = Cairo-(__VER__)\.tar\.gz
  95. }
  96. %prep
  97. %setup -q -c
  98. %setup -q -T -D -a 1
  99. %setup -q -T -D -a 2
  100. %setup -q -T -D -a 3
  101. %patch -p0
  102. %build
  103. %install
  104. rm -rf $RPM_BUILD_ROOT
  105. %{l_prefix}/bin/perl-openpkg prepare
  106. %if "%{with_gtk1}" == "yes"
  107. %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} \
  108. --args '--without-guessing' \
  109. configure build install
  110. %endif
  111. %if "%{with_gtk2}" == "yes"
  112. %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build install
  113. export FORCE_GMAKE=1
  114. %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
  115. %{l_prefix}/bin/perl-openpkg -d %{SOURCE3} configure build install
  116. %endif
  117. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  118. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
  119. %files -f files
  120. %clean
  121. rm -rf $RPM_BUILD_ROOT