-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnetsage-aggregate-flow-importer.spec
56 lines (40 loc) · 1.5 KB
/
netsage-aggregate-flow-importer.spec
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: NetSage Resource Database
Name: netsage-aggregate-flow-importer
Version: 1.0.0
Release: 1%{?dist}
License: Apache
Group: GRNOC
URL: http://globalnoc.iu.edu
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch: noarch
Requires: perl-GRNOC-Config >= 1.0.9-1
Requires: perl-GRNOC-WebService-Client >= 1.4.0-1
Requires: perl-Search-Elasticsearch
Requires: perl-List-MoreUtils
Requires: perl-JSON
%description
Application that takes flow data from ELK, aggregates it based on a circuit key, and stores
the resulting data into a TSDS instance.
%pre
/usr/bin/getent passwd netsage || /usr/sbin/useradd -r -U -s /sbin/nologin netsage
%prep
%setup -q
%build
%install
rm -rf $RPM_BUILD_ROOT
%{__install} -d -m0755 %{buildroot}/etc/netsage/aggregate-flow-importer/
%{__install} -d -m0755 %{buildroot}/usr/bin/
%{__install} -d -p %{buildroot}/etc/cron.d/
%{__install} bin/aggregate-flow-importer.pl %{buildroot}/usr/bin/aggregate-flow-importer.pl
%{__install} conf/config.xml.example %{buildroot}/etc/netsage/aggregate-flow-importer/config.xml
%{__install} cron/aggregate-flow-importer.cron %{buildroot}/etc/cron.d/aggregate-flow-importer.cron
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(755,root,root,-)
/usr/bin/aggregate-flow-importer.pl
%defattr(640,netsage,netsage,-)
%config(noreplace) /etc/netsage/aggregate-flow-importer/config.xml
%defattr(644,root,root,-)
%config(noreplace) /etc/cron.d/aggregate-flow-importer.cron