1 Summary: Detect and perform actions when an ethernet cable is (un)plugged
2 Summary(pl.UTF-8): Wykrywanie podłączenia/odłączenia kabla ethernetowego i podejmowanie działań z tym związanych
8 Source0: http://0pointer.de/lennart/projects/ifplugd/%{name}-%{version}.tar.gz
9 # Source0-md5: df6f4bab52f46ffd6eb1f5912d4ccee3
10 Patch0: %{name}-pld.patch
11 Patch1: %{name}-headers_fix.patch
13 Source2: %{name}.sysconfig
14 URL: http://0pointer.de/lennart/projects/ifplugd/
15 BuildRequires: autoconf
16 BuildRequires: automake
17 BuildRequires: libdaemon-devel >= 0.5
19 BuildRequires: pkgconfig
20 BuildRequires: rpmbuild(macros) >= 1.268
21 Requires(post,preun): /sbin/chkconfig
22 Requires(post,preun): rc-scripts
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 %define _sbindir /sbin
28 ifplugd is a Linux daemon which will automatically configure your
29 ethernet device when a cable is plugged in and automatically
30 unconfigure it if the cable is pulled. This is useful on laptops with
31 onboard network adapters, since it will only configure the interface
32 when a cable is really connected.
34 %description -l pl.UTF-8
35 ifplugd jest demonem linuksowym, który automatycznie konfiguruje kartę
36 sieciową ethernet w chwili podłączenia do niej kabla i automatycznie
37 usuwa jej konfigurację, gdy kabel jest odłączany. Przydaje się to w
38 laptopach z kartą sieciową na płycie, gdyż powoduje to skonfigurowanie
39 interfejsu tylko wtedy, gdy kabel jest rzeczywiście podłączony.
49 --disable-subversion \
51 --with-initdir=/etc/rc.d/init.d
55 rm -rf $RPM_BUILD_ROOT
58 DESTDIR=$RPM_BUILD_ROOT
60 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
61 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
64 rm -rf $RPM_BUILD_ROOT
67 /sbin/chkconfig --add %{name}
68 %service ifplugd restart
71 if [ "$1" = "0" ]; then
73 /sbin/chkconfig --del %{name}
77 %defattr(644,root,root,755)
78 %doc doc/README doc/NEWS doc/README.html doc/style.css
79 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ifplugd
80 %attr(754,root,root) /etc/rc.d/init.d/%{name}
81 %attr(755,root,root) %{_sbindir}/*
82 %dir %{_sysconfdir}/ifplugd
83 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ifplugd/ifplugd.action