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