File qlogic-rules.spec of Package qlogic-rules
#
# spec file for package qlogic-rules
#
# Copyright (c) 2014,2019 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: qlogic-rules
Version: 0.0.1
Release: 0
Summary: Common udev rules to capture firmware dump (minidump)
License: GPL-2.0
Group: System/Diagnostics
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: udev
Source0: 99-qlogic.rules
Source1: qla2xxx.sh
Source2: qla4xxx.sh
Source3: qlcnic.sh
%description
Common udev rules to capture firmware dump (minidump) for
qlcnic/qla2xxx/qla4xxx drivers.
%prep
%build
%install
mkdir -p %{buildroot}%{_udevrulesdir}
mkdir -p %{buildroot}%{_libexecdir}/%{name}
install -m 0644 %{SOURCE0} %{buildroot}%{_udevrulesdir}/
sed -ri 's|@@QLRULES@@|%{_libexecdir}/%{name}|g' %{buildroot}%{_udevrulesdir}/*.rules
install -m 0755 %{SOURCE1} %{buildroot}%{_libexecdir}/%{name}/
install -m 0755 %{SOURCE2} %{buildroot}%{_libexecdir}/%{name}/
install -m 0755 %{SOURCE3} %{buildroot}%{_libexecdir}/%{name}/
%files
%defattr(-,root,root)
%{_udevrulesdir}/99-qlogic.rules
%dir %{_libexecdir}/%{name}
%{_libexecdir}/%{name}/qla2xxx.sh
%{_libexecdir}/%{name}/qla4xxx.sh
%{_libexecdir}/%{name}/qlcnic.sh
%changelog