perl-gtk.spec 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. ##
  2. ## perl-gtk.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package versions
  26. %define V_perl 5.8.5
  27. %define V_gtk_perl 0.7009
  28. %define V_extutils_depends 0.202
  29. %define V_extutils_pkgconfig 1.05
  30. %define V_glib 1.052
  31. %define V_gtk2 1.052
  32. # package information
  33. Name: perl-gtk
  34. Summary: Perl Modules for use with the Gtk GUI
  35. URL: http://www.cpan.org/
  36. Vendor: Perl Community
  37. Packager: The OpenPKG Project
  38. Distribution: OpenPKG
  39. Class: PLUS
  40. Group: Language
  41. License: GPL/Artistic
  42. Version: %{V_perl}
  43. Release: 20040720
  44. # package options
  45. %option with_gtk1 yes
  46. %option with_gtk2 yes
  47. # list of sources
  48. Source0: http://www.cpan.org/modules/by-module/Gtk/Gtk-Perl-%{V_gtk_perl}.tar.gz
  49. Source1: http://osdn.dl.sourceforge.net/sourceforge/gtk2-perl/ExtUtils-Depends-%{V_extutils_depends}.tar.gz
  50. Source2: http://osdn.dl.sourceforge.net/sourceforge/gtk2-perl/ExtUtils-PkgConfig-%{V_extutils_pkgconfig}.tar.gz
  51. Source3: http://osdn.dl.sourceforge.net/sourceforge/gtk2-perl/Glib-%{V_glib}.tar.gz
  52. Source4: http://osdn.dl.sourceforge.net/sourceforge/gtk2-perl/Gtk2-%{V_gtk2}.tar.gz
  53. # build information
  54. Prefix: %{l_prefix}
  55. BuildRoot: %{l_buildroot}
  56. BuildPreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126, make
  57. PreReq: OpenPKG, openpkg >= 20040130, perl >= %{V_perl}
  58. %if "%{with_gtk1}" == "yes"
  59. BuildPreReq: gtk, perl-xml
  60. PreReq: gtk, perl-xml
  61. %endif
  62. %if "%{with_gtk2}" == "yes"
  63. BuildPreReq: perl-xml >= %{V_perl}-20030920, glib2::with_threads = no, gtk2, pango, atk
  64. PreReq: perl-xml >= %{V_perl}-20030920, glib2::with_threads = no, gtk2, pango, atk
  65. %endif
  66. AutoReq: no
  67. AutoReqProv: no
  68. %description
  69. Perl modules for use with Gtk GUI:
  70. %if "%{with_gtk1}" == "yes"
  71. - Gtk-Perl (%{V_gtk_perl}) [for GLib/Gtk+ 1.x]
  72. %endif
  73. %if "%{with_gtk2}" == "yes"
  74. - ExtUtils::Depends (%{V_extutils_depends}) [for GLib/Gtk+ 2.x]
  75. - ExtUtils::PkgConfig (%{V_extutils_pkgconfig}) [for GLib/Gtk+ 2.x]
  76. - Glib (%{V_glib}) [for GLib/Gtk+ 2.x]
  77. - Gtk2 (%{V_gtk2}) [for GLib/Gtk+ 2.x]
  78. %endif
  79. %track
  80. prog perl-gtk:Gtk-Perl = {
  81. version = %{V_gtk_perl}
  82. url = http://www.cpan.org/modules/by-module/Gtk/
  83. regex = Gtk-Perl-(__VER__)\.tar\.gz
  84. }
  85. prog perl-gtk:Gtk2-Perl:ExtUtils-Depends = {
  86. version = %{V_extutils_depends}
  87. url = http://prdownloads.sourceforge.net/gtk2-perl/
  88. regex = ExtUtils-Depends-(__VER__)\.tar\.gz
  89. }
  90. prog perl-gtk:Gtk2-Perl:ExtUtils-PkgConfig = {
  91. version = %{V_extutils_pkgconfig}
  92. url = http://prdownloads.sourceforge.net/gtk2-perl/
  93. regex = ExtUtils-PkgConfig-(__VER__)\.tar\.gz
  94. }
  95. prog perl-gtk:Gtk2-Perl:Glib = {
  96. version = %{V_glib}
  97. url = http://prdownloads.sourceforge.net/gtk2-perl/
  98. regex = Glib-(__VER__)\.tar\.gz
  99. }
  100. prog perl-gtk:Gtk2-Perl:Gtk = {
  101. version = %{V_gtk2}
  102. url = http://prdownloads.sourceforge.net/gtk2-perl/
  103. regex = Gtk2-(__VER__)\.tar\.gz
  104. }
  105. %prep
  106. %setup -q -c
  107. %setup -q -T -D -a 1
  108. %setup -q -T -D -a 2
  109. %setup -q -T -D -a 3
  110. %setup -q -T -D -a 4
  111. %build
  112. %install
  113. rm -rf $RPM_BUILD_ROOT
  114. %{l_prefix}/bin/perl-openpkg prepare
  115. %if "%{with_gtk1}" == "yes"
  116. %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} \
  117. --args '--without-guessing' \
  118. configure build install
  119. %endif
  120. %if "%{with_gtk2}" == "yes"
  121. %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build install
  122. %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
  123. %{l_prefix}/bin/perl-openpkg -d %{SOURCE3} configure build install
  124. %{l_prefix}/bin/perl-openpkg -d %{SOURCE4} configure build install
  125. %endif
  126. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  127. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
  128. %files -f files
  129. %clean
  130. rm -rf $RPM_BUILD_ROOT