cta-cern-tape-utils.spec 1.35 KB
Newer Older
1
2
3
Summary: CTA CERN specific tape utilities
Name: cta-cern-tape-utils
Version: 1.0
Vladimir Bahyl's avatar
Vladimir Bahyl committed
4
Release: 2
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
License: GPL
Buildroot: /tmp/%{name}-%{version}
BuildArch: noarch
Group: Application/CTA
Requires: python36 cta-cli
Source: %{name}-%{version}.tgz

%description
CTA CERN specific tape utilities:
 - generate /etc/cta/TPCONFIG file from TOMS framework
 - tape mount/unmount script
 - tape label wrapper
 - tape media check
 - tape drive test

Author: David Fernandez Alvarez, Vladimir Bahyl - 8/2019
%prep

%setup -c

%install
[ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT
mkdir $RPM_BUILD_ROOT
cd $RPM_BUILD_ROOT
Vladimir Bahyl's avatar
Vladimir Bahyl committed
29
mkdir -p usr/local/bin usr/local/lib/python
30
31
name=`echo %{name} |sed 's/CERN-CC-//'`

Vladimir Bahyl's avatar
Vladimir Bahyl committed
32
33
34
35
36
37
install -m 755 $RPM_BUILD_DIR/%{name}-%{version}/tape-config-generate	$RPM_BUILD_ROOT/usr/local/bin/tape-config-generate

install -m 644 -p $RPM_BUILD_DIR/%{name}-%{version}/TapeAdmin.py	$RPM_BUILD_ROOT/usr/local/lib/python

install -m 755 -p $RPM_BUILD_DIR/%{name}-%{version}/tape-mount		$RPM_BUILD_ROOT/usr/local/bin/tape-mount
ln -s $RPM_BUILD_ROOT/usr/local/bin/tape-mount				$RPM_BUILD_ROOT/usr/local/bin/tape-unmount
38
39
40
41
42
43
44
45
46

%post

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
/usr/local/bin/tape-config-generate
Vladimir Bahyl's avatar
Vladimir Bahyl committed
47
48
49
50
51
/usr/local/lib/python/TapeAdmin.py
/usr/local/lib/python/TapeAdmin.pyc
/usr/local/lib/python/TapeAdmin.pyo
/usr/local/bin/tape-mount
/usr/local/bin/tape-unmount