This repository has been archived by the owner on Oct 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
crda.spec
69 lines (60 loc) · 1.82 KB
/
crda.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
Summary: Central Regulatory Domain Agent
Name: crda
Version: 3.18
Release: 1
License: ISC
Group: Networking/Daemons
Source0: https://kernel.org/pub/software/network/crda/%{name}-%{version}.tar.xz
# Source0-md5: 0431fef3067bf503dfb464069f06163a
Patch0: %{name}-regdb.patch
Patch1: 0001-crda-Fix-the-linking-order-to-avoid-compilation-erro.patch
Patch2: 0002-crda-Add-DESTDIR-support-in-install-libreg-rules-in-.patch
Patch3: 0001-Makefile-Link-libreg.so-against-the-crypto-library.patch
Patch4: 0001-Makefile-Don-t-run-ldconfig.patch
URL: http://wireless.kernel.org/en/developers/Regulatory/CRDA
BuildRequires: libgcrypt-devel
BuildRequires: libnl-devel
BuildRequires: pkg-config
BuildRequires: python-M2Crypto
BuildRequires: wireless-regdb
Requires: udev
Requires: wireless-regdb
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
CRDA acts as the udev helper for communication between the kernel and
userspace for regulatory compliance. It relies on nl80211 for
communication. CRDA is intended to be run only through udev
communication from the kernel. The user should never have to run it
manually except if debugging udev issues.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%build
CFLAGS="%{rpmcflags} %{rpmcppflags}"
%{__make} \
CC="%{__cc}" \
REG_BIN=%{_datadir}/crda/regulatory.bin \
V=1
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT \
LIBDIR=%{_libdir}/ \
SBINDIR=%{_sbindir}/ \
UDEV_RULE_DIR=%{_prefix}/lib/udev/rules.d/
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /usr/sbin/ldconfig
%postun -p /usr/sbin/ldconfig
%files
%defattr(644,root,root,755)
%doc README
%attr(755,root,root) %{_sbindir}/crda
%attr(755,root,root) %{_sbindir}/regdbdump
%attr(755,root,root) %{_libdir}/libreg.so
%{_mandir}/man8/*
%{_prefix}/lib/udev/rules.d/85-regulatory.rules