]> git.pld-linux.org Git - SPECS.git/blob - ifplugd.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / ifplugd.spec
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
3 Name:           ifplugd
4 Version:        0.28
5 Release:        6
6 License:        GPL
7 Group:          Networking
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
12 Source1:        %{name}.init
13 Source2:        %{name}.sysconfig
14 URL:            http://0pointer.de/lennart/projects/ifplugd/
15 BuildRequires:  autoconf
16 BuildRequires:  automake
17 BuildRequires:  libdaemon-devel >= 0.5
18 BuildRequires:  lynx
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)
24
25 %define         _sbindir        /sbin
26
27 %description
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.
33
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.
40
41 %prep
42 %setup -q
43 %patch0 -p1
44 %patch1 -p1
45
46 %build
47 autoreconf
48 %configure \
49         --disable-subversion \
50         --disable-xmltoman \
51         --with-initdir=/etc/rc.d/init.d
52 %{__make}
53
54 %install
55 rm -rf $RPM_BUILD_ROOT
56
57 %{__make} install \
58         DESTDIR=$RPM_BUILD_ROOT
59
60 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
61 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
62
63 %clean
64 rm -rf $RPM_BUILD_ROOT
65
66 %post
67 /sbin/chkconfig --add %{name}
68 %service ifplugd restart
69
70 %preun
71 if [ "$1" = "0" ]; then
72         %service ifplugd stop
73         /sbin/chkconfig --del %{name}
74 fi
75
76 %files
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
84 %{_mandir}/man?/*
This page took 0.634005 seconds and 3 git commands to generate.