]>
Commit | Line | Data |
---|---|---|
5447f5a7 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without autodeps # don't BR packages needed only for resolving deps | |
4 | %bcond_without tests # do not perform "make test" | |
69ca9388 | 5 | |
5447f5a7 ER |
6 | %define pdir Log |
7 | %define pnam LogLite | |
9c85e991 | 8 | Summary: Log::LogLite - class to help us create simple logs for our application |
dac46115 | 9 | Summary(pl.UTF-8): Log::LogLite - klasa pomagająca tworzyć proste logi z aplikacji |
5447f5a7 ER |
10 | Name: perl-Log-LogLite |
11 | Version: 0.82 | |
75b6e962 | 12 | Release: 1 |
5447f5a7 ER |
13 | # same as perl |
14 | License: GPL v1+ or Artistic | |
15 | Group: Development/Languages/Perl | |
16 | Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz | |
17 | # Source0-md5: 67e72da51df7423c028b4dc0186f5f52 | |
69ca9388 | 18 | URL: http://search.cpan.org/dist/Log-LogLite/ |
5447f5a7 ER |
19 | BuildRequires: perl-devel >= 1:5.8.0 |
20 | BuildRequires: rpm-perlprov >= 4.1-13 | |
21 | %if %{with autodeps} || %{with tests} | |
22 | BuildRequires: perl-IO-LockedFile | |
23 | %endif | |
24 | BuildArch: noarch | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %description | |
9c85e991 | 28 | In order to have a log we have first to create a Log::LogLite object. |
69ca9388 | 29 | The Log::LogLite object is created with a logging level. The default |
9c85e991 JB |
30 | logging level is 5. After the Log::LogLite object is created, each |
31 | call to the write method may write a new line in the log file. If the | |
32 | level of the message is lower or equal to the logging level, the | |
33 | message will be written to the log file. The format of the logging | |
34 | messages can be controled by changing the template, and by defining a | |
35 | default message. The class uses the IO::LockedFile class. | |
36 | ||
4710351a JR |
37 | %description -l pl.UTF-8 |
38 | W celu stworzenia logu trzeba najpierw utworzyć obiekt Log::LogLite. | |
39 | Obiekt Log::LogLite tworzy się z poziomem logowania. Domyślny poziom | |
40 | logowania to 5. Po utworzeniu obiektu Log::LogLite każde wywołanie | |
41 | metody write może zapisać nową linię w pliku logu. Jeśli poziom | |
42 | komunikatu jest mniejszy lub równy poziomowi logowania, komunikat jest | |
43 | zapisywany do pliku. Format komunikatów logujących może być sterowany | |
44 | poprzez zmianę szablonu i definiowanie domyślnego komunikatu. Ta klasa | |
45 | używa klasy IO::LockedFile. | |
5447f5a7 ER |
46 | |
47 | %prep | |
48 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
49 | ||
50 | %build | |
51 | %{__perl} Makefile.PL \ | |
52 | INSTALLDIRS=vendor | |
53 | %{__make} | |
54 | ||
55 | %{?with_tests:%{__make} test} | |
56 | ||
57 | %install | |
58 | rm -rf $RPM_BUILD_ROOT | |
59 | ||
60 | %{__make} pure_install \ | |
61 | DESTDIR=$RPM_BUILD_ROOT | |
62 | ||
63 | %clean | |
64 | rm -rf $RPM_BUILD_ROOT | |
65 | ||
66 | %files | |
67 | %defattr(644,root,root,755) | |
68 | %doc Changes README | |
69 | %{perl_vendorlib}/Log/*.pm | |
70 | %{_mandir}/man3/* |