]>
Commit | Line | Data |
---|---|---|
b8fac701 | 1 | # TODO: provide configurations for other configurations (e.g. x11)? |
274c91a3 MŁ |
2 | # |
3 | # Conditional build: | |
b8fac701 JB |
4 | %bcond_without tests # do not perform "make test" |
5 | %bcond_without gtk2 # wxGTK2 packages support | |
6 | %bcond_without gtk3 # wxGTK3 packages support | |
7 | %bcond_without ansi # ANSI wx packages support | |
8 | %bcond_without unicode # Unicode wx packages support | |
274c91a3 MŁ |
9 | # |
10 | %include /usr/lib/rpm/macros.perl | |
11 | %define pdir Alien | |
12 | %define pnam wxWidgets | |
13 | Summary: Alien::wxWidgets - building, finding and using wxWidgets binaries | |
6b8dacf7 | 14 | Summary(pl.UTF-8): Alien::wxWidgets - budowanie, znajdowanie i wykorzystywanie binariów wxWidgets |
274c91a3 | 15 | Name: perl-Alien-wxWidgets |
7359d907 AM |
16 | Version: 0.67 |
17 | Release: 1 | |
274c91a3 MŁ |
18 | # same as perl |
19 | License: GPL v1+ or Artistic | |
20 | Group: Development/Languages/Perl | |
21 | Source0: http://www.cpan.org/modules/by-module/Alien/%{pdir}-%{pnam}-%{version}.tar.gz | |
7359d907 | 22 | # Source0-md5: 510a7817fdaf59089b50a877a621d770 |
bbe2b626 JB |
23 | Patch0: %{name}-nobuild.patch |
24 | URL: http://search.cpan.org/dist/Alien-wxWidgets/ | |
0e5aa9c3 | 25 | BuildRequires: perl-ExtUtils-CBuilder >= 0.24 |
b8fac701 JB |
26 | BuildRequires: perl-Module-Build >= 0.28 |
27 | BuildRequires: perl-Module-Pluggable >= 3.1-4 | |
bbe2b626 | 28 | BuildRequires: perl-devel >= 1:5.8.0 |
b8fac701 | 29 | BuildRequires: perl(File::Spec) >= 1.50 |
274c91a3 | 30 | BuildRequires: rpm-perlprov >= 4.1-13 |
b8fac701 JB |
31 | %if %{with gtk2} |
32 | %if %{with ansi} | |
33 | BuildRequires: wxGTK2-devel >= 2.6.3 | |
34 | BuildRequires: wxGTK2-gl-devel >= 2.6.3 | |
35 | %endif | |
36 | %if %{with unicode} | |
37 | BuildRequires: wxGTK2-unicode-devel >= 2.6.3 | |
38 | BuildRequires: wxGTK2-unicode-gl-devel >= 2.6.3 | |
39 | %endif | |
40 | %endif | |
41 | %if %{with gtk3} | |
42 | %if %{with ansi} | |
43 | BuildRequires: wxGTK3-devel >= 2.6.3 | |
44 | BuildRequires: wxGTK3-gl-devel >= 2.6.3 | |
45 | %endif | |
46 | %if %{with unicode} | |
47 | BuildRequires: wxGTK3-unicode-devel >= 2.6.3 | |
48 | BuildRequires: wxGTK3-unicode-gl-devel >= 2.6.3 | |
49 | %endif | |
50 | %endif | |
274c91a3 MŁ |
51 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
52 | ||
b8fac701 JB |
53 | %define wx_ver %(rpm -q wxWidgets-devel --qf '%%{VERSION}') |
54 | %define wx_ver_tag %(echo %{wx_ver} | tr . _) | |
55 | ||
274c91a3 | 56 | %description |
bbe2b626 JB |
57 | Alien::wxWidgets allows wxPerl to easily find information about your |
58 | wxWidgets installation. It can store this information for multiple | |
59 | wxWidgets versions or configurations (debug, Unicode, etc.). It can | |
60 | also build and install a private copy of wxWidgets as part of the | |
61 | build process. | |
274c91a3 | 62 | |
530a3377 JR |
63 | %description -l pl.UTF-8 |
64 | Alien::wxWidgets pozwala wxPerlowi łatwo uzyskać informacje na temat | |
65 | instalacji wxWidgets. Może przechowywać informacje o wielu wersjach | |
66 | lub konfiguracjach (debug, Unicode, itp.). Może także zbudować i | |
67 | zainstalować prywatną kopię wxWidgets jako część procesu budowania. | |
274c91a3 MŁ |
68 | |
69 | %prep | |
70 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
71 | %patch0 -p1 | |
72 | ||
73 | %build | |
b8fac701 JB |
74 | for toolkit in %{?with_gtk2:gtk2} %{?with_gtk3:gtk3} ; do |
75 | for charset in %{?with_ansi:ansi} %{?with_unicode:unicode} ; do | |
76 | export WX_CONFIG=wx-${toolkit}-${charset}-config | |
77 | %{__perl} Build.PL \ | |
78 | destdir=$RPM_BUILD_ROOT \ | |
79 | installdirs=vendor \ | |
80 | --wxWidgets-build=0 | |
14d6bda2 | 81 | |
b8fac701 | 82 | ./Build |
274c91a3 | 83 | |
b8fac701 JB |
84 | %{?with_tests:./Build test} |
85 | done | |
86 | done | |
274c91a3 MŁ |
87 | |
88 | %install | |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
b8fac701 | 91 | ./Build install |
274c91a3 MŁ |
92 | |
93 | %clean | |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
96 | %files | |
97 | %defattr(644,root,root,755) | |
98 | %dir %{perl_vendorarch}/Alien | |
b8fac701 | 99 | %{perl_vendorarch}/Alien/wxWidgets.pm |
274c91a3 | 100 | %dir %{perl_vendorarch}/Alien/wxWidgets |
b8fac701 | 101 | %{perl_vendorarch}/Alien/wxWidgets/Utility.pm |
85bb3c52 | 102 | %dir %{perl_vendorarch}/Alien/wxWidgets/Config |
b8fac701 JB |
103 | %if %{with gtk2} |
104 | %if %{with ansi} | |
105 | %{perl_vendorarch}/Alien/wxWidgets/Config/gtk2_%{wx_ver_tag}_gcc_3_4.pm | |
106 | %endif | |
107 | %if %{with unicode} | |
108 | %{perl_vendorarch}/Alien/wxWidgets/Config/gtk2_%{wx_ver_tag}_uni_gcc_3_4.pm | |
109 | %endif | |
110 | %endif | |
111 | %if %{with gtk3} | |
112 | # should be gtk3_*.pm? | |
113 | %if %{with ansi} | |
114 | %{perl_vendorarch}/Alien/wxWidgets/Config/gtk_%{wx_ver_tag}_gcc_3_4.pm | |
115 | %endif | |
116 | %if %{with unicode} | |
117 | %{perl_vendorarch}/Alien/wxWidgets/Config/gtk_%{wx_ver_tag}_uni_gcc_3_4.pm | |
118 | %endif | |
119 | %endif | |
120 | %{_mandir}/man3/Alien::wxWidgets*.3pm* |