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