]> git.ipfire.org Git - ipfire-3.x.git/blobdiff - hostapd/hostapd.nm
perl-XML-Parser: Set correct perl dependencies
[ipfire-3.x.git] / hostapd / hostapd.nm
index a5de902d88e77dd17fe75c33804b405e8a3265eb..7d8e0bf0ba7b6452ec56e8891cb7d38b5e2e6558 100644 (file)
@@ -4,11 +4,11 @@
 ###############################################################################
 
 name       = hostapd
-version    = 0.7.3
-release    = 2
+version    = 2.9
+release    = 1
 
 groups     = Networking/Tools
-url        = http://hostap.epitest.fi/hostapd/
+url        = https://w1.fi/hostapd/
 license    = GPLv2+
 summary    = User space daemon to create Wifi Access points.
 
@@ -19,33 +19,69 @@ description
        RADIUS authentication server.
 end
 
-source_dl  = http://hostap.epitest.fi/releases/
+source_dl  = https://w1.fi/releases/
 
 build
        requires
-               libnl-devel
-               openssl-devel
+               libnl3-devel
+               openssl-devel >= 1.1.1
        end
 
        prepare_cmds
                cd hostapd
-               cp -vf %{DIR_SOURCE}/config .config
-               sed -e "s@/usr/local@%{BUILDROOT}/usr@g" -i Makefile
+
+               # Create our custom configuration.
+               cat defconfig > .config
+               sed -i .config \
+                       -e '/^#CONFIG_GETRANDOM=y/s/^#//' \
+                       -e '/^#CONFIG_ACS=y/s/^#//' \
+                       -e '/^#CONFIG_LIBNL32=y/s/^#//' \
+                       -e '/^#CONFIG_TAXONOMY=y/s/^#//' \
+                       -e '/^#CONFIG_DRIVER_NL80211=y/s/^#//' \
+                       -e '/^#CONFIG_DRIVER_NL80211_QCA=y/s/^#//' \
+                       -e '/^#CONFIG_DRIVER_NONE=y/s/^#//' \
+                       -e '/^#CONFIG_DRIVER_WIRED=y/s/^#//' \
+                       -e '/^#CONFIG_IEEE80211AC=y/s/^#//' \
+                       -e '/^#CONFIG_IEEE80211AX=y/s/^#//' \
+                       -e '/^#CONFIG_IEEE80211N=y/s/^#//' \
+                       -e '/^#CONFIG_RADIUS_SERVER=y/s/^#//'
        end
 
        build
                cd hostapd
-               make %{PARALLELISMFLAGS} CC=gcc
+               make %{PARALLELISMFLAGS} CC=gcc \
+                       CONFIG_SAE=y
        end
 
        install
-               mkdir -pv %{BUILDROOT}/usr/bin
-               cd hostapd && make install
+               cd hostapd
+
+               # Install binaries.
+               mkdir -pv %{BUILDROOT}%{bindir} %{BUILDROOT}%{sbindir}
+               install -m 755 hostapd %{BUILDROOT}%{sbindir}
+               install -m 755 hostapd_cli %{BUILDROOT}%{bindir}
+
+               # Install manpages.
+               mkdir -pv %{BUILDROOT}%{mandir}/man{1,8}
+               install -m 644 hostapd.8 %{BUILDROOT}%{mandir}/man8
+               install -m 644 hostapd_cli.1 %{BUILDROOT}%{mandir}/man1
        end
 end
 
 packages
        package %{name}
+               script postin
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+               end
+
+               script postup
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+               end
+
+               script postun
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+               end
+       end
 
        package %{name}-debuginfo
                template DEBUGINFO