RT notifier: parse templates without header correctly
[openxpki.git] / trunk / package / suse / external-dependencies / Log-Log4perl.spec
blob101b8021fecece11244e8c7bd4a1a2b3b493aba3
2 # - Log::Log4perl -
3 # This spec file was automatically generated by cpan2rpm [ver: 2.027]
4 # The following arguments were used:
5 # --spec-only --version=1.07 '--author=Michael Schilli' Log-Log4perl-1.07.tar.gz
6 # For more information on cpan2rpm please visit: http://perl.arix.com/
9 %define pkgname Log-Log4perl
10 %define filelist %{pkgname}-%{version}-filelist
11 %define NVR %{pkgname}-%{version}-%{release}
12 %define maketest 0
14 name: perl-Log-Log4perl
15 summary: Log-Log4perl - Log4j implementation for Perl
16 version: 1.07
17 release: 1
18 vendor: Michael Schilli
19 packager: Arix International <cpan2rpm@arix.com>
20 license: Artistic
21 group: Applications/CPAN
22 url: http://www.cpan.org
23 buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n)
24 buildarch: noarch
25 prefix: %(echo %{_prefix})
26 source: Log-Log4perl-1.07.tar.gz
28 %description
29 Log::Log4perl lets you remote-control and fine-tune the logging behaviour
30 of your system from the outside. It implements the widely popular
31 (Java-based) Log4j logging package in pure Perl.
33 For a detailed tutorial on Log::Log4perl usage, please read
35 http://www.perl.com/pub/a/2002/09/11/log4perl.html
37 Logging beats a debugger if you want to know what's going on
38 in your code during runtime. However, traditional logging packages
39 are too static and generate a flood of log messages in your log files
40 that won't help you.
42 "Log::Log4perl" is different. It allows you to control the number of
43 logging messages generated at three different levels:
45 =over 4
47 =item *
49 At a central location in your system (either in a configuration file or
50 in the startup code) you specify *which components* (classes, functions)
51 of your system should generate logs.
53 =item *
55 You specify how detailed the logging of these components should be by
56 specifying logging *levels*.
58 =item *
60 You also specify which so-called *appenders* you want to feed your
61 log messages to ("Print it to the screen and also append it to /tmp/my.log")
62 and which format ("Write the date first, then the file name and line
63 number, and then the log message") they should be in.
65 =back
67 This is a very powerful and flexible mechanism. You can turn on and off
68 your logs at any time, specify the level of detail and make that
69 dependent on the subsystem that's currently executed.
71 Let me give you an example: You might
72 find out that your system has a problem in the
73 "MySystem::Helpers::ScanDir"
74 component. Turning on detailed debugging logs all over the system would
75 generate a flood of useless log messages and bog your system down beyond
76 recognition. With "Log::Log4perl", however, you can tell the system:
77 "Continue to log only severe errors to the log file. Open a second
78 log file, turn on full debug logs in the "MySystem::Helpers::ScanDir"
79 component and dump all messages originating from there into the new
80 log file". And all this is possible by just changing the parameters
81 in a configuration file, which your system can re-read even
82 while it's running!
85 # This package was generated automatically with the cpan2rpm
86 # utility. To get this software or for more information
87 # please visit: http://perl.arix.com/
90 %prep
91 %setup -q -n %{pkgname}-%{version}
92 chmod -R u+w %{_builddir}/%{pkgname}-%{version}
94 %build
95 grep -rsl '^#!.*perl' . |
96 grep -v '.bak$' |xargs --no-run-if-empty \
97 %__perl -MExtUtils::MakeMaker -e 'MY->fixin(@ARGV)'
98 CFLAGS="$RPM_OPT_FLAGS"
99 %{__perl} Makefile.PL `%{__perl} -MExtUtils::MakeMaker -e ' print qq|PREFIX=%{buildroot}%{_prefix}| if \$ExtUtils::MakeMaker::VERSION =~ /5\.9[1-6]|6\.0[0-5]/ '`
100 %{__make}
101 %if %maketest
102 %{__make} test
103 %endif
105 %install
106 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
108 %{makeinstall} `%{__perl} -MExtUtils::MakeMaker -e ' print \$ExtUtils::MakeMaker::VERSION <= 6.05 ? qq|PREFIX=%{buildroot}%{_prefix}| : qq|DESTDIR=%{buildroot}| '`
110 cmd=/usr/share/spec-helper/compress_files
111 [ -x $cmd ] || cmd=/usr/lib/rpm/brp-compress
112 [ -x $cmd ] && $cmd
114 # SuSE Linux
115 if [ -e /etc/SuSE-release -o -e /etc/UnitedLinux-release ]
116 then
117 %{__mkdir_p} %{buildroot}/var/adm/perl-modules
118 %{__cat} `find %{buildroot} -name "perllocal.pod"` \
119 | %{__sed} -e s+%{buildroot}++g \
120 > %{buildroot}/var/adm/perl-modules/%{name}
123 # remove special files
124 find %{buildroot} -name "perllocal.pod" \
125 -o -name ".packlist" \
126 -o -name "*.bs" \
127 |xargs -i rm -f {}
129 # no empty directories
130 find %{buildroot}%{_prefix} \
131 -type d -depth \
132 -exec rmdir {} \; 2>/dev/null
134 %{__perl} -MFile::Find -le '
135 find({ wanted => \&wanted, no_chdir => 1}, "%{buildroot}");
136 print "%doc eg xml ldap Changes README LICENSE";
137 for my $x (sort @dirs, @files) {
138 push @ret, $x unless indirs($x);
140 print join "\n", sort @ret;
142 sub wanted {
143 return if /auto$/;
145 local $_ = $File::Find::name;
146 my $f = $_; s|^\Q%{buildroot}\E||;
147 return unless length;
148 return $files[@files] = $_ if -f $f;
150 $d = $_;
151 /\Q$d\E/ && return for reverse sort @INC;
152 $d =~ /\Q$_\E/ && return
153 for qw|/etc %_prefix/man %_prefix/bin %_prefix/share|;
155 $dirs[@dirs] = $_;
158 sub indirs {
159 my $x = shift;
160 $x =~ /^\Q$_\E\// && $x ne $_ && return 1 for @dirs;
162 ' > %filelist
164 [ -z %filelist ] && {
165 echo "ERROR: empty %files listing"
166 exit -1
169 %clean
170 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
172 %files -f %filelist
173 %defattr(-,root,root)
175 %changelog
176 * Thu Nov 23 2006 root@dca02
177 - Initial build.