mt-st/mt-st.spec
2022-01-25 16:34:56 +08:00

69 lines
1.6 KiB
RPMSpec

Name: mt-st
Version: 1.4
Release: 1
Summary: Tool to manage tape drives
License: GPL+
URL: ftp://ftp.ibiblio.org/pub/linux/system/backup
Source0: ftp://metalab.unc.edu/pub/Linux/system/backup/mt-st-%{version}.tar.gz
Source1: stinit.service
BuildRequires: gcc systemd make bash-completion
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%description
The mt-st package contains two programs: mt and stinit. Mt is basically a "standard" mt with
additional commands to send the ioctls specific to the Linux SCSI tape driver. Stinit is a program
to initialize the tape drive characteristics.
%package_help
%prep
%autosetup
%build
make CFLAGS="%{build_cflags} %{build_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
%defattr(-,root,root)
%license COPYING
%{_bindir}/mt
%{_sbindir}/stinit
%{_unitdir}/stinit.service
%{_datadir}/bash-completion/
%files help
%defattr(-,root,root)
%doc README.md stinit.def.examples
%{_mandir}/man[18]/*
%changelog
* Tue Jan 18 2022 SimpleUpdate Robot <tc@openeuler.org> - 1.4-1
- Upgrade to version 1.4
* Wed Dec 4 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.1-25
- Package init