]> git.pld-linux.org Git - packages/perl-Wx.git/blob - perl-Wx.spec
0808dee0ef105fa584a2453f9c5248c872fb9a24
[packages/perl-Wx.git] / perl-Wx.spec
1
2 # NOTE: On every new version, we need to manually regenerate the list of XS Provides
3 # cd Wx-*
4 # for i in `grep -r "PACKAGE=" * | cut -d " " -f 2 | sed 's|PACKAGE=|perl(|g' | grep "Wx::" | sort -n |uniq`; do printf "Provides: $i)\\n"; done &> provides.txt
5 # grep -orP '%name{Wx::[^}]*}\s+class' |grep -v "3pm" | cut -d : -f 2- | sed 's|%name{|Provides: perl(|g' | sed 's|} class|)|g' |uniq &>> provides.txt
6 # cat provides.txt | uniq | sort -n
7
8 #
9 # Conditional build:
10 %bcond_without  unicode # ANSI instead of Unicode version of wxGTK
11 %bcond_with     gtk3    # wxGTK3 instead of wxGTK2
12 %bcond_with     tests   # "make test" (requires $DISPLAY)
13
14 %define         wxpkg   wxGTK%{?with_gtk3:3}%{!?with_gtk3:2}%{?with_unicode:-unicode}
15 %define         wx_ver          %(rpm -q wxWidgets-devel --qf '%%{VERSION}')
16 %define         wx_ver_tag      %(echo %{wx_ver} | tr . _)
17 %define         alien_wxcfg     gtk%{!?with_gtk3:2}_%{wx_ver_tag}%{?with_unicode:_uni}_gcc_3_4
18 %define         pdir    Wx
19 %include        /usr/lib/rpm/macros.perl
20 Summary:        wxPerl - a Perl wrapper for the wxWidgets C++ GUI toolkit
21 Summary(pl.UTF-8):      wxPerl - wrapper toolkitu graficznego C++ wxWidgets dla Perla
22 Name:           perl-Wx
23 Version:        0.9932
24 Release:        3
25 # same as perl
26 License:        GPL v1+ or Artistic
27 Group:          Development/Languages/Perl
28 Source0:        http://www.cpan.org/modules/by-module/Wx/Wx-%{version}.tar.gz
29 # Source0-md5:  76f019b04fffec0fda06bf46b0e93046
30 Source1:        perl-provides
31 Patch0:         method-typo.patch
32 URL:            http://wxperl.sourceforge.net/
33 BuildRequires:  perl-Alien-wxWidgets >= 0.67
34 BuildRequires:  perl-ExtUtils-MakeMaker >= 6.46
35 BuildRequires:  perl-ExtUtils-ParseXS >= 3.15
36 BuildRequires:  perl-ExtUtils-XSpp >= 0.16_02
37 %if %{with tests}
38 BuildRequires:  perl-Test-Harness >= 2.26
39 BuildRequires:  perl-Test-Simple >= 0.45
40 %endif
41 BuildRequires:  perl-devel >= 1:5.8.0
42 # require Alien::wxWidgets with config for desired wx variant
43 BuildRequires:  %{wxpkg}-devel >= 2.6.3-1
44 BuildRequires:  perl(Alien::wxWidgets::Config::%{alien_wxcfg})
45 BuildRequires:  perl(File::Spec::Functions) >= 0.82
46 BuildRequires:  perl(if) >= 0.03
47 BuildRequires:  rpm-perlprov >= 4.1-13
48 Requires:       perl-Alien-wxWidgets >= 0.25
49 # Load manually generated Perl dependencies, see note on top of spec file
50 %(cat %{SOURCE1})
51 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52
53 %description
54 wxPerl is a Perl wrapper for the wxWidgets C++ GUI toolkit.
55
56 %description -l pl.UTF-8
57 wxPerl to wrapper toolkitu graficznego C++ wxWidgets dla Perla.
58
59 %package devel
60 Summary:        Development package for wxPerl
61 Summary(pl.UTF-8):      Pakiet do rozwijania oprogramowania przy użyciu wxPerla
62 Group:          Development/Libraries
63 Requires:       %{name} = %{version}-%{release}
64 Requires:       %{wxpkg}-devel >= 2.6.3-1
65
66 %description devel
67 Development package for wxPerl.
68
69 %description devel -l pl.UTF-8
70 Pakiet do rozwijania oprogramowania przy użyciu wxPerla.
71
72 %prep
73 %setup -q -n Wx-%{version}
74 %patch0 -p1
75
76 %build
77 %{__perl} Makefile.PL \
78         INSTALLDIRS=vendor \
79         --wx-toolkit=gtk%{!?with_gtk3:2} \
80         --%{!?with_unicode:no-}wx-unicode
81 %{__make} \
82         CC="%{__cxx}" \
83         OPTIMIZE="%{rpmcflags}"
84
85 %{?with_tests:%{__make} test}
86
87 %install
88 rm -rf $RPM_BUILD_ROOT
89
90 %{__make} install \
91         DESTDIR=$RPM_BUILD_ROOT
92
93 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Wx/*.pod
94
95 # not this OS
96 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/Wx/build/MakeMaker/{MacOSX,Win32}* \
97         $RPM_BUILD_ROOT%{_mandir}/man3/Wx::build::MakeMaker::Win32_MSVC.3pm
98
99 %clean
100 rm -rf $RPM_BUILD_ROOT
101
102 %files
103 %defattr(644,root,root,755)
104 %doc README.txt docs/todo.txt
105 %{perl_vendorarch}/Wx.pm
106 %dir %{perl_vendorarch}/Wx
107 %{perl_vendorarch}/Wx/Perl
108 %{perl_vendorarch}/Wx/*.pm
109 %{perl_vendorarch}/Wx/typemap
110 %dir %{perl_vendorarch}/auto/Wx
111 %attr(755,root,root) %{perl_vendorarch}/auto/Wx/Wx.so
112 %dir %{perl_vendorarch}/auto/Wx/AUI
113 %attr(755,root,root) %{perl_vendorarch}/auto/Wx/AUI/AUI.so
114 %dir %{perl_vendorarch}/auto/Wx/Calendar
115 %attr(755,root,root) %{perl_vendorarch}/auto/Wx/Calendar/Calendar.so
116 %dir %{perl_vendorarch}/auto/Wx/DND
117 %attr(755,root,root) %{perl_vendorarch}/auto/Wx/DND/DND.so
118 %dir %{perl_vendorarch}/auto/Wx/DataView
119 %attr(755,root,root) %{perl_vendorarch}/auto/Wx/DataView/DataView.so
120 %dir %{perl_vendorarch}/auto/Wx/DateTime
121 %attr(755,root,root) %{perl_vendorarch}/auto/Wx/DateTime/DateTime.so
122 %dir %{perl_vendorarch}/auto/Wx/DocView
123 %attr(755,root,root) %{perl_vendorarch}/auto/Wx/DocView/DocView.so
124 %dir %{perl_vendorarch}/auto/Wx/FS
125 %attr(755,root,root) %{perl_vendorarch}/auto/Wx/FS/FS.so
126 %dir %{perl_vendorarch}/auto/Wx/Grid
127 %attr(755,root,root) %{perl_vendorarch}/auto/Wx/Grid/Grid.so
128 %dir %{perl_vendorarch}/auto/Wx/Help
129 %attr(755,root,root) %{perl_vendorarch}/auto/Wx/Help/Help.so
130 %dir %{perl_vendorarch}/auto/Wx/Html
131 %attr(755,root,root) %{perl_vendorarch}/auto/Wx/Html/Html.so
132 %dir %{perl_vendorarch}/auto/Wx/IPC
133 %attr(755,root,root) %{perl_vendorarch}/auto/Wx/IPC/IPC.so
134 %dir %{perl_vendorarch}/auto/Wx/MDI
135 %attr(755,root,root) %{perl_vendorarch}/auto/Wx/MDI/MDI.so
136 %dir %{perl_vendorarch}/auto/Wx/Media
137 %attr(755,root,root) %{perl_vendorarch}/auto/Wx/Media/Media.so
138 %dir %{perl_vendorarch}/auto/Wx/PerlTest
139 %attr(755,root,root) %{perl_vendorarch}/auto/Wx/PerlTest/PerlTest.so
140 %dir %{perl_vendorarch}/auto/Wx/Print
141 %attr(755,root,root) %{perl_vendorarch}/auto/Wx/Print/Print.so
142 %dir %{perl_vendorarch}/auto/Wx/PropertyGrid
143 %attr(755,root,root) %{perl_vendorarch}/auto/Wx/PropertyGrid/PropertyGrid.so
144 %dir %{perl_vendorarch}/auto/Wx/Ribbon
145 %attr(755,root,root) %{perl_vendorarch}/auto/Wx/Ribbon/Ribbon.so
146 %dir %{perl_vendorarch}/auto/Wx/RichText
147 %attr(755,root,root) %{perl_vendorarch}/auto/Wx/RichText/RichText.so
148 %dir %{perl_vendorarch}/auto/Wx/STC
149 %attr(755,root,root) %{perl_vendorarch}/auto/Wx/STC/STC.so
150 %dir %{perl_vendorarch}/auto/Wx/Socket
151 %attr(755,root,root) %{perl_vendorarch}/auto/Wx/Socket/Socket.so
152 %dir %{perl_vendorarch}/auto/Wx/WebView
153 %attr(755,root,root) %{perl_vendorarch}/auto/Wx/WebView/WebView.so
154 %dir %{perl_vendorarch}/auto/Wx/XRC
155 %attr(755,root,root) %{perl_vendorarch}/auto/Wx/XRC/XRC.so
156 %{_mandir}/man3/Wx.3pm*
157 %{_mandir}/man3/Wx::Api.3pm*
158 %{_mandir}/man3/Wx::Loader.3pm*
159 %{_mandir}/man3/Wx::NewClass.3pm*
160 %{_mandir}/man3/Wx::Perl::*.3pm*
161 %{_mandir}/man3/Wx::Socket.3pm*
162 %{_mandir}/man3/Wx::Thread.3pm*
163
164 %files devel
165 %defattr(644,root,root,755)
166 %attr(755,root,root) %{_bindir}/wxperl_overload
167 %{perl_vendorarch}/Wx/Overload
168 %{perl_vendorarch}/Wx/XSP
169 %{perl_vendorarch}/Wx/build
170 %{perl_vendorarch}/Wx/cpp
171 %{_mandir}/man1/wxperl_overload.1p*
172 %{_mandir}/man3/Wx::XSP::*.3pm*
173 %{_mandir}/man3/Wx::build::*.3pm*
This page took 0.063969 seconds and 2 git commands to generate.