You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

59 lines
1.3 KiB

Summary: Tool for controlling tape drives
Name: mt-st
Version: 1.4
Release: 1%{?dist}
License: GPL+
URL: https://github.com/iustin/mt-st
Source0: https://github.com/iustin/mt-st/releases/download/v%{version}/%{name}-%{version}.tar.gz
Source1: stinit.service
BuildRequires: gcc
BuildRequires: make
BuildRequires: systemd
BuildRequires: bash-completion
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%description
The mt-st package contains the mt and st tape drive management
programs. Mt (for magnetic tape drives) and st (for SCSI tape devices)
can control rewinding, ejecting, skipping files and blocks and more.
Install mt-st if you need a tool to manage tape drives.
%prep
%autosetup
%build
make CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}"
%install
COMPLETIONDIR=%{buildroot}$(pkg-config --variable=completionsdir bash-completion)
%make_install EXEC_PREFIX=/usr COMPLETIONINSTALLDIR=$COMPLETIONDIR
install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/stinit.service
cd $COMPLETIONDIR
mv mt-st mt
%post
%systemd_post stinit.service
%preun
%systemd_preun stinit.service
%postun
%systemd_postun_with_restart stinit.service
%files
%doc COPYING README.md stinit.def.examples
%{_bindir}/mt
%{_sbindir}/stinit
%{_mandir}/man1/mt.1*
%{_mandir}/man8/stinit.8*
%{_unitdir}/stinit.service
%{_datadir}/bash-completion/
%changelog