-
Notifications
You must be signed in to change notification settings - Fork 51
/
servant.spec
56 lines (44 loc) · 1.17 KB
/
servant.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
%define _target_os Linux
%define oname servant
%define _prefix /opt/%{oname}
%define _docdir %{_prefix}/doc
Summary: A common agent to execute commands, serve files and so on
Name: servant
Version: %{_version}
Release: %{_release}%{?dist}
License: APL
Group: Applications/System
URL: http://github.com/xiezhenye/servant
Prefix: %{_prefix}
Source0: %{oname}-src.tar.gz
#BuildRequires: yz-go
%description
A common agent to execute commands, serve files and so on
%prep
%setup -n %{oname}-src
%build
%define debug_package %{nil}
%{__make} linux_amd64/bin/servant
%install
%{__rm} -rf %{buildroot}
%{__mkdir} -p %{buildroot}%{prefix}/doc
%{__mv} linux_amd64/bin %{buildroot}%{prefix}
%{__mv} README.md LICENSE example %{buildroot}%{_docdir}
%{__mv} conf %{buildroot}%{prefix}
%{__mkdir} %{buildroot}%{prefix}/conf/extra
%{__mv} scripts %{buildroot}%{prefix}
%clean
%{__rm} -rf %{buildroot}
%post
%{__mkdir} -p /data/logs/servant
%files
%defattr(-, root, root, 0755)
%{_bindir}/servant
%{prefix}/scripts/servantctl
%{prefix}/conf/extra
%defattr(-, root, root, 0644)
%{_docdir}/README.md
%{_docdir}/LICENSE
%{_docdir}/example/example.xml
%{_docdir}/example/timer.xml
%{prefix}/conf/servant.xml