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