]> git.pld-linux.org Git - packages/ifplugd.git/blob - ifplugd.spec
2d74cda185d54904d836ebc7336729a986f13c67
[packages/ifplugd.git] / ifplugd.spec
1 Summary:        Detect and perform actions when an ethernet cable is (un)plugged
2 Summary(pl):    Wykrywanie pod³±czenia/od³±czenia kabla ethernetowego i podejmowanie dzia³añ z tym zwi±zanych
3 Name:           ifplugd
4 Version:        0.23
5 Release:        1
6 License:        GPL
7 Group:          Networking
8 Source0:        http://www.stud.uni-hamburg.de/~lennart/projects/ifplugd/%{name}-%{version}.tar.gz
9 # Source0-md5:  a576c20b1834201bcadf18909ed8d699
10 Source1:        %{name}.init
11 URL:            http://www.stud.uni-hamburg.de/users/lennart/projects/ifplugd/
12 BuildRequires:  libdaemon-devel >= 0.5
13 BuildRequires:  lynx
14 PreReq:         rc-scripts
15 Requires(post,preun):   /sbin/chkconfig
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %define         _sbindir        /sbin
19
20 %description
21 ifplugd is a Linux daemon which will automatically configure your
22 ethernet device when a cable is plugged in and automatically
23 unconfigure it if the cable is pulled. This is useful on laptops with
24 onboard network adapters, since it will only configure the interface
25 when a cable is really connected.
26
27 %description -l pl
28 ifplugd jest demonem linuksowym, który automatycznie konfiguruje kartê
29 sieciow± ethernet w chwili pod³±czenia do niej kabla i automatycznie
30 usuwa jej konfiguracjê, gdy kabel jest od³±czany. Przydaje siê to w
31 laptopach z kart± sieciow± na p³ycie, gdy¿ powoduje to skonfigurowanie
32 interfejsu tylko wtedy, gdy kabel jest rzeczywi¶cie pod³±czony.
33
34 %prep
35 %setup -q
36
37 %build
38 %configure
39 %{__make}
40
41 %install
42 rm -rf $RPM_BUILD_ROOT
43 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
44
45 %{__make} install \
46         DESTDIR=$RPM_BUILD_ROOT
47
48 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
49
50 %clean
51 rm -rf $RPM_BUILD_ROOT
52
53 %post
54 /sbin/chkconfig --add %{name}
55 if [ -f /var/lock/subsys/%{name} ]; then
56         /etc/rc.d/init.d/%{name} restart 1>&2
57 else
58         echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} service."
59 fi
60
61 %preun
62 if [ "$1" = "0" ]; then
63         if [ -f /var/lock/subsys/%{name} ]; then
64                 /etc/rc.d/init.d/%{name} stop 1>&2
65         fi
66         /sbin/chkconfig --del %{name}
67 fi
68
69 %files
70 %defattr(644,root,root,755)
71 %doc doc/README doc/NEWS doc/README.html doc/style.css
72 %attr(755,root,root) %{_sbindir}/*
73 %{_mandir}/man?/*
74 %attr(754,root,root) /etc/rc.d/init.d/%{name}
75 %dir %{_sysconfdir}/ifplugd
76 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ifplugd/ifplugd.conf
77 %attr(755,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ifplugd/ifplugd.action
This page took 0.066883 seconds and 2 git commands to generate.