John W. Linville a64e475
%define         crda_version    3.18
John W. Linville f172e1d
%define         regdb_version   2016.02.08
a674751
a674751
Name:           crda
0549edf
Version:        %{crda_version}_%{regdb_version}
John W. Linville f172e1d
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 39af35d
Source0:        http://www.kernel.org/pub/software/network/crda/crda-%{crda_version}.tar.xz
John W. Linville 39af35d
Source1:        http://www.kernel.org/pub/software/network/wireless-regdb/wireless-regdb-%{regdb_version}.tar.xz
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
John W. Linville 39af35d
# Do not call ldconfig in crda Makefile
John W. Linville a64e475
Patch1:         crda-remove-ldconfig.patch
ed8a070
# Apply ldflags to libreg
John W. Linville cef9c7f
Patch2:         crda-ldflags.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
John W. Linville 39af35d
%package devel
John W. Linville 39af35d
Summary:        Header files for use with libreg. 
John W. Linville 39af35d
Group:          Development/System
John W. Linville 39af35d
John W. Linville 39af35d
John W. Linville 39af35d
%description devel
John W. Linville 39af35d
Header files to make use of libreg for accessing regulatory info.
John W. Linville 39af35d
John W. Linville 39af35d
a674751
%prep
a674751
%setup -q -c
a674751
%setup -q -T -D -a 1
a674751
af489f7
%patch0 -p1 -b .setregdomain
a674751
John W. Linville 9f11556
cd crda-%{crda_version}
John W. Linville a64e475
%patch1 -p1 -b .ldconfig-remove
ed8a070
%patch2 -p2 -b .ldflags
bc192bb
a674751
%build
John W. Linville eee1c92
export CFLAGS="%{optflags} -Wno-error=unused-const-variable"
John W. Linville eee1c92
export LDFLAGS="%{?__global_ldflags}"
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 39af35d
make %{?_smp_mflags} SBINDIR=%{_sbindir}/ LIBDIR=%{_libdir}/ \
John W. Linville 39af35d
	REG_BIN=../wireless-regdb-%{regdb_version}/regulatory.bin
a674751
a674751
a674751
%install
bc192bb
rm -rf %{buildroot}
a674751
a674751
cd crda-%{crda_version}
John W. Linville dd468e2
cp LICENSE LICENSE.crda
a674751
cp README README.crda
John W. Linville 39af35d
make install DESTDIR=%{buildroot} MANDIR=%{_mandir}/ \
John W. Linville 39af35d
	SBINDIR=%{_sbindir}/ LIBDIR=%{_libdir}/
