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