2008-01-15 04:27:21 +01:00
|
|
|
#
|
2011-05-02 14:41:09 +02:00
|
|
|
# spec file for package biosdevname
|
2008-01-15 04:27:21 +01:00
|
|
|
#
|
2016-01-22 16:14:21 +01:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2008-01-15 04:27:21 +01:00
|
|
|
#
|
2008-08-08 11:48:12 +02:00
|
|
|
# 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.
|
|
|
|
|
2008-01-15 04:27:21 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2015-04-09 10:04:58 +02:00
|
|
|
%define _udevrulesdir %(pkg-config --variable=udevdir udev)/rules.d
|
2008-01-15 04:27:21 +01:00
|
|
|
Name: biosdevname
|
2016-01-22 16:14:21 +01:00
|
|
|
Version: 0.7.1
|
2011-11-30 14:09:10 +01:00
|
|
|
Release: 0
|
2008-01-15 04:27:21 +01:00
|
|
|
Summary: Udev helper for naming devices per BIOS names
|
2011-11-30 14:09:10 +01:00
|
|
|
License: GPL-2.0
|
2012-05-31 10:49:56 +02:00
|
|
|
Group: System/Base
|
2008-01-15 04:27:21 +01:00
|
|
|
Url: http://linux.dell.com/files/biosdevname/
|
2015-04-09 10:04:58 +02:00
|
|
|
Source0: http://linux.dell.com/files/biosdevname/biosdevname-%{version}/%{name}-%{version}.tar.gz
|
2015-01-22 15:13:09 +01:00
|
|
|
Patch1: ignore-broken-BIOSes
|
|
|
|
Patch2: whitelist-dell
|
|
|
|
Patch3: udev-rule-path.patch
|
2015-02-21 23:50:57 +01:00
|
|
|
Patch4: biosdevname-pic.patch
|
2014-01-27 15:49:10 +01:00
|
|
|
BuildRequires: automake
|
2015-04-09 10:04:58 +02:00
|
|
|
# to figure out how to name/location of the rules file
|
|
|
|
BuildRequires: libudev-devel
|
2011-12-21 10:20:41 +01:00
|
|
|
BuildRequires: pciutils-devel
|
2015-06-08 07:30:50 +02:00
|
|
|
BuildRequires: pkg-config
|
2015-01-22 15:13:09 +01:00
|
|
|
BuildRequires: sed
|
2014-04-22 15:43:55 +02:00
|
|
|
BuildRequires: suse-module-tools
|
2015-04-09 10:04:58 +02:00
|
|
|
BuildRequires: zlib-devel
|
2015-07-13 09:08:59 +02:00
|
|
|
BuildRequires: pkgconfig(udev)
|
2015-12-15 17:33:10 +01:00
|
|
|
Requires(post): coreutils
|
|
|
|
Requires(postun): coreutils
|
2014-06-13 13:17:54 +02:00
|
|
|
# for ownership of /usr/lib/udev/rules.d
|
2008-01-15 04:27:21 +01:00
|
|
|
Requires: udev
|
2014-05-08 11:12:01 +02:00
|
|
|
Supplements: modalias(dmi:*svnDell*)
|
2015-04-09 10:04:58 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
# SMBIOS and PCI IRQ Routing Tables only exist on these arches. It's
|
|
|
|
# also likely that other arches don't expect the PCI bus to be sorted
|
|
|
|
# breadth-first, or of so, there haven't been any comments about that
|
|
|
|
# on LKML.
|
|
|
|
ExclusiveArch: %ix86 x86_64
|
2013-04-22 16:11:36 +02:00
|
|
|
|
2008-01-15 04:27:21 +01:00
|
|
|
%description
|
|
|
|
biosdevname in its simplest form takes an kernel name name as an
|
|
|
|
argument, and returns the BIOS-given name it "should" be. This is
|
|
|
|
necessary on systems where the BIOS name for a given device (e.g. the
|
|
|
|
label on the chassis is "Gb1") doesn't map directly and obviously to
|
|
|
|
the kernel name (e.g. eth0).
|
|
|
|
|
2011-12-21 10:20:41 +01:00
|
|
|
You can enable/disable usage of biosdevname with boot option
|
|
|
|
"biosdevname=[0|1]"
|
|
|
|
|
2008-01-15 04:27:21 +01:00
|
|
|
%prep
|
|
|
|
%setup -q
|
2014-01-27 15:49:10 +01:00
|
|
|
%patch1 -p1
|
2011-12-21 10:20:41 +01:00
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
2015-02-21 23:50:57 +01:00
|
|
|
%patch4 -p1
|
2008-01-15 04:27:21 +01:00
|
|
|
|
|
|
|
%build
|
2015-01-22 15:13:09 +01:00
|
|
|
sed -i -e 's#@@BIOSDEVNAME_RULEDEST@@#'%{_udevrulesdir}'/71-biosdevname.rules#' configure.ac
|
2015-04-09 10:04:58 +02:00
|
|
|
autoreconf -fi
|
|
|
|
%configure \
|
|
|
|
--disable-rpath \
|
|
|
|
--prefix=/ \
|
|
|
|
--bindir=/bin \
|
|
|
|
--sbindir=/sbin
|
2008-01-15 04:27:21 +01:00
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
2015-04-09 10:04:58 +02:00
|
|
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
2008-01-15 04:27:21 +01:00
|
|
|
rm %{buildroot}/sbin/%{name}S || :
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc COPYING README
|
|
|
|
/sbin/%{name}
|
2014-04-22 15:43:55 +02:00
|
|
|
%{_udevrulesdir}/*%{name}.rules
|
2015-01-22 15:13:09 +01:00
|
|
|
|
2008-01-15 04:27:21 +01:00
|
|
|
%{_mandir}/man1/*
|
|
|
|
|
2008-08-08 11:48:12 +02:00
|
|
|
%post
|
|
|
|
/sbin/ldconfig
|
2014-04-10 19:16:05 +02:00
|
|
|
%{?regenerate_initrd_post}
|
2008-01-15 04:27:21 +01:00
|
|
|
|
2015-12-15 17:33:10 +01:00
|
|
|
%postun
|
|
|
|
/sbin/ldconfig
|
|
|
|
%{?regenerate_initrd_post}
|
2014-06-20 14:02:19 +02:00
|
|
|
|
|
|
|
%posttrans
|
2014-04-10 19:16:05 +02:00
|
|
|
%{?regenerate_initrd_posttrans}
|
2008-01-15 04:27:21 +01:00
|
|
|
|
|
|
|
%changelog
|