]>
Commit | Line | Data |
---|---|---|
1 | # TODO: provide configurations for other configurations (e.g. x11)? | |
2 | # | |
3 | # Conditional build: | |
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 | |
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 | |
14 | Summary(pl.UTF-8): Alien::wxWidgets - budowanie, znajdowanie i wykorzystywanie binariów wxWidgets | |
15 | Name: perl-Alien-wxWidgets | |
16 | Version: 0.67 | |
17 | Release: 1 | |
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 | |
22 | # Source0-md5: 510a7817fdaf59089b50a877a621d770 | |
23 | Patch0: %{name}-nobuild.patch | |
24 | URL: http://search.cpan.org/dist/Alien-wxWidgets/ | |
25 | BuildRequires: perl-ExtUtils-CBuilder >= 0.24 | |
26 | BuildRequires: perl-Module-Build >= 0.28 | |
27 | BuildRequires: perl-Module-Pluggable >= 3.1-4 | |
28 | BuildRequires: perl-devel >= 1:5.8.0 | |
29 | BuildRequires: perl(File::Spec) >= 1.50 | |
30 | BuildRequires: rpm-perlprov >= 4.1-13 | |
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 | |
51 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
52 | ||
53 | %define wx_ver %(rpm -q wxWidgets-devel --qf '%%{VERSION}') | |
54 | %define wx_ver_tag %(echo %{wx_ver} | tr . _) | |
55 | ||
56 | %description | |
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. | |
62 | ||
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. | |
68 | ||
69 | %prep | |
70 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
71 | %patch0 -p1 | |
72 | ||
73 | %build | |
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 | |
81 | ||
82 | ./Build | |
83 | ||
84 | %{?with_tests:./Build test} | |
85 | done | |
86 | done | |
87 | ||
88 | %install | |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
91 | ./Build install | |
92 | ||
93 | %clean | |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
96 | %files | |
97 | %defattr(644,root,root,755) | |
98 | %dir %{perl_vendorarch}/Alien | |
99 | %{perl_vendorarch}/Alien/wxWidgets.pm | |
100 | %dir %{perl_vendorarch}/Alien/wxWidgets | |
101 | %{perl_vendorarch}/Alien/wxWidgets/Utility.pm | |
102 | %dir %{perl_vendorarch}/Alien/wxWidgets/Config | |
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* |