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