forked from UnblockedByOps/logwatcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
logwatcher.spec-sample
executable file
·55 lines (42 loc) · 1.37 KB
/
logwatcher.spec-sample
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
Summary: Generate near-realtime metrics from an access log.
Name: logwatcher
Version: 1.0.0
Release: 0.1
License: Apache License
Group: System/Tools
URL: https://github.com/CityGrid/logwatcher
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
# Disable automatic dependency checking
Autoreqprov: 0
Autoreq: 0
%description
The LogWatcher packages provides a script (and libraries) which runs as a daemon, reading a log file,
generating metrics from it every minute.
%pre
%prep
%build
%install
rm -rf $RPM_BUILD_ROOT
# Copy files from svn into $RPM_BUILD_ROOT, if any.
mkdir -p $RPM_BUILD_ROOT/app/logwatcher/bin
mkdir -p $RPM_BUILD_ROOT/app/logwatcher/etc
mkdir -p $RPM_BUILD_ROOT/app/logwatcher/plugins
cp $RPM_SOURCE_DIR/*py $RPM_BUILD_ROOT/app/logwatcher/bin/
mkdir -p $RPM_BUILD_ROOT/etc/init.d/
cp $RPM_SOURCE_DIR/init.d/logwatcher $RPM_BUILD_ROOT/etc/init.d/
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
# Directories
%dir %attr(755, root, root) /app/logwatcher
%dir %attr(755, root, root) /app/logwatcher/bin
%dir %attr(755, root, root) /app/logwatcher/etc
%dir %attr(755, root, root) /app/logwatcher/plugins
# Files
%attr(755, root, root) /app/logwatcher/bin/newlogwatcher.py
%attr(755, root, root) /app/logwatcher/bin/gmetriclib.py
%attr(755, root, root) /app/logwatcher/bin/graphitelib.py
%attr(755, root, root) /etc/init.d/logwatcher
%post