]>
Commit | Line | Data |
---|---|---|
12fadaf2 | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
5 | %include /usr/lib/rpm/macros.perl | |
6 | %define pdir Config | |
7 | %define pnam JSON | |
8 | Summary: Config::JSON - a JSON based config file system | |
9 | Name: perl-Config-JSON | |
a104a4f9 | 10 | Version: 1.3.1 |
12fadaf2 | 11 | Release: 1 |
12 | # same as perl | |
13 | License: GPL v1+ or Artistic | |
14 | Group: Development/Languages/Perl | |
15 | Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz | |
a104a4f9 | 16 | # Source0-md5: 1318fd32eecfa90df406d17b108f1445 |
17 | URL: http://search.cpan.org/dist/Config-JSON/ | |
12fadaf2 | 18 | BuildRequires: perl-devel >= 1:5.8.0 |
19 | BuildRequires: rpm-perlprov >= 4.1-13 | |
a104a4f9 | 20 | %if %{with tests} |
21 | BuildRequires: perl(Class::InsideOut) >= 1.06 | |
22 | BuildRequires: perl-JSON >= 2.12 | |
23 | BuildRequires: perl-Test-Deep >= 0.095 | |
24 | %endif | |
12fadaf2 | 25 | BuildArch: noarch |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %description | |
29 | This package parses the config files written in JSON. It also does | |
30 | some non-JSON stuff, like allowing for comments in the files. | |
31 | ||
32 | %prep | |
33 | %setup -q -n %{pdir}-%{pnam} | |
34 | ||
35 | %build | |
36 | %{__perl} Makefile.PL \ | |
37 | INSTALLDIRS=vendor | |
38 | %{__make} | |
39 | ||
40 | %{?with_tests:%{__make} test} | |
41 | ||
42 | %install | |
43 | rm -rf $RPM_BUILD_ROOT | |
a104a4f9 | 44 | |
12fadaf2 | 45 | %{__make} install \ |
46 | DESTDIR=$RPM_BUILD_ROOT | |
47 | ||
48 | %clean | |
49 | rm -rf $RPM_BUILD_ROOT | |
50 | ||
51 | %files | |
52 | %defattr(644,root,root,755) | |
a104a4f9 | 53 | %doc Changes README |
12fadaf2 | 54 | %{perl_vendorlib}/Config/JSON.pm |
55 | %{_mandir}/man3/* |