--- /dev/null
+[Unit]
+Description=WPA Supplicant daemon
+Before=network.target
+
+[Service]
+Type=dbus
+BusName=fi.w1.wpa_supplicant1
+EnvironmentFile=-/etc/sysconfig/wpa_supplicant
+ExecStart=/usr/sbin/wpa_supplicant -u -t -B -ddd -f /var/log/wpa_supplicant.log $OPTIONS
+
+[Install]
+WantedBy=multi-user.target
Summary: Support for WPA and WPA2 (IEEE 802)
Group: System/Network
Source0: %{name}-%{version}.tar.gz
-Source1001: wpasupplicant.manifest
+Source1: wpa_supplicant.service
+Source1001: wpa_supplicant.manifest
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(libcrypto)
# install systemd service file
mkdir -p %{buildroot}%{_libdir}/systemd/system
-install -m 0644 systemd/wpa_supplicant.service %{buildroot}%{_libdir}/systemd/system/
+install -m 0644 %{SOURCE1} %{buildroot}%{_libdir}/systemd/system/
mkdir -p %{buildroot}%{_libdir}/systemd/system/network.target.wants
ln -s ../wpa_supplicant.service %{buildroot}%{_libdir}/systemd/system/network.target.wants/wpa_supplicant.service
%files
-%manifest wpasupplicant.manifest
+%manifest wpa_supplicant.manifest
%{_sbindir}/wpa_cli
%{_sbindir}/wpa_supplicant
%attr(644,-,-) %{_sysconfdir}/dbus-1/system.d/*.conf