]> git.pld-linux.org Git - packages/wireless-regdb.git/blobdiff - wireless-regdb.spec
up to 2024.01.23
[packages/wireless-regdb.git] / wireless-regdb.spec
index 51cb988e0398d66ef0a3c2b33afc2013e6feb0b3..8ef693a8412b465bfeaa7f6106c4861705041c3f 100644 (file)
@@ -1,16 +1,25 @@
+#
+# Conditional build:
+%bcond_without verify  # don't verify database
+
 Summary:       Wireless regulatory database for Linux drivers
 Summary(pl.UTF-8):     Baza danych przepisów dotyczących sieci bezprzewodowych dla sterowników linuksowych
 Name:          wireless-regdb
-Version:       2011.04.28
+Version:       2024.01.23
 Release:       1
 License:       ISC
 Group:         Networking/Daemons
-Source0:       http://linuxwireless.org/download/wireless-regdb/%{name}-%{version}.tar.bz2
-# Source0-md5: 16b7fabd4d7761ccf206702a3f18cce9
-URL:           http://wireless.kernel.org/en/developers/Regulatory
+Source0:       https://www.kernel.org/pub/software/network/wireless-regdb/%{name}-%{version}.tar.xz
+# Source0-md5: 3121e855df9512a2c6442d483d209c32
+URL:           https://wireless.wiki.kernel.org/en/developers/Regulatory
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
+%{?with_verify:BuildRequires:  crda}
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define                _datadir        /lib
+
 %description
 This package contains the wireless regulatory database used by all
 cfg80211 based Linux wireless drivers.
@@ -23,17 +32,27 @@ wszystkie linuksowe sterowniki bezprzewodowe oparte na cfg80211.
 %prep
 %setup -q
 
+%build
+%if %{with verify}
+PATH=/sbin:$PATH \
+regdbdump regulatory.bin > dump.txt
+test -s dump.txt
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_datadir}/crda,%{_mandir}/man5}
-
-install regulatory.bin $RPM_BUILD_ROOT%{_datadir}/crda/regulatory.bin
-install regulatory.bin.5 $RPM_BUILD_ROOT%{_mandir}/man5
+install -d $RPM_BUILD_ROOT{/lib/firmware,%{_datadir}/crda,%{_mandir}/man5}
+cp -p regulatory.db regulatory.db.p7s $RPM_BUILD_ROOT/lib/firmware
+cp -p regulatory.bin $RPM_BUILD_ROOT%{_datadir}/crda/regulatory.bin
+cp -p regulatory.bin.5 $RPM_BUILD_ROOT%{_mandir}/man5
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
+%doc LICENSE README
+/lib/firmware/regulatory.db
+/lib/firmware/regulatory.db.p7s
 %{_datadir}/crda
 %{_mandir}/man5/regulatory.bin.5*
This page took 0.033447 seconds and 4 git commands to generate.