forked from Symantec/keymaster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
keymaster.spec
75 lines (60 loc) · 3.29 KB
/
keymaster.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
61
62
63
64
65
66
67
68
69
70
71
72
73
Name: keymaster
Version: 1.4.5
Release: 1%{?dist}
Summary: Short term access certificate generator and client
#Group:
License: ASL 2.0
URL: https://github.com/cviecco/simple-cloud-encrypt/
Source0: keymaster-%{version}.tar.gz
#BuildRequires: golang
#Requires:
Requires(pre): /usr/sbin/useradd, /usr/bin/getent
Requires(postun): /usr/sbin/userdel
#no debug package as this is go
%define debug_package %{nil}
%description
Simple utilites for checking state of ldap infrastructure
%prep
%setup -n %{name}-%{version}
%build
make
%install
#%make_install
%{__install} -Dp -m0755 ~/go/bin/keymasterd %{buildroot}%{_sbindir}/keymasterd
%{__install} -Dp -m0755 ~/go/bin/keymaster %{buildroot}%{_bindir}/keymaster
%{__install} -Dp -m0755 ~/go/bin/keymaster-unlocker %{buildroot}%{_bindir}/keymaster-unlocker
install -d %{buildroot}/usr/lib/systemd/system
install -p -m 0644 misc/startup/keymaster.service %{buildroot}/usr/lib/systemd/system/keymaster.service
install -d %{buildroot}/%{_datarootdir}/keymasterd/static_files/
install -p -m 0644 cmd/keymasterd/static_files/u2f-api.js %{buildroot}/%{_datarootdir}/keymasterd/static_files/u2f-api.js
install -p -m 0644 cmd/keymasterd/static_files/keymaster-u2f.js %{buildroot}/%{_datarootdir}/keymasterd/static_files/keymaster-u2f.js
install -p -m 0644 cmd/keymasterd/static_files/webui-2fa-u2f.js %{buildroot}/%{_datarootdir}/keymasterd/static_files/webui-2fa-u2f.js
install -p -m 0644 cmd/keymasterd/static_files/webui-2fa-symc-vip.js %{buildroot}/%{_datarootdir}/keymasterd/static_files/webui-2fa-symc-vip.js
install -p -m 0644 cmd/keymasterd/static_files/keymaster.css %{buildroot}/%{_datarootdir}/keymasterd/static_files/keymaster.css
install -p -m 0644 cmd/keymasterd/static_files/jquery-1.12.4.patched.min.js %{buildroot}/%{_datarootdir}/keymasterd/static_files/jquery-1.12.4.patched.min.js
install -d %{buildroot}/%{_datarootdir}/keymasterd/customization_data/templates
install -p -m 0644 cmd/keymasterd/customization_data/templates/header_extra.tmpl %{buildroot}/%{_datarootdir}/keymasterd/customization_data/templates/header_extra.tmpl
install -p -m 0644 cmd/keymasterd/customization_data/templates/footer_extra.tmpl %{buildroot}/%{_datarootdir}/keymasterd/customization_data/templates/footer_extra.tmpl
install -p -m 0644 cmd/keymasterd/customization_data/templates/login_extra.tmpl %{buildroot}/%{_datarootdir}/keymasterd/customization_data/templates/login_extra.tmpl
install -d %{buildroot}/%{_datarootdir}/keymasterd/customization_data/web_resources
install -p -m 0644 cmd/keymasterd/customization_data/web_resources/customization.css %{buildroot}/%{_datarootdir}/keymasterd/customization_data/web_resources/customization.css
%pre
/usr/bin/getent passwd keymaster || useradd -d /var/lib/keymaster -s /bin/false -U -r keymaster
%post
mkdir -p /etc/keymaster/
mkdir -p /var/lib/keymaster
chown keymaster /var/lib/keymaster
systemctl daemon-reload
%postun
/usr/sbin/userdel keymaster
systemctl daemon-reload
%files
#%doc
%{_sbindir}/keymasterd
%{_bindir}/keymaster
%{_bindir}/keymaster-unlocker
/usr/lib/systemd/system/keymaster.service
%{_datarootdir}/keymasterd/static_files/*
%config(noreplace) %{_datarootdir}/keymasterd/customization_data/web_resources/*
%config(noreplace) %{_datarootdir}/keymasterd/customization_data/templates/*
%changelog