-
Notifications
You must be signed in to change notification settings - Fork 11
/
metalog.spec.in
96 lines (76 loc) · 2.73 KB
/
metalog.spec.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
%define name metalog
%define version @VERSION@
%define release 1
%define builddir $RPM_BUILD_DIR/%{name}-%{version}
%define no_install_post_compress_docs 1
#dont change these. Use --define instead. See below.
%define prefixdef /usr/local
%define sysconfdef /etc
#If you don't like the prefix '/usr/local' you can override it like this:
#rpm -ba|--rebuild --define 'prefix /usr'
%{?!prefix:%define prefix %{prefixdef}}
#If you don't like the sysconfdir '/etc' you can override it like this:
#rpm -ba|--rebuild --define 'sysconfdir /usr/local/etc'
%{?!sysconfdir:%define sysconfdir %{sysconfdef}}
Name: %{name}
Version: %{version}
Release: %{release}
Vendor: Generic
Packager: Frank DENIS <[email protected]>
URL: http://metalog.sourceforge.net/
Source: ftp://ftp.fr.pureftpd.org/metalog/%{name}-%{version}.tar.gz
Group: System/Logging
Copyright: GPL
Provides: syslog-daemon
BuildRoot: %{_tmppath}/%{name}-%{version}
Summary: An efficient alternative to syslogd
Obsoletes: syslogd klogd
%description
Metalog is a modern replacement for syslogd and klogd. The logged messages
can be dispatched according to their facility, urgency, program name and/or
Perl-compatible regular expressions. Log files can be automatically rotated
when they exceed a certain size or age. External shell scripts (e.g., mail)
can be launched when specific patterns are found.
Metalog is easier to configure than syslogd and accepts an unlimited
number of rules and it has (switchable) memory bufferization for maximal
performance.
%prep
%setup -n %{name}-%{version}
%build
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} \
--mandir=%{_mandir} --sysconfdir=%{sysconfdir}
if [ "$SMP" != "" ]; then
(make "MAKE=make -k -j $SMP"; exit 0)
make
else
make
fi
%install
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"
make DESTDIR="$RPM_BUILD_ROOT" install-strip
if [ ! -d $RPM_BUILD_ROOT%{prefix}/sbin ]; then
mkdir -p $RPM_BUILD_ROOT%{prefix}/sbin
fi
if [ ! -d $RPM_BUILD_ROOT%{sysconfdir} ]; then
mkdir -p $RPM_BUILD_ROOT%{sysconfdir}
fi
if [ ! -d $RPM_BUILD_ROOT%{_mandir}/man8 ]; then
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
fi
gzip --best $RPM_BUILD_ROOT/%{_mandir}/man8/*.8
install -m 644 metalog.conf $RPM_BUILD_ROOT%{sysconfdir}/
%clean
[ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf "$RPM_BUILD_ROOT"
%files
%defattr(0755, root, root)
%{prefix}/sbin/*
%defattr(0644, root, root)
%{_mandir}/man8/*
%defattr(-, root, root)
%doc README AUTHORS NEWS
%config(noreplace) %{sysconfdir}/*.conf
%changelog
* Mon Jul 9 2001 Frank DENIS <[email protected]>
- First RPM build of this package.
* Sun Apr 6 2003 Frank DENIS <[email protected]>
- Cleanups