perl-gtk.spec 4.7 KB

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