John W. Linville 49c27af
%define         crda_version    1.1.3
John W. Linville e4fb046
%define         regdb_version   2013.11.27
a674751
a674751
Name:           crda
0549edf
Version:        %{crda_version}_%{regdb_version}
John W. Linville e4fb046
Release:        1%{?dist}
a674751
Summary:        Regulatory compliance daemon for 802.11 wireless networking
a674751
a674751
Group:          System Environment/Base
72aa9bd
License:        ISC
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
John W. Linville 6c7e338
BuildRequires:  libnl3-devel
a674751
BuildRequires:  libgcrypt-devel
a674751
BuildRequires:  pkgconfig python m2crypto
John W. Linville 4aa0aa7
BuildRequires:  openssl
a674751
91c1bca
Requires:       udev, iw
John W. Linville ae7b364
Requires:       systemd >= 190
a674751
John W. Linville 6c7e338
Source0:        http://www.kernel.org/pub/software/network/crda/crda-%{crda_version}.tar.bz2
John W. Linville 6c7e338
Source1:        http://www.kernel.org/pub/software/network/wireless-regdb/wireless-regdb-%{regdb_version}.tar.bz2
af489f7
Source2:        setregdomain
bc192bb
Source3:        setregdomain.1
af489f7
72aa9bd
# Add udev rule to call setregdomain on wireless device add
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
John W. Linville 6c7e338
export CFLAGS="%{optflags}"
a674751
a674751
# Use our own signing key to generate regulatory.bin
a674751
cd wireless-regdb-%{regdb_version}
a674751
John W. Linville 6c7e338
make %{?_smp_mflags} maintainer-clean
John W. Linville 6c7e338
make %{?_smp_mflags} 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
John W. Linville 6c7e338
make %{?_smp_mflags} 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
1f92708
install -D -pm 0755 %SOURCE2 %{buildroot}/sbin
1f92708
install -D -pm 0644 %SOURCE3 %{buildroot}%{_mandir}/man1/setregdomain.1
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
0ba28fa
# location of database is hardcoded to /lib/%{name}
6df8708
/lib/%{name}
1f92708
%{_mandir}/man1/setregdomain.1*
1f92708
%{_mandir}/man5/regulatory.bin.5*
1f92708
%{_mandir}/man8/crda.8*
1f92708
%{_mandir}/man8/regdbdump.8*
a674751
%doc crda-%{crda_version}/LICENSE crda-%{crda_version}/README.crda
a674751
%doc wireless-regdb-%{regdb_version}/README.wireless-regdb
a674751
bc192bb
a674751
%changelog
John W. Linville e4fb046
* Mon Dec  2 2013 John W. Linville <linville@redhat.com> - 1.1.3_2013.11.27-1
John W. Linville e4fb046
- Update wireless-regdb to version 2013.11.27
John W. Linville e4fb046
John W. Linville 6c7e338
* Fri Nov 22 2013 Xose Vazquez Perez <xose.vazquez@gmail.com> - 1.1.3_2013.02.13-5
John W. Linville 6c7e338
- fixed wrong dates
John W. Linville 6c7e338
- link with libnl3
John W. Linville 6c7e338
- new home for sources
John W. Linville 6c7e338
802a205
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.3_2013.02.13-4
802a205
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
802a205
John W. Linville ffdf171
* Wed Apr  3 2013 John W. Linville <linville@redhat.com> - 1.1.3_2013.02.13-3
John W. Linville ffdf171
- setregdomain: remove sed and awk calls
John W. Linville ffdf171
- setregdomain: reimplement COUNTRY assignment with shell function
John W. Linville ffdf171
John W. Linville 66745cc
* Fri Mar  1 2013 John W. Linville <linville@redhat.com> - 1.1.3_2013.02.13-2
John W. Linville 66745cc
- Bump release to prevent upgrade issues from F17...oops!
John W. Linville 66745cc
John W. Linville c61d525
* Wed Feb 13 2013 John W. Linville <linville@redhat.com> - 1.1.3_2013.02.13-1
John W. Linville c61d525
- Update wireless-regdb to version 2013.02.13
John W. Linville c61d525
John W. Linville 5f3740d
* Tue Feb 12 2013 John W. Linville <linville@redhat.com> - 1.1.3_2013.02.12-1
John W. Linville 5f3740d
- Update wireless-regdb to version 2013.02.12
John W. Linville 5f3740d
John W. Linville 6c7e338
* Fri Jan 25 2013 John W. Linville <linville@redhat.com> - 1.1.3_2013.01.11-2
John W. Linville ae7b364
- Update setregdomain to determine timezone info from /etc/timezone
John W. Linville ae7b364
John W. Linville 6c7e338
* Fri Jan 25 2013 John W. Linville <linville@redhat.com> - 1.1.3_2013.01.11-1
John W. Linville 49c27af
- Update crda to version 1.1.3
John W. Linville 49c27af
- Update wireless-regdb to version 2013.01.11
John W. Linville 49c27af
John W. Linville 4aa0aa7
* Fri Aug 10 2012 John W. Linville <linville@redhat.com>
John W. Linville 4aa0aa7
- Add BuildRequires for openssl
John W. Linville 4aa0aa7
4a95cae
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.2_2011.04.28-3
4a95cae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
4a95cae
3f40ec3
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.2_2011.04.28-2
3f40ec3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
3f40ec3
John W. Linville c6c3911
* Thu Aug 11 2011 John W. Linville <linville@redhat.com> 1.1.2_2011.04.28-1
John W. Linville c6c3911
- Update crda to version 1.1.2
John W. Linville c6c3911
- Update wireless-regdb to version 2011.04.28 
John W. Linville c6c3911
- Fix mis-numbered version comment in changelog for Nov 23 2010
John W. Linville c6c3911
f98e8ab
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1_2010.11.22-2
f98e8ab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
f98e8ab
John W. Linville c6c3911
* Tue Nov 23 2010 John W. Linville <linville@redhat.com> 1.1.1_2010.11.22-1
John W. Linville 61774d3
- Update wireless-regdb to version 2010.11.22 
John W. Linville 61774d3
72aa9bd
* Thu Feb 25 2010 John W. Linville <linville@redhat.com> 1.1.1_2009.11.25-3
72aa9bd
- Correct license tag from BSD to ISC
72aa9bd
- Comment purpose of regulatory-rules-setregdomain.patch
72aa9bd
- Add copyright and license statement to setregdomain
0ba28fa
- Add comment for why /lib is hardcoded in files section
ab9fc19
- Reformat Dec 21 2009 changelog entry so rpmlint stops complaining
72aa9bd
bc43874
* Tue Jan 26 2010 John W. Linville <linville@redhat.com> 1.1.1_2009.11.25-2
1f92708
- Change RPM_OPT_FLAGS to optflags
1f92708
- Leave man page compression to rpmbuild
1f92708
- Correct date in previous changelog entry
1f92708
01abdae
* Tue Jan 26 2010 John W. Linville <linville@redhat.com> 1.1.1_2009.11.25-1
ab5b707
- Update for crda version 1.1.1
ab5b707
John W. Linville 6c7e338
* Mon 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
John W. Linville 6c7e338
* Mon 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>)
ab9fc19
- 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
John W. Linville 6c7e338
* Thu 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