perl-gtk.spec 5.2 KB

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