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