]>
Commit | Line | Data |
---|---|---|
80bae268 JR |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # "make test" requires running X and plplot-driver-xwin | |
4 | # | |
5 | %define pdir Graphics | |
6 | %define pnam PLplot | |
7 | %include /usr/lib/rpm/macros.perl | |
8 | Summary: Graphics::PLplot - Perl interface to the PLplot plotting library | |
9 | Name: perl-Graphics-PLplot | |
10 | Version: 0.03 | |
ce37cb86 | 11 | Release: 7 |
80bae268 JR |
12 | License: GPL v1+ or Artistic |
13 | Group: Development/Languages/Perl | |
14 | Source0: http://www.cpan.org/modules/by-module/Graphics/%{pdir}-%{pnam}-%{version}.tar.gz | |
15 | # Source0-md5: 95a1cfeef5522f963357b1a757e9ba08 | |
16 | Patch0: fix-plplot-call.patch | |
17 | URL: http://search.cpan.org/dist/Graphics-PLplot/ | |
18 | BuildRequires: perl-devel >= 1:5.8.0 | |
19 | BuildRequires: plplot-devel | |
20 | BuildRequires: rpm-perlprov >= 4.1-13 | |
21 | %if %{with tests} | |
22 | BuildRequires: plplot-driver-xwin | |
23 | %endif | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %description | |
27 | This module provides a perl interface to the PLplot plotting library | |
28 | available from http://www.plplot.org. The interface is very similar | |
29 | to the C interface except that: | |
30 | ||
31 | - Arrays are passed in by reference | |
32 | - If the number of elements in an array is required by the C function | |
33 | the perl interface calculates this automatically [eg plline] | |
34 | - Return values are returned and not supplied as arguments | |
35 | ||
36 | %prep | |
37 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
38 | %patch0 -p1 | |
39 | ||
40 | %build | |
41 | %{__perl} Makefile.PL \ | |
42 | INSTALLDIRS=vendor | |
43 | %{__make} \ | |
44 | CC="%{__cc}" \ | |
45 | OPTIMIZE="%{rpmcflags}" | |
46 | ||
47 | %{?with_tests:%{__make} test} | |
48 | ||
49 | %install | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | ||
52 | %{__make} pure_install \ | |
53 | DESTDIR=$RPM_BUILD_ROOT | |
54 | ||
55 | %clean | |
56 | rm -rf $RPM_BUILD_ROOT | |
57 | ||
58 | %files | |
59 | %defattr(644,root,root,755) | |
60 | %doc README | |
61 | %{perl_vendorarch}/Graphics/*.pm | |
62 | %dir %{perl_vendorarch}/auto/Graphics/PLplot | |
80bae268 JR |
63 | %attr(755,root,root) %{perl_vendorarch}/auto/Graphics/PLplot/*.so |
64 | %{_mandir}/man3/* |