-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpython-cb-fireeye-connector.spec
60 lines (46 loc) · 1.26 KB
/
python-cb-fireeye-connector.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
56
57
58
59
60
%define name python-cb-fireeye-connector
%define version 1.1
%define unmangled_version 1.1
%define release 1
%global _enable_debug_package 0
%global debug_package %{nil}
%global __os_install_post /usr/lib/rpm/brp-compress %{nil}
Summary: Carbon Black FireEye Connector
Name: %{name}
Version: %{version}
Release: %{release}
Source0: %{name}-%{unmangled_version}.tar.gz
License: MIT
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
BuildArch: x86_64
Vendor: Bit9
Url: http://www.bit9.com/
%description
UNKNOWN
%prep
%setup -n %{name}-%{unmangled_version}
%build
pyinstaller cb-fireeye-connector.spec
%install
python setup.py install_cb --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
%clean
rm -rf $RPM_BUILD_ROOT
%files -f INSTALLED_FILES
%defattr(-,root,root)
%config(noreplace)
/etc/cb/integrations/fireeye/connector.conf
%posttrans
chkconfig --add cb-fireeye-connector
chkconfig --level 345 cb-fireeye-connector on
# not auto-starting because conf needs to be updated
#/etc/init.d/cb-fireeye-connector start
%preun
/etc/init.d/cb-fireeye-connector stop
# only delete the chkconfig entry when we uninstall for the last time,
# not on upgrades
if [ "X$1" = "X0" ]
then
chkconfig --del cb-fireeye-connector
fi