43b4db93c8c3a05190c609cd06c960ba6e80b866
[adaptation/panda/wpa_supplicant.git] / packaging / wpa_supplicant.spec
1 Name:       wpa_supplicant
2 Summary:    WPA/WPA2/IEEE 802.1X Supplicant
3 Version:    0.7.3
4 Release:    1
5 Group:      System/Base
6 License:    BSD
7 URL:        http://w1.fi/wpa_supplicant/
8 Source0:    %{name}-%{version}.tar.gz
9 Source1:    %{name}.config
10 Patch0:     0001-eap_peer-create-a-libeap-library-with-header-files-a.patch
11 Patch1:     0001-events-Custom-event-for-broadcom-proprietary-driver.patch
12 Patch2:     0002-nl80211-Add-a-get_country-hook.patch
13 Patch3:     0003-dbus-Add-a-Country-global-property.patch
14 Patch4:     wpa_s-alldrivers.patch
15 BuildRequires:  pkgconfig(openssl)
16 BuildRequires:  pkgconfig(libnl-1)
17 BuildRequires:  pkgconfig(dbus-1)
18 BuildRequires:  readline
19
20
21 %description
22 wpa_supplicant is a WPA Supplicant for Linux, BSD and Windows with support 
23 for WPA and WPA2 (IEEE 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA 
24 component that is used in the client stations. It implements key negotiation 
25 with a WPA Authenticator and it controls the roaming and IEEE 802.11 
26 authentication/association of the wlan driver.
27
28
29
30 %package -n libeap0
31 Summary:    EAP-Peer runtime library
32 Group:      System/Libraries
33 Requires:   %{name} = %{version}-%{release}
34 Requires(post): /sbin/ldconfig
35 Requires(postun): /sbin/ldconfig
36
37 %description -n libeap0
38 This is just the runtime for EAP-Peer authentication.
39
40
41 %package -n libeap0-devel
42 Summary:    EAP-Peer development support
43 Group:      Development/Libraries
44 Requires:   %{name} = %{version}-%{release}
45 Requires:   libeap0
46
47 %description -n libeap0-devel
48 Development support for for EAP-Peer authentication library
49 (header files and package config).
50
51
52
53 %prep
54 %setup -q -n %{name}-%{version}
55
56 # 0001-eap_peer-create-a-libeap-library-with-header-files-a.patch
57 %patch0 -p1
58 # 0001-events-Custom-event-for-broadcom-proprietary-driver.patch
59 %patch1 -p1
60 # 0002-nl80211-Add-a-get_country-hook.patch
61 %patch2 -p1
62 # 0003-dbus-Add-a-Country-global-property.patch
63 %patch3 -p1
64 # wpa_s-alldrivers.patch
65 %patch4 -p1
66
67 %build
68 pushd wpa_supplicant
69 cp %{SOURCE1} ./.config
70 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ;
71 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ;
72
73
74
75 make %{?jobs:-j%jobs} V=1
76 popd
77 # Ugly, but otherwise ARM will FAIL. Force all objects to be rebuilt
78 # from the eap_peer subdirectory, so they include -fPIC for the shared
79 # library and it won't affect the other built binaries  -- this is an
80 # ugly hack, but until the build system in wpa_supplicant is not
81 # revamped, I can't think of a better way.
82 rm -f src/utils/*.o src/eap_common/*.o src/crypto/*.o src/eap_peer/*.o
83 make -C src/eap_peer %{?jobs:-j%jobs}
84 %install
85 rm -rf %{buildroot}
86
87 rm -rf %{buildroot}
88
89 # binary
90 install -d %{buildroot}/sbin
91 install -m 0755 %{name}/wpa_passphrase %{buildroot}/sbin
92 install -m 0755 %{name}/wpa_cli %{buildroot}/sbin
93 install -m 0755 %{name}/wpa_supplicant %{buildroot}/sbin
94 install -d %{buildroot}/%{_sysconfdir}/dbus-1/system.d/
95 install -m 0644 %{name}/dbus/dbus-wpa_supplicant.conf %{buildroot}/%{_sysconfdir}/dbus-1/system.d/wpa_supplicant.conf
96 install -d %{buildroot}/%{_datadir}/dbus-1/system-services/
97 install -m 0644 %{name}/dbus/fi.epitest.hostap.WPASupplicant.service %{buildroot}/%{_datadir}/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service
98 install -m 0644 %{name}/dbus/fi.w1.wpa_supplicant1.service %{buildroot}/%{_datadir}/dbus-1/system-services/fi.w1.wpa_supplicant1.service
99 make -C src/eap_peer install DESTDIR=%{buildroot}
100
101 # running
102 mkdir -p %{buildroot}/%{_localstatedir}/run/%{name}
103
104 # some cleanup in docs
105 rm -f  %{name}/doc/.cvsignore
106 rm -rf %{name}/doc/docbook
107
108 %post -n libeap0 -p /sbin/ldconfig
109
110 %postun -n libeap0 -p /sbin/ldconfig
111
112
113 %docs_package
114
115 %files
116 %{_sysconfdir}/dbus-1/system.d/%{name}.conf
117 %{_datadir}/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service
118 %{_datadir}/dbus-1/system-services/fi.w1.wpa_supplicant1.service
119 /sbin/wpa_passphrase
120 /sbin/wpa_supplicant
121 /sbin/wpa_cli
122 %dir %{_localstatedir}/run/%{name}
123
124 %files -n libeap0
125 /usr/lib/libeap.so.0.0.0
126
127 %files -n libeap0-devel
128 /usr/lib/libeap.so
129 /usr/lib/pkgconfig/libeap0.pc
130 /usr/include/eap_peer
131