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