]>
Commit | Line | Data |
---|---|---|
a883b3a8 | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
5 | %include /usr/lib/rpm/macros.perl | |
6 | %define pdir MouseX | |
7 | %define pnam ConfigFromFile | |
8 | Summary: MouseX::ConfigFromFile - An abstract Mouse role for setting attributes from a configfile | |
9 | Summary(pl.UTF-8): MouseX::ConfigFromFile - abstrakcyjna rola Mouse do ustawiania atrybutów z pliku konfiguracyjnego | |
10 | Name: perl-MouseX-ConfigFromFile | |
11 | Version: 0.03 | |
12 | Release: 1 | |
13 | License: GPL v1+ or Artistic | |
14 | Group: Development/Languages/Perl | |
2d7cbba3 | 15 | Source0: http://search.cpan.org/CPAN/authors/id/M/MA/MASAKI/%{pdir}-%{pnam}-%{version}.tar.gz |
a883b3a8 | 16 | # Source0-md5: 1299c2e66efefc113b8b5ac0405a5c24 |
17 | URL: http://search.cpan.org/dist/MouseX-ConfigFromFile/ | |
18 | BuildRequires: perl-devel >= 1:5.8.0 | |
19 | BuildRequires: rpm-perlprov >= 4.1-13 | |
20 | %if %{with tests} | |
21 | BuildRequires: perl(MouseX::Types::Path::Class) >= 0.05 | |
22 | BuildRequires: perl-Mouse | |
23 | BuildRequires: perl(Any::Moose) >= 0.05 | |
24 | BuildRequires: perl(Test::UseAllModules) | |
25 | %endif | |
26 | BuildArch: noarch | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %description | |
30 | This is an abstract role which provides an alternate constructor for | |
31 | creating objects using parameters passed in from a configuration file. | |
32 | The actual implementation of reading the configuration file is left to | |
33 | concrete subroles. | |
34 | ||
35 | It declares an attribute configfile and a class method | |
36 | new_with_config, and requires that concrete roles derived from it | |
37 | implement the class method get_config_from_file. | |
38 | ||
39 | Attributes specified directly as arguments to new_with_config | |
40 | supercede those in the configfile. | |
41 | ||
42 | %description -l pl.UTF-8 | |
43 | MouseX::ConfigFromFile - abstrakcyjna rola Mouse do ustawiania atrybutów z pliku konfiguracyjnego | |
44 | ||
45 | %prep | |
46 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
47 | ||
48 | %build | |
49 | %{__perl} Makefile.PL \ | |
50 | INSTALLDIRS=vendor | |
51 | %{__make} | |
52 | ||
53 | %{?with_tests:%{__make} test} | |
54 | ||
55 | %install | |
56 | rm -rf $RPM_BUILD_ROOT | |
57 | ||
58 | %{__make} install \ | |
59 | DESTDIR=$RPM_BUILD_ROOT | |
60 | ||
61 | %clean | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
64 | %files | |
65 | %defattr(644,root,root,755) | |
66 | %doc Changes README | |
67 | %{perl_vendorlib}/MouseX/*.pm | |
68 | %{_mandir}/man3/* |