ab5b707
%define         crda_version    1.1.1
9c707cb
%define         regdb_version   2009.11.25
a674751
a674751
Name:           crda
0549edf
Version:        %{crda_version}_%{regdb_version}
ab5b707
Release:        1%{?dist}
a674751
Summary:        Regulatory compliance daemon for 802.11 wireless networking
a674751
a674751
Group:          System Environment/Base
a674751
License:        BSD
a674751
URL:            http://www.linuxwireless.org/en/developers/Regulatory/CRDA
a674751
BuildRoot:      %{_tmppath}/%{name}-%{crda_version}-%{release}-root-%(%{__id_u} -n)
a674751
a647318
BuildRequires:  kernel-headers >= 2.6.27
a674751
BuildRequires:  libnl-devel >= 1.1
a674751
BuildRequires:  libgcrypt-devel
a674751
BuildRequires:  pkgconfig python m2crypto
bc192bb
BuildRequires:  gzip
a674751
91c1bca
Requires:       udev, iw
a674751
a674751
Source0:        http://wireless.kernel.org/download/crda/crda-%{crda_version}.tar.bz2
a674751
Source1:        http://wireless.kernel.org/download/wireless-regdb/wireless-regdb-%{regdb_version}.tar.bz2
af489f7
Source2:        setregdomain
bc192bb
Source3:        setregdomain.1
af489f7
af489f7
Patch0:         regulatory-rules-setregdomain.patch
a674751
bc192bb
a674751
%description
a674751
CRDA acts as the udev helper for communication between the kernel
a674751
and userspace for regulatory compliance. It relies on nl80211
a674751
for communication. CRDA is intended to be run only through udev
a674751
communication from the kernel.
a674751
bc192bb
a674751
%prep
a674751
%setup -q -c
a674751
%setup -q -T -D -a 1
a674751
af489f7
%patch0 -p1 -b .setregdomain
a674751
bc192bb
a674751
%build
a674751
a674751
# Use our own signing key to generate regulatory.bin
a674751
cd wireless-regdb-%{regdb_version}
a674751
a674751
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" maintainer-clean
f1e5a5d
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" REGDB_PRIVKEY=key.priv.pem REGDB_PUBKEY=key.pub.pem
a674751
a674751
# Build CRDA using the new key and regulatory.bin from above
a674751
cd ../crda-%{crda_version}
a674751
cp ../wireless-regdb-%{regdb_version}/key.pub.pem pubkeys
a674751
a674751
make %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" REG_BIN=../wireless-regdb-%{regdb_version}/regulatory.bin
a674751
a674751
a674751
%install
bc192bb
rm -rf %{buildroot}
a674751
a674751
cd crda-%{crda_version}
a674751
cp README README.crda
bc192bb
make install DESTDIR=%{buildroot} PREFIX='' MANDIR=%{_mandir}
a674751
a674751
cd ../wireless-regdb-%{regdb_version}
a674751
cp README README.wireless-regdb
bc192bb
make install DESTDIR=%{buildroot} PREFIX='' MANDIR=%{_mandir}
bc192bb
bc192bb
install -d %{buildroot}/sbin
bc192bb
install -pm 0755 %SOURCE2 %{buildroot}/sbin
bc192bb
bc192bb
cd ..
bc192bb
/usr/bin/gzip -c %SOURCE3 > %{SOURCE3}.gz
bc192bb
install -d %{buildroot}%{_mandir}/man1
bc192bb
install -pm 0644 %{SOURCE3}.gz %{buildroot}%{_mandir}/man1
a674751
a674751
a674751
%clean
bc192bb
rm -rf %{buildroot}
a674751
a674751
a674751
%files
a674751
%defattr(-,root,root,-)
a674751
/sbin/%{name}
a674751
/sbin/regdbdump
af489f7
/sbin/setregdomain
8eda8cc
/lib/udev/rules.d/85-regulatory.rules
6df8708
/lib/%{name}
bc192bb
%{_mandir}/man1/setregdomain.1.gz
0549edf
%{_mandir}/man5/regulatory.bin.5.gz
0549edf
%{_mandir}/man8/crda.8.gz
0549edf
%{_mandir}/man8/regdbdump.8.gz
a674751
%doc crda-%{crda_version}/LICENSE crda-%{crda_version}/README.crda
a674751
%doc wireless-regdb-%{regdb_version}/README.wireless-regdb
a674751
bc192bb
a674751
%changelog
ab5b707
* Tue Dec 21 2009 John W. Linville <linville@redhat.com> 1.1.1_2009.11.25-1
ab5b707
- Update for crda version 1.1.1
ab5b707
91c1bca
* Tue Dec 21 2009 John W. Linville <linville@redhat.com> 1.1.0_2009.11.25-5
91c1bca
- Remove unnecessary explicit Requries for libgcrypt and libnl -- oops!
91c1bca
a60c11f
* Tue Dec 21 2009 John W. Linville <linville@redhat.com> 1.1.0_2009.11.25-4
a60c11f
- Add libgcrypt and libnl to Requires
a60c11f
bc192bb
* Mon Dec 21 2009 John W. Linville <linville@redhat.com> 1.1.0_2009.11.25-3
bc192bb
- Add man page for setregdomain (from Andrew Hecox <ahecox@redhat.com>)
bc192bb
- Change $RPM_BUILD_ROOT to %{buildroot}
bc192bb
8477fc5
* Fri Dec 18 2009 John W. Linville <linville@redhat.com> 1.1.0_2009.11.25-2
bc192bb
- Specify path to iw in setregdomain
8477fc5
9c707cb
* Wed Dec  2 2009 John W. Linville <linville@redhat.com> 1.1.0_2009.11.25-1
9c707cb
- Update wireless-regdb to version 2009.11.25 
9c707cb
9c707cb
* Wed Nov 11 2009 John W. Linville <linville@redhat.com> 1.1.0_2009.11.10-1
247ce8b
- Update wireless-regdb to version 2009.11.10 
247ce8b
6df8708
* Wed Oct  1 2009 John W. Linville <linville@redhat.com> 1.1.0_2009.09.08-3
6df8708
- Move regdb to /lib/crda to facilitate /usr mounted over wireless network
6df8708
a647318
* Wed Sep  9 2009 John W. Linville <linville@redhat.com> 1.1.0_2009.09.08-2
a647318
- Use kernel-headers instead of kernel-devel
a647318
71a7106
* Wed Sep  9 2009 John W. Linville <linville@redhat.com> 1.1.0_2009.09.08-1
240a1c1
- Update wireless-regdb to version 2009.09.08 
240a1c1
- Start resetting release number with version updates
240a1c1
3dd082e
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0_2009.04.17-12
3dd082e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
3dd082e
18a72f9
* Wed May 13 2009 John W. Linville <linville@redhat.com> 1.1.0_2009.04.17-11
18a72f9
- Update crda version to version 1.1.0
18a72f9
- Update wireless-regdb to version 2009.04.17 
18a72f9
f1e5a5d
* Fri Apr 17 2009 John W. Linville <linville@redhat.com> 1.0.1_2009.04.16-10
f1e5a5d
- Update wireless-regdb version to pick-up recent updates and fixes (#496392)
f1e5a5d
f2d5862
* Tue Mar 31 2009 John W. Linville <linville@redhat.com> 1.0.1_2009.03.09-9
f2d5862
- Add Requires line for iw package (#492762)
f2d5862
- Update setregdomain script to correctly check if COUNTRY is set
f2d5862
af489f7
* Thu Mar 19 2009 John W. Linville <linville@redhat.com> 1.0.1_2009.03.09-8
af489f7
- Add setregdomain script to set regulatory domain based on timezone
af489f7
- Expand 85-regulatory.rules to invoke setregdomain script on device add
af489f7
64ae53c
* Tue Mar 10 2009 John W. Linville <linville@redhat.com> 1.0.1_2009.03.09-7
64ae53c
- Update wireless-regdb version to pick-up recent updates and fixes (#489560)
64ae53c
64f0433
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1_2009.01.30-6
64f0433
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
64f0433
58e4125
* Mon Feb 16 2009 John W. Linville <linville@redhat.com> 1.0.1_2009.01.30-5
58e4125
- Recognize regulatory.bin files signed with the upstream key (#484982)
58e4125
58e4125
* Tue Feb 03 2009 John W. Linville <linville@redhat.com> 1.0.1_2009.01.30-4
0549edf
- Change version to reflect new wireless-regdb upstream release practices
0549edf
- Update wireless-regdb version to pick-up recent updates and fixes (#483816)
0549edf
58e4125
* Tue Jan 27 2009 John W. Linville <linville@redhat.com> 1.0.1_2009_01_15-3
a0c189a
- Update for CRDA verion 1.0.1
a0c189a
- Account for lack of "v" in upstream release tarball naming
d8627df
- Add patch to let wireless-regdb install w/o being root
a0c189a
58e4125
* Thu Jan 22 2009 John W. Linville <linville@redhat.com> v0.9.5_2009_01_15-2
a674751
- Revamp based on package review comments
a674751
58e4125
* Tue Jan 20 2009 John W. Linville <linville@redhat.com> v0.9.5_2009_01_15-1
a674751
- Initial build