]>
Commit | Line | Data |
---|---|---|
186bdffa MP |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
186bdffa MP |
5 | %define pdir Config |
6 | %define pnam Record | |
7 | Summary: Config::Record - Configuration file access | |
a2a8c7ac | 8 | Summary(pl.UTF-8): Config::Record - dostęp do plików konfiguracyjnych |
186bdffa MP |
9 | Name: perl-Config-Record |
10 | Version: 1.1.2 | |
9658500f JB |
11 | Release: 1 |
12 | License: GPL v2+ | |
186bdffa | 13 | Group: Development/Languages/Perl |
a2a8c7ac | 14 | Source0: http://www.cpan.org/modules/by-module/Config/%{pdir}-%{pnam}-%{version}.tar.gz |
186bdffa | 15 | # Source0-md5: 3958d3b5221ddf65ba3143d28e0cd4e0 |
a2a8c7ac | 16 | URL: http://search.cpan.org/dist/Config-Record/ |
186bdffa MP |
17 | BuildRequires: perl-devel >= 1:5.8.0 |
18 | BuildRequires: rpm-perlprov >= 4.1-13 | |
19 | %if %{with tests} | |
a2a8c7ac JB |
20 | BuildRequires: perl-Test-Pod |
21 | BuildRequires: perl-Test-Pod-Coverage | |
186bdffa MP |
22 | %endif |
23 | BuildArch: noarch | |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
25 | ||
26 | %description | |
0942e6de ER |
27 | This module provides an API for loading and saving of simple |
28 | configuration file records. Entries in the configuration file are | |
29 | essentially key,value pairs, with the key and values separated by a | |
30 | single equals symbol. The key consists only of alphanumeric | |
31 | characters. There are three types of values, scalar values can contain | |
32 | anything except newlines. Trailing whitespace will be trimmed unless | |
33 | the value is surrounded in double quotes. | |
186bdffa | 34 | |
a2a8c7ac JB |
35 | %description -l pl.UTF-8 |
36 | Ten moduł udostępnia API do odczytu i zapisu rekordów w prostych | |
37 | plikach konfiguracyjnych. Wpisy w pliku konfiguracyjnym to zasadniczo | |
38 | pary klucz=wartość. Klucz może zawierać tylko znaki alfanumeryczne. Są | |
39 | dostępne trzy rodzaje wartości, wartości skalarne mogą zawierać | |
40 | cokolwiek poza znakami nowej linii. Końcowe znaki odstępu są usuwane, | |
41 | chyba że wartość jest umieszczona między podwójnymi cudzysłowami. | |
42 | ||
186bdffa MP |
43 | %prep |
44 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
45 | ||
46 | %build | |
47 | %{__perl} Makefile.PL \ | |
48 | INSTALLDIRS=vendor | |
49 | %{__make} | |
50 | ||
51 | %{?with_tests:%{__make} test} | |
52 | ||
53 | %install | |
54 | rm -rf $RPM_BUILD_ROOT | |
55 | ||
56 | %{__make} install \ | |
57 | DESTDIR=$RPM_BUILD_ROOT | |
58 | ||
59 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
0942e6de | 60 | cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
9658500f | 61 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorlib}/Config/Record.pod |
186bdffa MP |
62 | |
63 | %clean | |
64 | rm -rf $RPM_BUILD_ROOT | |
65 | ||
66 | %files | |
67 | %defattr(644,root,root,755) | |
9658500f JB |
68 | %doc AUTHORS CHANGES README |
69 | %{perl_vendorlib}/Config/Record.pm | |
70 | %{_mandir}/man3/Config::Record.3pm* | |
186bdffa | 71 | %{_examplesdir}/%{name}-%{version} |