-
Notifications
You must be signed in to change notification settings - Fork 5
/
sgas-bart.spec
47 lines (40 loc) · 1.21 KB
/
sgas-bart.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
%define name sgas-bart
%define version 008
%define release 1
Summary: SGAS Batch system Reporting Tool
Name: %{name}
Version: %{version}
Release: %{release}
Source0: %{name}-%{version}.tar.gz
License: Licensed under the Apache License, Version 2.0
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
BuildArch: noarch
Vendor: Magnus Jonsson <[email protected]>
Url: http://www.sgas.se/
Requires: python-twisted-core, python-twisted-web, pyOpenSSL, python-dateutil
%description
Tool for generating usage records from LRMS logs and registering the records to SGAS.
%prep
%setup
%build
python setup.py build
cat > sgas-bart.cron <<EOF
#!/bin/bash
# Configure BaRT in /etc/bart/bart.conf and test before uncommenting:
#
# /usr/bin/bart-logger && /usr/bin/bart-registrant
EOF
chmod +x sgas-bart.cron
%install
python setup.py install --optimize 1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
install -D sgas-bart.cron $RPM_BUILD_ROOT/etc/cron.hourly/sgas-bart
mkdir -p $RPM_BUILD_ROOT/var/spool/bart
%clean
rm -rf $RPM_BUILD_ROOT
%files -f INSTALLED_FILES
%defattr(-,root,root)
%config(noreplace) /etc/bart/*
%config(noreplace) /etc/cron.hourly/sgas-bart
%dir /var/spool/bart