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