-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpython-cb-fortisandbox-connector.spec
59 lines (46 loc) · 1.34 KB
/
python-cb-fortisandbox-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
%define name python-cb-fortisandbox-connector
%define version 1.0
%define unmangled_version 1.0
%define release 2
%global _enable_debug_package 0
%global debug_package %{nil}
%global __os_install_post /usr/lib/rpm/brp-compress %{nil}
Summary: Carbon Black fortisandbox Bridge
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: Carbon Black
Url: http://www.carbonblack.com/
%description
UNKNOWN
%prep
%setup -n %{name}-%{unmangled_version}
%build
pyinstaller cb-fortisandbox-connector.spec
%install
python setup.py install_cb --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
%clean
rm -rf $RPM_BUILD_ROOT
%posttrans
mkdir -p /usr/share/cb/integrations/fortisandbox/db
mkdir -p /var/log/cb/integrations/fortisandbox
chkconfig --add cb-fortisandbox-connector
chkconfig --level 345 cb-fortisandbox-connector on
# not auto-starting because conf needs to be updated
#/etc/init.d/cb-fortisandbox-connector start
%preun
/etc/init.d/cb-fortisandbox-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-fortisandbox-connector
fi
%files -f INSTALLED_FILES
%defattr(-,root,root)