biosdevname/biosdevname.spec
Thomas Renninger af3d44b446 - Take mainline patch to fix (bnc#869614)
Modified: biosdevname_udevrule_rename_all_network_devices.patch
- Remove %config from etc rule to please obs checker
- Remove mkinitrd setup script

OBS-URL: https://build.opensuse.org/package/show/Base:System/biosdevname?expand=0&rev=24
2014-04-22 13:43:55 +00:00

98 lines
3.0 KiB
RPMSpec

#
# spec file for package biosdevname
#
# Copyright (c) 2014 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 http://bugs.opensuse.org/
#
Name: biosdevname
Version: 0.5.0
Release: 0
Summary: Udev helper for naming devices per BIOS names
License: GPL-2.0
Group: System/Base
Url: http://linux.dell.com/files/biosdevname/
# 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
Source0: %{name}-%{version}.tar.bz2
Patch1: biosdevname_v0.5.0_to_git_c140ce659a204d67e4cc.patch
Patch2: ignore-broken-BIOSes
Patch3: whitelist-dell
Patch4: udev-rule-path.patch
Patch5: biosdevname_udevrule_rename_all_network_devices.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: automake
BuildRequires: pciutils-devel
BuildRequires: pkgconfig
BuildRequires: zlib-devel
# to figure out how to name/location of the rules file
BuildRequires: libudev-devel
BuildRequires: suse-module-tools
# for ownership of /lib/udev/rules.d
Requires: udev
%define _udevrulesdir %(pkg-config --variable=udevdir udev)/rules.d
%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).
You can enable/disable usage of biosdevname with boot option
"biosdevname=[0|1]"
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
# this is a udev rule, so it needs to live in / rather than /usr
./autogen.sh --no-configure
%configure --disable-rpath --prefix=/ --bindir=/bin --sbindir=/sbin
make %{?_smp_mflags}
%install
make install DESTDIR=$RPM_BUILD_ROOT
rm %{buildroot}/sbin/%{name}S || :
# remain disabled by default
perl -pi -e 's,^# GOTO,GOTO,g;' \
$RPM_BUILD_ROOT/%{_udevrulesdir}/*-biosdevname.rules
%files
%defattr(-,root,root,-)
%doc COPYING README
/sbin/%{name}
%{_udevrulesdir}/*%{name}.rules
%{_mandir}/man1/*
%post
/sbin/ldconfig
%{?regenerate_initrd_post}
%postun
/sbin/ldconfig
%{?regenerate_initrd_posttrans}
%changelog