diff --git a/hdparm.changes b/hdparm.changes index 5b49836..5b27962 100644 --- a/hdparm.changes +++ b/hdparm.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Nov 27 18:27:16 UTC 2012 - dimstar@opensuse.org + +- Add pkgconfig(udev) BuildRequires: needed in order to dynamically + extract the right folder for udev rules and scripts. +- Copy the udev rules to %{_udevdir}, identified based on udev.pc. +- Add pkgconfig BuildRequires: needed, as we otherwise end up not + having pkg-config in the build root, which we rely on to read + the .pc file. + ------------------------------------------------------------------- Fri Nov 16 09:19:23 UTC 2012 - puzel@suse.com diff --git a/hdparm.spec b/hdparm.spec index d341604..19aa351 100644 --- a/hdparm.spec +++ b/hdparm.spec @@ -31,8 +31,11 @@ Source3: udev.idedma.sh Patch1: hdparm-nostrip.patch Patch2: hdparm-wiper-warn.patch Patch3: hdparm-leak-fix.patch +BuildRequires: pkgconfig +BuildRequires: pkgconfig(udev) Url: http://sourceforge.net/projects/hdparm/ BuildRoot: %{_tmppath}/%{name}-%{version}-build +%define _udevdir %(pkg-config --variable udevdir udev) %description A shell utility to access and tune the ioctl features of the Linux IDE @@ -53,11 +56,11 @@ mkdir -p $RPM_BUILD_ROOT/usr/share/man/man8 install -d $RPM_BUILD_ROOT/%{_sbindir} %make_install binprefix=%{_prefix} mv contrib/README contrib/README.contrib -install -d $RPM_BUILD_ROOT/lib/udev/rules.d -install -m 644 %{S:1} $RPM_BUILD_ROOT/lib/udev/rules.d +install -d $RPM_BUILD_ROOT%{_udevdir}/rules.d +install -m 644 %{S:1} $RPM_BUILD_ROOT%{_udevdir}/rules.d install -d $RPM_BUILD_ROOT/var/adm/fillup-templates install -m 644 %{S:2} $RPM_BUILD_ROOT/var/adm/fillup-templates -install -m 755 %{S:3} $RPM_BUILD_ROOT/lib/udev/idedma.sh +install -m 755 %{S:3} $RPM_BUILD_ROOT/%{_udevdir}/idedma.sh install -d $RPM_BUILD_ROOT/usr/lib/hdparm install -m 755 contrib/idectl $RPM_BUILD_ROOT/usr/lib/hdparm install -m 755 contrib/ultrabayd $RPM_BUILD_ROOT/usr/lib/hdparm @@ -107,10 +110,10 @@ fi #EndUserMerge %{_sbindir}/hdparm %{_sbindir}/wiper.sh -%dir /lib/udev -/lib/udev/idedma.sh -%dir /lib/udev/rules.d -/lib/udev/rules.d/56-idedma.rules +%dir %{_udevdir} +%{_udevdir}/idedma.sh +%dir %{_udevdir}/rules.d +%{_udevdir}/rules.d/56-idedma.rules /usr/lib/hdparm /var/adm/fillup-templates/sysconfig.ide