Browse Source

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@2732 ec354946-7b23-47d6-9f5a-488ba84defc7

miyabi 13 years ago
parent
commit
b4dd1ee3cb
1 changed files with 74 additions and 28 deletions
  1. 74 28
      h/hostapd/hostapd-vl.spec

+ 74 - 28
h/hostapd/hostapd-vl.spec

@@ -1,64 +1,110 @@
-%define pkg_version 0.5.11
-%define pkg_release 2%{?_dist_release}
-
-Summary:     IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
-Name:        hostapd
-Version:     %{pkg_version}
-Release:     %{pkg_release}
-Source0:     %{name}-%{version}.tar.gz
-Patch0:      %{name}-%{version}.patch
-License:     GPL2
-Group:       System Environment/Daemons
-URL:         http://hostap.epitest.fi/hostapd/
-
-BuildRequires: openssl-devel
-BuildRoot:   %{_tmppath}/%{name}-%{version}-root
+%define pkg_version 0.7.3
+%define pkg_release 3%{?_dist_release}
+
+Summary:       IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator
+Name:          hostapd
+Version:       %{pkg_version}
+Release:       %{pkg_release}
+Source0:       %{name}-%{version}.tar.gz
+Source1:       %{name}-init.sh
+Source2:       %{name}-%{version}.config
+Patch0:        %{name}-%{version}.patch
+License:       GPL2
+Group:         System Environment/Daemons
+URL:           http://hostap.epitest.fi/hostapd/
+
+Requires:      openssl, libnl >= 1.1
+Requires(post): chkconfig
+Requires(preun): chkconfig
+BuildRequires: openssl-devel, libnl-devel
+BuildRoot:     %{_tmppath}/%{name}-%{version}-root
+
+Vendor:        Project Vine
+Distribution:  Vine Linux
+Packager:      miyabi
 
 %description
-hostapd  is a user space daemon for access point and authentication servers.  It implements IEEE 802.11 access point management,
-IEEE 802.1X/WPA/WPA2/EAP Authenticators and RADIUS authentication server.  The current version supports Linux (Host AP, madwifi,
-Prism54 drivers) and FreeBSD (net80211).
+hostapd is a user space daemon for access point and authentication servers. It implements IEEE 802.11 access point management,
+IEEE 802.1X/WPA/WPA2/EAP Authenticators, RADIUS client, EAP server, and RADIUS authentication server.
+The current version supports Linux (Host AP, madwifi, mac80211-based drivers) and FreeBSD (net80211).
 
 %prep
 %setup -q -n %{name}-%{version}
 %patch0 -p1
+cp %{SOURCE1} .
+cp %{SOURCE2} ./%{name}/.config
 
 %build
+cd %{name}
 %{__make}
 
 %install
-%{__rm} -rf ${RPM_BUILD_ROOT}
+[ "${RPM_BUILD_ROOT}" != "/" ] && %{__rm} -rf ${RPM_BUILD_ROOT}
+
+mkdir -p ${RPM_BUILD_ROOT}%{_initdir}
+
+pushd %{name}
 %{__make} install DESTDIR="${RPM_BUILD_ROOT}"
+popd
+
+install %{SOURCE1} ${RPM_BUILD_ROOT}%{_initdir}/%{name}
 
 %post
-if [ $1 = 1 ] ; then
-    /sbin/chkconfig --add hostapd
+if ! /sbin/chkconfig %{name}; then
+  /sbin/chkconfig --add %{name}
+fi
+
+if [ $1 -eq 2 ]; then
+  %{_initdir}/%{name} condrestart
 fi
 
 %preun
-if [ $1 = 0 ] ; then
-    /etc/rc.d/init.d/hostapd stop
-    /sbin/chkconfig --del hostapd
+if [ $1 -eq 0 ]; then
+  %{_initdir}/%{name} stop
+  /sbin/chkconfig --del %{name}
 fi
 
 %clean
-%__rm -rf ${RPM_BUILD_ROOT}
+[ "${RPM_BUILD_ROOT}" != "/" ] && %{__rm} -rf ${RPM_BUILD_ROOT}
 
 %files
 %defattr(-, root, root)
-%doc ChangeLog COPYING README
+%doc hostapd/ChangeLog COPYING README
 %dir %{_sysconfdir}/hostapd/
-%{_sbindir}/hostapd
-%{_bindir}/hostapd_cli
+%attr(0755, root, root) %{_sbindir}/hostapd
+%attr(0755, root, root) %{_bindir}/hostapd_cli
 %{_mandir}/man8/hostapd.8.gz
 %{_mandir}/man1/hostapd_cli.1.gz
 %attr(0644, root, root) %config %{_sysconfdir}/hostapd/hostapd.conf
 %attr(0755, root, root) %{_sysconfdir}/rc.d/init.d/hostapd
 
 %changelog
+* Mon Feb 21 2011 Masahiro INOUE <miyabi.-.inoue@nifty.com> 0.7.3-3
+- merge spec file
+
+* Thu Feb 10 2011 Masahiro INOUE <miyabi.-.inoue@nifty.com> 0.7.3-2
+- fix daemon script
+- change spec file
+- separation from patch file
+  - daemon script
+  - .config
+- add Source1 - hostapd-init.sh
+- add Source2 - hostapd-0.7.3.config
+- add Requires(post) - chkconfig
+- add Requires(preun) - chkconfig
+
 * Sun Feb 06 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.5.11-2
 - rebuild with openssl-1.0.0c
 
+* Tue Sep 21 2010 Masahiro INOUE <miyabi.-.inoue@nifty.com> 0.7.3-1
+- new upstream release
+
+* Sat May 08 2010 Masahiro INOUE <miyabi.-.inoue@nifty.com> 0.6.10-1
+- new upstream release
+
+* Mon Nov 15 2009 Masahiro INOUE <miyabi.-.inoue@nifty.com> 0.6.9-1
+- new upstream release
+
 * Mon Jan 05 2009 Masahiro INOUE <miyabi.-.inoue@nifty.com> 0.5.11-1
 - new upstream release