forked from Jigsaw-Code/outline-ss-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
outline-ss-server.spec
53 lines (41 loc) · 1.4 KB
/
outline-ss-server.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
%global gomodulesmode GO111MODULE=auto
Name: outline-ss-server
Version: 0.0.2
Release: 1%{?dist}
Summary: Outline server
License: MIT
URL: http://stingr.net
Source0: %{name}-%{version}.tar.gz
BuildRequires: golang
BuildRequires: systemd
Requires(pre): shadow-utils
%{?systemd_requires}
%post
%systemd_post %{name}.service
%preun
%systemd_preun %{name}.service
%postun
%systemd_postun_with_restart %{name}.service
%description
Outline server but NOT IN DOCKER
%prep
%setup -q
%build
%gobuild -o bin/outline-ss-server github.com/Jigsaw-Code/outline-ss-server/cmd/outline-ss-server
%install
%{__install} -d $RPM_BUILD_ROOT%{_bindir}
%{__install} -v -D -t $RPM_BUILD_ROOT%{_bindir} bin/%{name}
%{__install} -d $RPM_BUILD_ROOT%{_unitdir}
%{__install} -v -D -t $RPM_BUILD_ROOT%{_unitdir} %{name}.service %{name}@.socket outline-ss-metrics@.socket
%{__install} -d $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
%{__install} -m 644 -T %{name}.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/%{name}
%{__install} -d $RPM_BUILD_ROOT%{_sysconfdir}/outline-ss-server
%{__install} -m 644 -T cmd/outline-ss-server/config_example.yml %{buildroot}%{_sysconfdir}/outline-ss-server/config.yml
%files
%{_bindir}/%{name}
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}@.socket
%{_unitdir}/outline-ss-metrics@.socket
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
%config(noreplace) %{_sysconfdir}/outline-ss-server/config.yml
%changelog