]>
Commit | Line | Data |
---|---|---|
820bad51 | 1 | # |
f129e674 | 2 | # Conditional build |
e01e661c | 3 | %bcond_without systemd # use systemd for session tracking instead of ConsoleKit (fallback to ConsoleKit on runtime) |
f129e674 | 4 | %bcond_with wimax # enable wimax support |
f129e674 | 5 | |
78c5d1e2 | 6 | Summary: Network Manager for GNOME |
e2b72088 | 7 | Summary(pl.UTF-8): Zarządca sieci dla GNOME |
78c5d1e2 | 8 | Name: NetworkManager |
679fb6a7 | 9 | Version: 0.9.4.0 |
12e6eb95 | 10 | Release: 3 |
3116f662 | 11 | Epoch: 2 |
ed124d85 | 12 | License: GPL v2+ |
01912239 | 13 | Group: Networking/Admin |
2b0423b4 | 14 | Source0: http://ftp.gnome.org/pub/GNOME/sources/NetworkManager/0.9/%{name}-%{version}.tar.xz |
679fb6a7 | 15 | # Source0-md5: 66a54b51a4998c484613911b72a7e6ff |
9aaefa69 | 16 | Source1: %{name}.conf |
84cae66f | 17 | Source2: %{name}.upstart |
e7422f98 | 18 | Source3: %{name}.tmpfiles |
ebfc68d6 | 19 | Patch0: %{name}-pld.patch |
84cae66f | 20 | Patch1: ifcfg-path.patch |
6c2c3644 | 21 | Patch2: systemd-fallback.patch |
bad8d11f | 22 | URL: http://projects.gnome.org/NetworkManager/ |
f129e674 ŁK |
23 | BuildRequires: autoconf >= 2.63 |
24 | BuildRequires: automake >= 1:1.10 | |
b39a9bc1 | 25 | BuildRequires: dbus-devel >= 1.1.0 |
019eb5cf | 26 | BuildRequires: dbus-glib-devel >= 0.75 |
31fef363 | 27 | BuildRequires: docbook-dtd412-xml |
f129e674 ŁK |
28 | BuildRequires: gettext-devel >= 0.17 |
29 | BuildRequires: glib2-devel >= 1:2.24.0 | |
30 | BuildRequires: gobject-introspection-devel >= 0.10.0 | |
820bad51 | 31 | BuildRequires: gtk-doc >= 1.0 |
5d8867d1 | 32 | BuildRequires: gtk-doc-automake >= 1.0 |
f129e674 | 33 | BuildRequires: intltool >= 0.40.0 |
019eb5cf | 34 | BuildRequires: libiw-devel >= 1:28-0.pre9.1 |
3c98bab2 | 35 | BuildRequires: libnl-devel >= 3.0 |
679fb6a7 | 36 | BuildRequires: libsoup-devel >= 2.26.0 |
820bad51 | 37 | BuildRequires: libtool >= 2:2.2 |
019eb5cf | 38 | BuildRequires: libuuid-devel |
8eb648cc | 39 | BuildRequires: nss-devel >= 3.11 |
3528442f | 40 | BuildRequires: pkgconfig |
820bad51 | 41 | BuildRequires: polkit-devel >= 0.97 |
12e6eb95 | 42 | BuildRequires: ppp-plugin-devel >= 3:2.4.5 |
31fef363 | 43 | BuildRequires: rpm-pythonprov |
1cdb1087 | 44 | BuildRequires: rpmbuild(macros) >= 1.629 |
019eb5cf | 45 | BuildRequires: sed >= 4.0 |
679fb6a7 | 46 | %{?with_systemd:BuildRequires: systemd-devel} |
2b0423b4 | 47 | BuildRequires: tar >= 1:1.22 |
12b79b1b | 48 | BuildRequires: udev-devel |
990cc3b8 | 49 | BuildRequires: udev-glib-devel >= 1:147 |
f129e674 | 50 | %{?with_wimax:BuildRequires: wimax-devel >= 1.5.1} |
2b0423b4 | 51 | BuildRequires: xz |
03028f08 | 52 | Requires(post,preun): /sbin/chkconfig |
3116f662 | 53 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} |
f00ab9b3 | 54 | Requires: ConsoleKit-x11 |
12b79b1b | 55 | Requires: dhcp-client |
85ef357a | 56 | Requires: filesystem >= 3.0-37 |
820bad51 | 57 | Requires: polkit >= 0.97 |
7a8213b1 | 58 | Requires: rc-scripts >= 0.4.3.0 |
db711eec | 59 | Requires: systemd-units >= 37-0.10 |
f129e674 | 60 | Requires: wpa_supplicant >= 0.7.3-4 |
9aaefa69 ER |
61 | Suggests: ModemManager |
62 | Suggests: mobile-broadband-provider-info | |
db711eec | 63 | Obsoletes: NetworkManager-systemd |
679fb6a7 | 64 | Obsoletes: dhcdbd < 3.0-1 |
f73d6ec8 | 65 | # sr@Latn vs. sr@latin |
66 | Conflicts: glibc-misc < 6:2.7 | |
78c5d1e2 | 67 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
68 | ||
019eb5cf MB |
69 | %define _libexecdir %{_libdir}/%{name} |
70 | ||
78c5d1e2 | 71 | %description |
72 | Network Manager for GNOME. | |
73 | ||
d3c2b519 JR |
74 | %description -l pl.UTF-8 |
75 | Zarządca sieci dla GNOME. | |
b13728a1 | 76 | |
019eb5cf MB |
77 | %package apidocs |
78 | Summary: libnm-glib library API documentation | |
79 | Summary(pl.UTF-8): Dokumentacja API biblioteki libnm-glib | |
80 | Group: Documentation | |
81 | Requires: gtk-doc-common | |
82 | ||
83 | %description apidocs | |
84 | libnm-glib library API documentation. | |
85 | ||
86 | %description apidocs -l pl.UTF-8 | |
87 | Dokumentacja API biblioteki libnm-glib. | |
88 | ||
39138d0e JB |
89 | %package libs |
90 | Summary: Network Manager shared libraries | |
e2b72088 | 91 | Summary(pl.UTF-8): Biblioteki dzielone Network Managera |
019eb5cf | 92 | Group: Libraries |
5d8867d1 | 93 | Requires: dbus-glib >= 0.75 |
f129e674 | 94 | Requires: glib2 >= 1:2.24.0 |
820bad51 | 95 | Requires: nss >= 3.11 |
990cc3b8 | 96 | Requires: udev-glib >= 1:147 |
39138d0e JB |
97 | Conflicts: NetworkManager < 0.6.4-0.2 |
98 | ||
99 | %description libs | |
100 | Network Manager shared libraries. | |
101 | ||
d3c2b519 | 102 | %description libs -l pl.UTF-8 |
39138d0e JB |
103 | Biblioteki dzielone Network Managera. |
104 | ||
c7c1e97f | 105 | %package devel |
106 | Summary: Network Manager includes and more | |
e2b72088 | 107 | Summary(pl.UTF-8): Pliki nagłówkowe Network Managera |
019eb5cf | 108 | Group: Development/Libraries |
3116f662 | 109 | Requires: %{name}-libs = %{epoch}:%{version}-%{release} |
b39a9bc1 | 110 | Requires: dbus-glib-devel >= 0.75 |
f129e674 | 111 | Requires: glib2-devel >= 1:2.24.0 |
bc96d1d8 | 112 | Requires: libuuid-devel |
820bad51 | 113 | Requires: nss-devel >= 3.11 |
990cc3b8 | 114 | Requires: udev-glib-devel >= 1:147 |
c7c1e97f | 115 | |
116 | %description devel | |
d16bce79 | 117 | Network Manager includes and more. |
c7c1e97f | 118 | |
d3c2b519 JR |
119 | %description devel -l pl.UTF-8 |
120 | Pliki nagłówkowe Network Manager. | |
c7c1e97f | 121 | |
122 | %package static | |
123 | Summary: Network Manager static libraries | |
e2b72088 | 124 | Summary(pl.UTF-8): Statyczne biblioteki Network Managera |
019eb5cf | 125 | Group: Development/Libraries |
3116f662 | 126 | Requires: %{name}-devel = %{epoch}:%{version}-%{release} |
c7c1e97f | 127 | |
128 | %description static | |
d16bce79 | 129 | Network Manager static libraries. |
c7c1e97f | 130 | |
d3c2b519 | 131 | %description static -l pl.UTF-8 |
d16bce79 | 132 | Statyczne biblioteki Network Managera. |
c7c1e97f | 133 | |
78c5d1e2 | 134 | %prep |
135 | %setup -q | |
ebfc68d6 | 136 | %patch0 -p1 |
84cae66f | 137 | %patch1 -p1 |
e01e661c | 138 | %{?with_systemd:%patch2 -p1} |
78c5d1e2 | 139 | |
140 | %build | |
532f20aa | 141 | %{__gtkdocize} |
e35ac91e MB |
142 | %{__intltoolize} |
143 | %{__libtoolize} | |
8eb648cc | 144 | %{__aclocal} -I m4 |
e35ac91e | 145 | %{__autoconf} |
31ac744a | 146 | %{__autoheader} |
e35ac91e | 147 | %{__automake} |
b13728a1 | 148 | %configure \ |
f129e674 | 149 | --disable-silent-rules \ |
019eb5cf | 150 | --with-html-dir=%{_gtkdocdir} \ |
3528442f | 151 | --with-distro=pld \ |
9aaefa69 ER |
152 | --enable-more-warnings=yes \ |
153 | --with-dhclient=/sbin/dhclient \ | |
b39a9bc1 | 154 | --with-iptables=/usr/sbin/iptables \ |
a8c73342 | 155 | --with-system-ca-path=/etc/certs \ |
1cdb1087 | 156 | --with-systemdsystemunitdir=%{systemdunitdir} \ |
679fb6a7 | 157 | --with-session-tracking=%{?with_systemd:systemd}%{!?with_systemd:ck} \ |
12e6eb95 | 158 | --with-pppd-plugin-dir=%{_libdir}/pppd/plugins \ |
4658eec9 | 159 | --with-dist-version=%{version}-%{release} \ |
f129e674 ŁK |
160 | --with-docs \ |
161 | %{__enable_disable wimax} \ | |
162 | --enable-static | |
3354c1e9 | 163 | |
78c5d1e2 | 164 | %{__make} |
165 | ||
166 | %install | |
167 | rm -rf $RPM_BUILD_ROOT | |
e01e661c | 168 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/var/run/%{name},%{systemdtmpfilesdir}} \ |
88a4a6b0 | 169 | $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/{VPN,dispatcher.d,system-connections} |
78c5d1e2 | 170 | |
171 | %{__make} install \ | |
172 | DESTDIR=$RPM_BUILD_ROOT | |
173 | ||
2e62419d ER |
174 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name} |
175 | ||
176 | install -d $RPM_BUILD_ROOT/etc/init | |
177 | cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/init/NetworkManager.conf | |
33d73d20 | 178 | |
e01e661c | 179 | install %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf |
e7422f98 | 180 | |
019eb5cf | 181 | # Cleanup |
f129e674 | 182 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la |
ed124d85 | 183 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/NetworkManager/*.{a,la} |
12e6eb95 | 184 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/pppd/plugins/*.{a,la} |
b08c7aff | 185 | |
72c76a4d | 186 | %find_lang %{name} |
938e5ee3 | 187 | |
5245652d ER |
188 | # examples |
189 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
190 | cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
191 | find $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} -name 'Makefile*' | xargs rm | |
192 | ||
78c5d1e2 | 193 | %clean |
194 | rm -rf $RPM_BUILD_ROOT | |
195 | ||
b08c7aff | 196 | %post |
b08c7aff | 197 | /sbin/chkconfig --add NetworkManager |
608476ba | 198 | %service -n NetworkManager restart "NetworkManager daemon" |
8fbcd420 | 199 | %systemd_post NetworkManager.service NetworkManager-wait-online.service |
b08c7aff PZ |
200 | |
201 | %preun | |
202 | if [ "$1" = "0" ]; then | |
03028f08 ER |
203 | %service NetworkManager stop |
204 | /sbin/chkconfig --del NetworkManager | |
b08c7aff | 205 | fi |
8fbcd420 JR |
206 | %systemd_preun NetworkManager.service NetworkManager-wait-online.service |
207 | ||
208 | %postun | |
209 | %systemd_reload | |
210 | ||
211 | %triggerpostun -- NetworkManager < 2:0.9.2.0-5 | |
212 | %systemd_trigger NetworkManager.service NetworkManager-wait-online.service | |
b08c7aff | 213 | |
019eb5cf MB |
214 | %triggerun -- NetworkManager < 0.7.0-0.svn4027.1 |
215 | %service -q NetworkManagerDispatcher stop | |
216 | /sbin/chkconfig --del NetworkManagerDispatcher | |
217 | ||
7b03af04 | 218 | %triggerun -- NetworkManager < 0.8.9997-5 |
84cae66f ER |
219 | # move network interfaces description files to new location |
220 | mv -f /etc/sysconfig/network-scripts/ifcfg-* /etc/sysconfig/interfaces | |
7b03af04 ER |
221 | mv -f /etc/sysconfig/network-scripts/keys-* /etc/sysconfig/interfaces |
222 | exit 0 | |
84cae66f | 223 | |
f013290b PZ |
224 | %post libs -p /sbin/ldconfig |
225 | %postun libs -p /sbin/ldconfig | |
b08c7aff | 226 | |
938e5ee3 | 227 | %files -f %{name}.lang |
78c5d1e2 | 228 | %defattr(644,root,root,755) |
229 | %doc AUTHORS ChangeLog NEWS README TODO | |
f129e674 | 230 | %attr(755,root,root) %{_bindir}/nm-online |
6d8ec5fa | 231 | %attr(755,root,root) %{_bindir}/nm-tool |
e02ef63c | 232 | %attr(755,root,root) %{_bindir}/nmcli |
6d8ec5fa | 233 | %attr(755,root,root) %{_sbindir}/NetworkManager |
019eb5cf | 234 | %dir %{_libdir}/NetworkManager |
ed124d85 | 235 | %attr(755,root,root) %{_libdir}/NetworkManager/libnm-settings-plugin-ifcfg-rh.so |
019eb5cf MB |
236 | %attr(755,root,root) %{_libexecdir}/nm-avahi-autoipd.action |
237 | %attr(755,root,root) %{_libexecdir}/nm-dhcp-client.action | |
238 | %attr(755,root,root) %{_libexecdir}/nm-dispatcher.action | |
ed124d85 | 239 | %attr(755,root,root) %{_libexecdir}/nm-crash-logger |
12e6eb95 | 240 | %attr(755,root,root) %{_libdir}/pppd/plugins/nm-pppd-plugin.so |
b08c7aff | 241 | %attr(754,root,root) /etc/rc.d/init.d/NetworkManager |
2e62419d | 242 | %config(noreplace) %verify(not md5 mtime size) /etc/init/NetworkManager.conf |
db711eec JR |
243 | %{systemdunitdir}/NetworkManager.service |
244 | %{systemdunitdir}/NetworkManager-wait-online.service | |
245 | %{_datadir}/dbus-1/system-services/org.freedesktop.NetworkManager.service | |
e01e661c | 246 | %{systemdtmpfilesdir}/%{name}.conf |
ed124d85 JB |
247 | %dir %{_datadir}/%{name} |
248 | %{_datadir}/%{name}/gdb-cmd | |
249 | %{_datadir}/dbus-1/system-services/org.freedesktop.nm_dispatcher.service | |
4658eec9 | 250 | %{_datadir}/polkit-1/actions/org.freedesktop.NetworkManager.policy |
7e654435 | 251 | /lib/udev/rules.d/77-nm-olpc-mesh.rules |
9aaefa69 | 252 | %dir %{_sysconfdir}/%{name}/VPN |
9aaefa69 ER |
253 | %dir %{_sysconfdir}/%{name}/system-connections |
254 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf | |
ed124d85 JB |
255 | %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/nm-dhcp-client.conf |
256 | %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/nm-avahi-autoipd.conf | |
257 | %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/nm-dispatcher.conf | |
258 | %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/nm-ifcfg-rh.conf | |
679fb6a7 | 259 | %config(noreplace) %verify(not md5 mtime size) /etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf |
f129e674 ŁK |
260 | %attr(700,root,root) %dir /var/run/%{name} |
261 | %attr(700,root,root) %dir /var/lib/%{name} | |
4658eec9 | 262 | %{_mandir}/man1/nm-online.1* |
6d8ec5fa | 263 | %{_mandir}/man1/nm-tool.1* |
e02ef63c | 264 | %{_mandir}/man1/nmcli.1* |
e02ef63c | 265 | %{_mandir}/man5/nm-system-settings.conf.5* |
9aaefa69 | 266 | %{_mandir}/man5/NetworkManager.conf.5* |
e02ef63c | 267 | %{_mandir}/man8/NetworkManager.8* |
5245652d | 268 | %{_examplesdir}/%{name}-%{version} |
86e5252a | 269 | |
019eb5cf MB |
270 | %files apidocs |
271 | %defattr(644,root,root,755) | |
f129e674 | 272 | %{_gtkdocdir}/NetworkManager |
019eb5cf MB |
273 | %{_gtkdocdir}/libnm-glib |
274 | %{_gtkdocdir}/libnm-util | |
275 | ||
39138d0e JB |
276 | %files libs |
277 | %defattr(644,root,root,755) | |
31ac744a | 278 | %attr(755,root,root) %{_libdir}/libnm-util.so.*.*.* |
f129e674 | 279 | %attr(755,root,root) %ghost %{_libdir}/libnm-util.so.2 |
7e654435 | 280 | %attr(755,root,root) %{_libdir}/libnm-glib.so.*.*.* |
f129e674 | 281 | %attr(755,root,root) %ghost %{_libdir}/libnm-glib.so.4 |
7e654435 | 282 | %attr(755,root,root) %{_libdir}/libnm-glib-vpn.so.*.*.* |
283 | %attr(755,root,root) %ghost %{_libdir}/libnm-glib-vpn.so.1 | |
f129e674 ŁK |
284 | %{_libdir}/girepository-1.0/NMClient-1.0.typelib |
285 | %{_libdir}/girepository-1.0/NetworkManager-1.0.typelib | |
7e654435 | 286 | |
c7c1e97f | 287 | %files devel |
288 | %defattr(644,root,root,755) | |
e1c71f54 | 289 | %attr(755,root,root) %{_libdir}/libnm-util.so |
7e654435 | 290 | %attr(755,root,root) %{_libdir}/libnm-glib.so |
291 | %attr(755,root,root) %{_libdir}/libnm-glib-vpn.so | |
e1c71f54 | 292 | %{_includedir}/NetworkManager |
019eb5cf | 293 | %{_includedir}/libnm-glib |
e1c71f54 JB |
294 | %{_pkgconfigdir}/NetworkManager.pc |
295 | %{_pkgconfigdir}/libnm-util.pc | |
7e654435 | 296 | %{_pkgconfigdir}/libnm-glib-vpn.pc |
297 | %{_pkgconfigdir}/libnm-glib.pc | |
f129e674 ŁK |
298 | %{_datadir}/gir-1.0/NMClient-1.0.gir |
299 | %{_datadir}/gir-1.0/NetworkManager-1.0.gir | |
7e654435 | 300 | |
c7c1e97f | 301 | %files static |
302 | %defattr(644,root,root,755) | |
e1c71f54 | 303 | %{_libdir}/libnm-util.a |
7e654435 | 304 | %{_libdir}/libnm-glib.a |
305 | %{_libdir}/libnm-glib-vpn.a |