-
Notifications
You must be signed in to change notification settings - Fork 0
/
livereduce.spec
65 lines (52 loc) · 1.57 KB
/
livereduce.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
%global srcname livereduce
%global summary Daemon for running live data reduction with systemd
# This only supports python3
%define release 1
Summary: %{summary}
Name: python-%{srcname}
Version: 1.12
Release: %{release}%{?dist}
Source0: %{srcname}-%{version}.tar.gz
License: MIT
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
BuildArch: noarch
Vendor: Pete Peterson
Url: https://github.com/mantidproject/livereduce
BuildRequires: python%{python3_pkgversion}
BuildRequires: systemd-rpm-macros
Requires: python%{python3_pkgversion}
Requires: jq
Requires: nsd-app-wrap
Requires: systemd
%description
There should be a meaningful description, but it is not needed quite yet.
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
%prep
%setup -q -n %{srcname}-%{version} -n %{srcname}-%{version}
%build
# no build step
%install
%{__rm} -rf $RPM_BUILD_ROOT
# put things in the bin directory
%{__mkdir} -p %{buildroot}%{_bindir}/
%{__install} -m 644 scripts/livereduce.py %{buildroot}%{_bindir}/
%{__install} -m 755 scripts/livereduce.sh %{buildroot}%{_bindir}/
%{__mkdir} -p %{buildroot}%{_unitdir}/
%{__install} -m 644 livereduce.service %{buildroot}%{_unitdir}/
%check
# no test step
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%post
%{__mkdir} -p /var/log/SNS_applications/
%{__chown} snsdata /var/log/SNS_applications/
%{__chmod} 1755 /var/log/SNS_applications/
%preun
%{__rm} -f /var/log/SNS_applications/livereduce.log*
%files
%doc README.md
%{_bindir}/livereduce.py
%{_bindir}/livereduce.sh
%{_unitdir}/livereduce.service