]>
Commit | Line | Data |
---|---|---|
e501d8be ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # do not perform "make test" | |
4 | ||
5 | %define pdir CDB | |
6 | %define pnam TinyCDB | |
7 | %include /usr/lib/rpm/macros.perl | |
8 | Summary: CDB::TinyCDB - Perl extension for TinyCDB library to cdb databases | |
9 | Name: perl-CDB-TinyCDB | |
10 | Version: 0.05 | |
2859876c | 11 | Release: 2 |
e501d8be ER |
12 | # same as perl |
13 | License: GPL v1+ or Artistic | |
14 | Group: Development/Languages/Perl | |
15 | Source0: http://www.cpan.org/modules/by-authors/id/A/AJ/AJGB/CDB-TinyCDB-%{version}.tar.gz | |
16 | # Source0-md5: e77702b031264c6686a6f617e92b9e24 | |
17 | URL: https://metacpan.org/release/CDB-TinyCDB/ | |
18 | BuildRequires: perl-devel >= 1:5.8.0 | |
19 | BuildRequires: rpm-perlprov >= 4.1-13 | |
20 | BuildRequires: tinycdb-devel | |
21 | %if %{with tests} | |
22 | BuildRequires: perl-Test-Exception | |
23 | BuildRequires: perl-Test-NoWarnings | |
24 | %endif | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %description | |
28 | CDB::TinyCDB is a Perl extension for TinyCDB library to query and | |
29 | create CDB files. | |
30 | ||
31 | %prep | |
32 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
33 | ||
34 | %build | |
35 | %{__perl} Makefile.PL \ | |
36 | INSTALLDIRS=vendor | |
37 | %{__make} \ | |
38 | CC="%{__cc}" \ | |
39 | OPTIMIZE="%{rpmcflags}" | |
40 | ||
41 | %{?with_tests:%{__make} test} | |
42 | ||
43 | %install | |
44 | rm -rf $RPM_BUILD_ROOT | |
45 | %{__make} pure_install \ | |
46 | DESTDIR=$RPM_BUILD_ROOT | |
47 | ||
48 | %clean | |
49 | rm -rf $RPM_BUILD_ROOT | |
50 | ||
51 | %files | |
52 | %defattr(644,root,root,755) | |
53 | %doc Changes README | |
54 | %dir %{perl_vendorarch}/CDB | |
55 | %{perl_vendorarch}/CDB/TinyCDB.pm | |
56 | %dir %{perl_vendorarch}/auto/CDB | |
57 | %dir %{perl_vendorarch}/auto/CDB/TinyCDB | |
58 | %attr(755,root,root) %{perl_vendorarch}/auto/CDB/TinyCDB/TinyCDB.so | |
59 | %{_mandir}/man3/CDB::TinyCDB.3pm* |