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