diff --git a/crda.spec b/crda.spec index a4652ae..2a110ec 100644 --- a/crda.spec +++ b/crda.spec @@ -16,7 +16,9 @@ BuildRequires: libnl-devel >= 1.1 BuildRequires: libgcrypt-devel BuildRequires: pkgconfig python m2crypto -Requires: udev, iw +Conflicts: filesystem < 3 +Requires: udev >= 176 +Requires: iw Source0: http://wireless.kernel.org/download/crda/crda-%{crda_version}.tar.bz2 Source1: http://wireless.kernel.org/download/wireless-regdb/wireless-regdb-%{regdb_version}.tar.bz2 @@ -46,14 +48,16 @@ communication from the kernel. # Use our own signing key to generate regulatory.bin cd wireless-regdb-%{regdb_version} -make %{?_smp_mflags} CFLAGS="%{optflags}" maintainer-clean -make %{?_smp_mflags} CFLAGS="%{optflags}" REGDB_PRIVKEY=key.priv.pem REGDB_PUBKEY=key.pub.pem +make %{?_smp_mflags} CFLAGS="%{optflags}" maintainer-clean +make %{?_smp_mflags} CFLAGS="%{optflags}" UDEV_RULE_DIR=%{_prefix}/lib/udev/rules.d \ + SBINDIR=%{_sbindir} REGDB_PRIVKEY=key.priv.pem REGDB_PUBKEY=key.pub.pem # Build CRDA using the new key and regulatory.bin from above cd ../crda-%{crda_version} cp ../wireless-regdb-%{regdb_version}/key.pub.pem pubkeys -make %{?_smp_mflags} CFLAGS="%{optflags}" REG_BIN=../wireless-regdb-%{regdb_version}/regulatory.bin +make %{?_smp_mflags} CFLAGS="%{optflags}" UDEV_RULE_DIR=%{_prefix}/lib/udev/rules.d \ + SBINDIR=%{_sbindir} REG_BIN=../wireless-regdb-%{regdb_version}/regulatory.bin %install @@ -61,13 +65,13 @@ rm -rf %{buildroot} cd crda-%{crda_version} cp README README.crda -make install DESTDIR=%{buildroot} PREFIX='' MANDIR=%{_mandir} +make install DESTDIR=%{buildroot} MANDIR=%{_mandir} SBINDIR=%{_sbindir} UDEV_RULE_DIR=%{_prefix}/lib/udev/rules.d cd ../wireless-regdb-%{regdb_version} cp README README.wireless-regdb -make install DESTDIR=%{buildroot} PREFIX='' MANDIR=%{_mandir} +make install DESTDIR=%{buildroot} MANDIR=%{_mandir} SBINDIR=%{_sbindir} UDEV_RULE_DIR=%{_prefix}/lib/udev/rules.d -install -D -pm 0755 %SOURCE2 %{buildroot}/sbin +install -D -pm 0755 %SOURCE2 %{buildroot}/%{_sbindir} install -D -pm 0644 %SOURCE3 %{buildroot}%{_mandir}/man1/setregdomain.1 @@ -77,12 +81,12 @@ rm -rf %{buildroot} %files %defattr(-,root,root,-) -/sbin/%{name} -/sbin/regdbdump -/sbin/setregdomain -/lib/udev/rules.d/85-regulatory.rules +%{_sbindir}/%{name} +%{_sbindir}/regdbdump +%{_sbindir}/setregdomain +%{_prefix}/lib/udev/rules.d/85-regulatory.rules # location of database is hardcoded to /lib/%{name} -/lib/%{name} +%{_prefix}/lib/%{name} %{_mandir}/man1/setregdomain.1* %{_mandir}/man5/regulatory.bin.5* %{_mandir}/man8/crda.8*