From 4b0556298192201a93d6c41774c23195aeed910d232cc600c52a3ad24da74674 Mon Sep 17 00:00:00 2001 From: Kristyna Streitova Date: Thu, 16 Mar 2017 11:41:03 +0000 Subject: [PATCH] Accepting request 479965 from home:pluskalm:branches:Base:System - Cleanup with spec-cleaner - Refresh udev rules via scriplets OBS-URL: https://build.opensuse.org/request/show/479965 OBS-URL: https://build.opensuse.org/package/show/Base:System/mt-st?expand=0&rev=6 --- mt-st.changes | 6 ++++++ mt-st.spec | 28 ++++++++++++++++++---------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/mt-st.changes b/mt-st.changes index c82e854..163d5ed 100644 --- a/mt-st.changes +++ b/mt-st.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Mar 16 11:29:23 UTC 2017 - mpluskal@suse.com + +- Cleanup with spec-cleaner +- Refresh udev rules via scriplets + ------------------------------------------------------------------- Sun Aug 7 16:25:51 UTC 2016 - olaf@aepfle.de diff --git a/mt-st.spec b/mt-st.spec index 0a19a9c..c5758be 100644 --- a/mt-st.spec +++ b/mt-st.spec @@ -1,7 +1,7 @@ # # spec file for package mt-st # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -28,9 +28,11 @@ Source1: https://github.com/iustin/mt-st/releases/download/%{name}-%{vers Source2: stinit.def Source3: 61-storage-tape-init.rules Source4: %{name}.keyring -BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: pkgconfig BuildRequires: pkgconfig(udev) Requires: udev +Requires(post): udev +Requires(postun): udev Provides: mt_st = %{version}-%{release} Obsoletes: mt_st < %{version}-%{release} @@ -42,17 +44,23 @@ may not work with all drivers). The stinit program allows the setting of some SCSI tape parameters. %prep -%setup -q -n %{name}-%{version} +%setup -q %build -make %{?_smp_mflags} CFLAGS="%{optflags} -pipe" DEFTAPE=/dev/nst0 +make %{?_smp_mflags} CFLAGS="%{optflags} -pipe" DEFTAPE=/dev/nst0 %install -%makeinstall EXEC_PREFIX=/usr -install -d %{buildroot}%{_sysconfdir} -install %{SOURCE2} %{buildroot}%{_sysconfdir} -install -d %{buildroot}%{_udevrulesdir} -install -m 0644 %{SOURCE3} %{buildroot}%{_udevrulesdir} +%make_install EXEC_PREFIX=%{_prefix} +install -D -p -m 0644 %{SOURCE2} \ + %{buildroot}%{_sysconfdir}/stinit.def +install -D -p -m 0644 %{SOURCE3} \ + %{buildroot}%{_udevrulesdir}/61-storage-tape-init.rules + +%post +%udev_rules_update + +%postun +%udev_rules_update %files %defattr(-,root,root) @@ -61,7 +69,7 @@ install -m 0644 %{SOURCE3} %{buildroot}%{_udevrulesdir} %{_sbindir}/stinit %{_mandir}/man1/mt.1%{ext_man} %{_mandir}/man8/stinit.8%{ext_man} -%config(noreplace) %attr(644,root,root) %{_sysconfdir}/stinit.def +%config(noreplace) %{_sysconfdir}/stinit.def %{_udevrulesdir}/61-storage-tape-init.rules %changelog