7a14a6df17effc73f3648dcf56c9c064084bd14c
[profile/ivi/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.bz2
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 %package -n libeap0
30 Summary:    EAP-Peer runtime library
31 Group:      System/Libraries
32 Requires:   %{name} = %{version}-%{release}
33 Requires(post): /sbin/ldconfig
34 Requires(postun): /sbin/ldconfig
35
36 %description -n libeap0
37 This is just the runtime for EAP-Peer authentication.
38
39
40 %package -n libeap0-devel
41 Summary:    EAP-Peer development support
42 Group:      Development/Libraries
43 Requires:   %{name} = %{version}-%{release}
44 Requires:   libeap0
45
46 %description -n libeap0-devel
47 Development support for for EAP-Peer authentication library
48 (header files and package config).
49
50
51
52 %prep
53 %setup -q 
54
55 # 0001-eap_peer-create-a-libeap-library-with-header-files-a.patch
56 %patch0 -p1
57 # 0001-events-Custom-event-for-broadcom-proprietary-driver.patch
58 %patch1 -p1
59 # 0002-nl80211-Add-a-get_country-hook.patch
60 %patch2 -p1
61 # 0003-dbus-Add-a-Country-global-property.patch
62 %patch3 -p1
63 # wpa_s-alldrivers.patch
64 %patch4 -p1
65
66 %build
67 pushd wpa_supplicant
68 cp %{SOURCE1} ./.config
69 CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ;
70 CXXFLAGS="${CXXFLAGS:-%optflags}" ; export CXXFLAGS ;
71
72
73
74 make %{?jobs:-j%jobs} V=1
75 popd
76 # Ugly, but otherwise ARM will FAIL. Force all objects to be rebuilt
77 # from the eap_peer subdirectory, so they include -fPIC for the shared
78 # library and it won't affect the other built binaries  -- this is an
79 # ugly hack, but until the build system in wpa_supplicant is not
80 # revamped, I can't think of a better way.
81 rm -f src/utils/*.o src/eap_common/*.o src/crypto/*.o src/eap_peer/*.o
82 make -C src/eap_peer %{?jobs:-j%jobs}
83 %install
84 rm -rf %{buildroot}
85
86 rm -rf %{buildroot}
87
88 # binary
89 install -d %{buildroot}/sbin
90 install -m 0755 %{name}/wpa_passphrase %{buildroot}/sbin
91 install -m 0755 %{name}/wpa_cli %{buildroot}/sbin
92 install -m 0755 %{name}/wpa_supplicant %{buildroot}/sbin
93 install -d %{buildroot}/%{_sysconfdir}/dbus-1/system.d/
94 install -m 0644 %{name}/dbus/dbus-wpa_supplicant.conf %{buildroot}/%{_sysconfdir}/dbus-1/system.d/wpa_supplicant.conf
95 install -d %{buildroot}/%{_datadir}/dbus-1/system-services/
96 install -m 0644 %{name}/dbus/fi.epitest.hostap.WPASupplicant.service %{buildroot}/%{_datadir}/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service
97 install -m 0644 %{name}/dbus/fi.w1.wpa_supplicant1.service %{buildroot}/%{_datadir}/dbus-1/system-services/fi.w1.wpa_supplicant1.service
98 make -C src/eap_peer install DESTDIR=%{buildroot}
99
100 # running
101 mkdir -p %{buildroot}/%{_localstatedir}/run/%{name}
102
103 # man pages
104 install -d %{buildroot}/%{_mandir}/man{5,8}
105 install -m 0644 %{name}/doc/docbook/*.8 %{buildroot}/%{_mandir}/man8
106 install -m 0644 %{name}/doc/docbook/*.5 %{buildroot}/%{_mandir}/man5
107
108 # some cleanup in docs
109 rm -f  %{name}/doc/.cvsignore
110 rm -rf %{name}/doc/docbook
111
112
113 %post -n libeap0 -p /sbin/ldconfig
114
115 %postun -n libeap0 -p /sbin/ldconfig
116
117
118 %docs_package
119
120 %files
121 %{_sysconfdir}/dbus-1/system.d/%{name}.conf
122 %{_datadir}/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service
123 %{_datadir}/dbus-1/system-services/fi.w1.wpa_supplicant1.service
124 /sbin/wpa_passphrase
125 /sbin/wpa_supplicant
126 /sbin/wpa_cli
127 %dir %{_localstatedir}/run/%{name}
128
129 %files -n libeap0
130 /usr/lib/libeap.so.0.0.0
131
132 %files -n libeap0-devel
133 /usr/lib/libeap.so
134 /usr/lib/pkgconfig/libeap0.pc
135 /usr/include/eap_peer
136