You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

128 lines
4.5 KiB

##
## perl-gtk.spec -- OpenPKG RPM Package Specification
## Copyright (c) 2000-2010 OpenPKG Foundation e.V. <http://openpkg.net/>
##
## Permission to use, copy, modify, and distribute this software for
## any purpose with or without fee is hereby granted, provided that
## the above copyright notice and this permission notice appear in all
## copies.
##
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
## SUCH DAMAGE.
##
# package versions
%define V_perl 5.12
%define V_gtk_perl 0.7009
%define V_cairo 1.060
%define V_glib 1.183
%define V_gtk2 1.183
# package information
Name: perl-gtk
Summary: Perl Modules for use with the Gtk GUI
URL: http://www.cpan.org/
Vendor: Perl Community
Packager: OpenPKG Foundation e.V.
Distribution: OpenPKG Community
Class: EVAL
Group: Perl
License: GPL/Artistic
Version: %{V_perl}
Release: 20101219
# package options
%option with_gtk1 yes
%option with_gtk2 yes
# list of sources
Source0: http://www.cpan.org/authors/id/M/ML/MLEHMANN/Gtk-Perl-%{V_gtk_perl}.tar.gz
Source1: http://switch.dl.sourceforge.net/sourceforge/gtk2-perl/Cairo-%{V_cairo}.tar.gz
Source2: http://switch.dl.sourceforge.net/sourceforge/gtk2-perl/Glib-%{V_glib}.tar.gz
Source3: http://switch.dl.sourceforge.net/sourceforge/gtk2-perl/Gtk2-%{V_gtk2}.tar.gz
Patch0: perl-gtk.patch
# build information
BuildPreReq: OpenPKG, openpkg >= 20100101, perl >= %{V_perl}, perl-openpkg >= %{V_perl}-20040126, make, pkgconfig
PreReq: OpenPKG, openpkg >= 20100101, perl >= %{V_perl}
%if "%{with_gtk1}" == "yes"
BuildPreReq: gtk, perl-xml
PreReq: gtk, perl-xml
%endif
%if "%{with_gtk2}" == "yes"
BuildPreReq: perl-module, perl-xml >= %{V_perl}-20030920, gtk2, pango, atk, cairo
PreReq: perl-module, perl-xml >= %{V_perl}-20030920, gtk2, pango, atk, cairo
%endif
%description
Perl modules for use with Gtk GUI:
%if "%{with_gtk1}" == "yes"
- Gtk-Perl (%{V_gtk_perl}) [for GLib/Gtk+ 1.x]
%endif
%if "%{with_gtk2}" == "yes"
- Glib (%{V_glib}) [for GLib/Gtk+ 2.x]
- Gtk2 (%{V_gtk2}) [for GLib/Gtk+ 2.x]
- Cairo (%{V_cairo}) [for GLib/Gtk+ 2.x]
%endif
%track
prog perl-gtk:Gtk-Perl = {
version = %{V_gtk_perl}
url = http://www.cpan.org/authors/id/M/ML/MLEHMANN/
regex = Gtk-Perl-(__VER__)\.tar\.gz
}
prog perl-gtk:Gtk2-Perl:Glib = {
version = %{V_glib}
url = http://sourceforge.net/projects/gtk2-perl/files/
regex = Glib-(__VER__)\.tar\.gz
}
prog perl-gtk:Gtk2-Perl:Gtk = {
version = %{V_gtk2}
url = http://sourceforge.net/projects/gtk2-perl/files/
regex = Gtk2-(__VER__)\.tar\.gz
}
prog perl-gtk:Gtk2-Perl:Cairo = {
version = %{V_cairo}
url = http://sourceforge.net/projects/gtk2-perl/files/
regex = Cairo-(__VER__)\.tar\.gz
}
%prep
%setup -q -c
%setup -q -T -D -a 1
%setup -q -T -D -a 2
%setup -q -T -D -a 3
%patch -p0
%build
%install
%{l_prefix}/bin/perl-openpkg prepare
%if "%{with_gtk1}" == "yes"
%{l_prefix}/bin/perl-openpkg -d %{SOURCE0} \
--args '--without-guessing' \
configure build install
%endif
%if "%{with_gtk2}" == "yes"
%{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build install
export FORCE_GMAKE=1
%{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE3} configure build install
%endif
%{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
%files -f files
%clean