a674751
a674751
cd ../wireless-regdb-%{regdb_version}
John W. Linville dd468e2
cp LICENSE LICENSE.wireless-regdb
a674751
cp README README.wireless-regdb
John W. Linville 39af35d
make install DESTDIR=%{buildroot} MANDIR=%{_mandir}
bc192bb
John W. Linville 39af35d
install -D -pm 0755 %SOURCE2 %{buildroot}%{_sbindir}
1f92708
install -D -pm 0644 %SOURCE3 %{buildroot}%{_mandir}/man1/setregdomain.1
a674751
a674751
John W. Linville 39af35d
%post -p /sbin/ldconfig
John W. Linville 39af35d
%postun -p /sbin/ldconfig
John W. Linville 39af35d
John W. Linville 39af35d
a674751
%clean
bc192bb
rm -rf %{buildroot}
a674751
a674751
a674751
%files
a674751
%defattr(-,root,root,-)
John W. Linville 39af35d
%{_sbindir}/%{name}
John W. Linville 39af35d
%{_sbindir}/regdbdump
John W. Linville 39af35d
%{_sbindir}/setregdomain
John W. Linville 39af35d
%{_libdir}/libreg.so
8eda8cc
/lib/udev/rules.d/85-regulatory.rules
John W. Linville 39af35d
# location of database is hardcoded to /usr/lib/%{name}
John W. Linville 39af35d
/usr/lib/%{name}
1f92708
%{_mandir}/man1/setregdomain.1*
1f92708
%{_mandir}/man5/regulatory.bin.5*
1f92708
%{_mandir}/man8/crda.8*
1f92708
%{_mandir}/man8/regdbdump.8*
John W. Linville dd468e2
%license crda-%{crda_version}/LICENSE.crda
John W. Linville dd468e2
%license wireless-regdb-%{regdb_version}/LICENSE.wireless-regdb
John W. Linville dd468e2
%doc crda-%{crda_version}/README.crda
a674751
%doc wireless-regdb-%{regdb_version}/README.wireless-regdb
a674751
bc192bb
John W. Linville 39af35d
%files devel
John W. Linville 39af35d
%{_includedir}/reglib/nl80211.h
John W. Linville 39af35d
%{_includedir}/reglib/regdb.h
John W. Linville 39af35d
%{_includedir}/reglib/reglib.h
John W. Linville 39af35d
John W. Linville 39af35d
John W. Linville 39af35d
a674751
%changelog
John W. Linville d478100
* Tue Feb 09 2016 John W. Linville <linville@redhat.com> - 3.18_2016.02.08-1
John W. Linville f172e1d
- Update wireless-regdb to version 2016.02.08
John W. Linville eee1c92
- Do not treat unused-const-variable warnings as errors
John W. Linville f172e1d
be6f8f7
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.18_2015.10.22-2
be6f8f7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
be6f8f7
John W. Linville cef9c7f
* Tue Nov  3 2015 John W. Linville <linville@redhat.com> - 3.18_2015.10.22-1
John W. Linville cef9c7f
- Update wireless-regdb to version 2015.10.22
John W. Linville cef9c7f
- Fix some whitespace damage in spec file
John W. Linville cef9c7f
ed8a070
* Fri Aug 14 2015 Adam Jackson <ajax@redhat.com> 3.18_2015.04.06-3
ed8a070
- Pass rpm's ldflags through to fix hardening
ed8a070
c387aa3
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.18_2015.04.06-2
c387aa3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
c387aa3
John W. Linville bad53e5
* Tue Apr 21 2015 John W. Linville <linville@redhat.com> - 3.18_2015.04.06-1
John W. Linville bad53e5
- Update wireless-regdb to version 2015.04.06
John W. Linville bad53e5
John W. Linville 5a3f4c7
* Fri Mar 20 2015 John W. Linville <linville@redhat.com> - 3.18_2015.03.13-1
John W. Linville 5a3f4c7
- Update wireless-regdb to version 2015.03.13
John W. Linville 5a3f4c7
John W. Linville dd468e2
* Wed Feb  4 2015 John W. Linville <linville@redhat.com> - 3.18_2015.01.30-3
John W. Linville dd468e2
- Use %license instead of %doc for file containing license information
John W. Linville dd468e2
- Add %license entry for wireless-regdb
John W. Linville dd468e2
- Correct NVR info at end of previous changelog entry
John W. Linville dd468e2
John W. Linville dd468e2
* Mon Feb  2 2015 John W. Linville <linville@redhat.com> - 3.18_2015.01.30-2
John W. Linville a64e475
- Update crda to version 3.18
John W. Linville a64e475
- Update wireless-regdb to version 2015.01.30
John W. Linville a64e475
- Drop patch to add DESTDIR in install rules for libreg in crda Makefile
John W. Linville a64e475
John W. Linville 452d916
* Tue Nov 25 2014 John W. Linville <linville@redhat.com> - 3.13_2014.11.18-1
John W. Linville 452d916
- Update wireless-regdb to version 2014.11.18
John W. Linville 452d916
John W. Linville c12c901
* Mon Oct 27 2014 John W. Linville <linville@redhat.com> - 3.13_2014.10.07-1
John W. Linville c12c901
- Update wireless-regdb to version 2014.10.07
John W. Linville c12c901
- Update copyright dates in setregdomain
John W. Linville c12c901
342bd54
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.13_2014.06.13-2
342bd54
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
342bd54
John W. Linville 0436578
* Fri Jun 13 2014 John W. Linville <linville@redhat.com> - 3.13_2014.06.13-1
John W. Linville 0436578
- Update wireless-regdb to version 2014.06.13
John W. Linville 0436578
John W. Linville 4b91122
* Fri Jun  6 2014 John W. Linville <linville@redhat.com> - 3.13_2014.06.02-1
John W. Linville 4b91122
- Add logger commands to setregdomain to make it more communicative
John W. Linville 4b91122
- Update wireless-regdb to version 2014.06.02
John W. Linville 4b91122
John W. Linville f88f26e
* Fri Feb 28 2014 John W. Linville <linville@redhat.com> - 3.13_2013.11.27-2
John W. Linville f88f26e
- Accomodate relative pathnames in the symlink for /etc/localtime
John W. Linville f88f26e
John W. Linville 39af35d
* Fri Feb 14 2014 John W. Linville <linville@redhat.com> - 3.13_2013.11.27-1
John W. Linville 39af35d
- Update crda to version 3.13
John W. Linville 39af35d
- Remove obsolete patch for regdbdump to display DFS region
John W. Linville 39af35d
- Add patch to use DESTDIR rule for crda libreg installation
John W. Linville 39af35d
- Add patch to avoid calling ldconfig from crda Makefile
John W. Linville 39af35d
- Remove PREFIX='' lines from make commands
John W. Linville 39af35d
- Use SBINDIR and LIBDIR definitions in make commands
John W. Linville 39af35d
John W. Linville 61380c8
* Thu Jan 23 2014 John W. Linville <linville@redhat.com> - 1.1.3_2013.11.27-3
John W. Linville 61380c8
- Correct a typo in setregdomain
John W. Linville 61380c8
John W. Linville 9f11556
* Fri Jan 17 2014 John W. Linville <linville@redhat.com> - 1.1.3_2013.11.27-2
John W. Linville 9f11556
- Add patch for regdbdump to display DFS region
John W. Linville 9f11556
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