2009-02-10 13:49:56 +01:00
|
|
|
#
|
2011-09-16 14:48:35 +02:00
|
|
|
# spec file for package crda
|
2009-02-10 13:49:56 +01:00
|
|
|
#
|
2023-01-17 11:40:53 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2009-02-10 13:49:56 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2020-03-12 13:07:53 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2009-02-10 13:49:56 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2013-11-26 17:14:14 +01:00
|
|
|
%{!?_udevrulesdir: %global _udevrulesdir %(pkg-config --variable=udevdir udev)/rules.d }
|
2020-03-12 13:07:53 +01:00
|
|
|
%define skip_python2 1
|
2009-02-10 13:49:56 +01:00
|
|
|
|
|
|
|
Name: crda
|
|
|
|
Summary: 802.11 central regulatory domain agent
|
2015-07-14 16:33:44 +02:00
|
|
|
License: SUSE-Copyleft-Next-0.3.0
|
2009-02-10 13:49:56 +01:00
|
|
|
Group: Hardware/Wifi
|
2020-12-01 15:57:24 +01:00
|
|
|
URL: https://wireless.wiki.kernel.org/en/developers/Regulatory/CRDA
|
2020-08-17 18:01:31 +02:00
|
|
|
Version: 4.14
|
2012-02-07 11:00:23 +01:00
|
|
|
Release: 0
|
2020-12-01 15:57:24 +01:00
|
|
|
Source0: https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/crda.git/snapshot/crda-%{version}.tar.gz
|
2020-12-01 12:54:18 +01:00
|
|
|
Source1: crda.default
|
2009-02-10 13:49:56 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2012-02-07 11:00:23 +01:00
|
|
|
BuildRequires: libgcrypt-devel
|
|
|
|
BuildRequires: pkg-config
|
2020-03-12 13:07:53 +01:00
|
|
|
BuildRequires: python3
|
|
|
|
BuildRequires: python3-pycrypto
|
2012-02-07 11:00:23 +01:00
|
|
|
BuildRequires: wireless-regdb
|
2013-11-26 17:14:14 +01:00
|
|
|
BuildRequires: pkgconfig(libnl-3.0)
|
|
|
|
BuildRequires: pkgconfig(udev)
|
2009-03-02 15:46:14 +01:00
|
|
|
Requires: wireless-regdb
|
|
|
|
Supplements: kernel >= 2.6.29
|
2016-05-25 14:27:33 +02:00
|
|
|
# PATCH-FIX-OPENSUSE gcc6-fix-errors.patch -- Fix errors seen by GCC6.
|
|
|
|
Patch0: gcc6-fix-errors.patch
|
2020-08-17 18:01:31 +02:00
|
|
|
# PATCH-FIX-OPENSUSE python2 is gone, port to python3
|
2020-03-12 13:07:53 +01:00
|
|
|
Patch1: crda-python3.patch
|
2020-08-17 18:01:31 +02:00
|
|
|
# PATCH-FIX-UPSTREAM crda-67f1e6ddbdfade357e234c9d58a30fe0a283fe60.patch
|
|
|
|
Patch2: crda-67f1e6ddbdfade357e234c9d58a30fe0a283fe60.patch
|
|
|
|
# PATCH-FIX-UPSTREAM crda-f4ef2531698fb9ba006e8b31a223b3269be8bc7c.patch
|
|
|
|
Patch3: crda-f4ef2531698fb9ba006e8b31a223b3269be8bc7c.patch
|
2020-12-01 12:54:18 +01:00
|
|
|
# PATCH-FIX-SUSE crda-default.patch
|
|
|
|
Patch4: crda-default.patch
|
2009-02-10 13:49:56 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
The crda binary provides access to the wireless-regdb to the kernel
|
|
|
|
through udev.
|
|
|
|
|
|
|
|
%prep
|
2009-10-12 16:24:24 +02:00
|
|
|
%setup -q
|
2016-05-25 14:27:33 +02:00
|
|
|
%patch0 -p1
|
2020-03-12 13:07:53 +01:00
|
|
|
%patch1 -p1
|
2020-08-17 18:01:31 +02:00
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
2020-12-01 12:54:18 +01:00
|
|
|
%patch4 -p1
|
2015-06-29 10:06:50 +02:00
|
|
|
# make install calls 'ldconfig' and fails if it cannot run it...
|
|
|
|
ln -s /bin/true ldconfig
|
2009-02-10 13:49:56 +01:00
|
|
|
|
|
|
|
%build
|
2015-06-29 10:06:50 +02:00
|
|
|
export CFLAGS="%{optflags}"
|
|
|
|
make all_noverify %{?_smp_mflags} V=1
|
2009-02-10 13:49:56 +01:00
|
|
|
|
|
|
|
%install
|
2015-06-29 10:06:50 +02:00
|
|
|
# to find ldconfig...
|
|
|
|
export PATH=.:$PATH
|
|
|
|
make DESTDIR=$RPM_BUILD_ROOT SBINDIR=%{_sbindir}/ UDEV_RULE_DIR=%{_udevrulesdir} LIBDIR=%{_libdir} install
|
2020-12-01 12:54:18 +01:00
|
|
|
mkdir -p %{buildroot}%{_prefix}%{_sysconfdir}/default
|
|
|
|
install -m 644 %{S:1} %{buildroot}%{_prefix}%{_sysconfdir}/default/%{name}
|
2023-01-17 11:40:53 +01:00
|
|
|
%if 0%{?suse_version} < 1550
|
2012-02-07 11:00:23 +01:00
|
|
|
mkdir $RPM_BUILD_ROOT/sbin
|
|
|
|
ln -sf %{_sbindir}/{crda,regdbdump} $RPM_BUILD_ROOT/sbin
|
2020-11-23 19:13:06 +01:00
|
|
|
%endif
|
2009-02-10 13:49:56 +01:00
|
|
|
|
2015-06-29 10:06:50 +02:00
|
|
|
# clean up unneeded stuff...
|
|
|
|
rm -r %{buildroot}/usr/include/reglib
|
|
|
|
|
2009-02-10 13:49:56 +01:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2012-02-07 11:00:23 +01:00
|
|
|
%_sbindir/crda
|
|
|
|
%_sbindir/regdbdump
|
2015-06-29 10:06:50 +02:00
|
|
|
%_libdir/libreg.so
|
2023-01-17 11:40:53 +01:00
|
|
|
%if 0%{?suse_version} < 1550
|
2009-02-10 13:49:56 +01:00
|
|
|
/sbin/crda
|
|
|
|
/sbin/regdbdump
|
2020-11-23 19:13:06 +01:00
|
|
|
%endif
|
2020-12-01 12:54:18 +01:00
|
|
|
%if 0%{?suse_version} < 1550
|
|
|
|
%dir %{_prefix}%{_sysconfdir}/
|
|
|
|
%dir %{_prefix}%{_sysconfdir}/default/
|
|
|
|
%endif
|
|
|
|
%{_prefix}%{_sysconfdir}/default/%{name}
|
2012-10-18 09:21:14 +02:00
|
|
|
%{_udevrulesdir}/85-regulatory.rules
|
2012-09-12 00:23:01 +02:00
|
|
|
%{_mandir}/man8/crda.8.gz
|
|
|
|
%{_mandir}/man8/regdbdump.8.gz
|
2009-02-10 13:49:56 +01:00
|
|
|
|
2013-11-26 17:14:14 +01:00
|
|
|
%post
|
|
|
|
%{?udev_rules_update:%udev_rules_update}
|
|
|
|
|
2009-02-10 13:49:56 +01:00
|
|
|
%changelog
|