]> git.pld-linux.org Git - packages/arpd.git/blob - arpd.spec
- reverting last change: removing new macros from %p{re,ost}{,un}
[packages/arpd.git] / arpd.spec
1 Summary:        User-space arp daemon
2 Summary(pl):    Demon arpd
3 Name:           arpd
4 Version:        1.0.2
5 Release:        4
6 License:        GPL
7 Group:          Daemons
8 Group(de):      Server
9 Group(pl):      Serwery
10 Source0:        %{name}-%{version}.tar.gz
11 Source1:        %{name}-init
12 Patch0:         %{name}-%{version}.debian-patch
13 Patch1:         %{name}-%{version}.pld-patch
14 Patch2:         %{name}-makefile-patch
15 Patch3:         %{name}-more_tables.patch
16 Patch4:         %{name}-uid.patch
17 Prereq:         /sbin/chkconfig
18 Prereq:         rc-scripts >= 0.2.0
19 Prereq:         fileutils
20 Requires:       dev >= 2.8.0-3
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %description
24 The ARP daemon moves the management of the ARP (Address Resolution
25 Protocol) table from kernel to user space. It is useful for sites with
26 LARGE network segments (256+ systems per segment), because the kernel
27 hash tables are not optimized to handle this situation. To use the ARP
28 daemon your kernel needs to have ARPD and NETLINK support enabled. The
29 standard kernels of PLD lack this support. It shouldn't be run without
30 that!! This version can alocate 2048 entries.
31
32 %description -l pl
33 Demon ARP przekazuje zarz±dzanie tablic± ARP (Address Resolution
34 Protocol) z kernel'a do przestrzeni u¿ytkownika. Jest to bardzo
35 u¿yteczne dla miejsc o du¿ych segmentach sieci (256+ systemów na
36 segment), poniewa¿ tablice w j±drze nie s± zoptymalizowane na takie
37 sytuacje. Aby u¿ywaæ tego demona musisz mieæ ARPD support oraz NETLINK
38 support uaktywnione w j±drze. Uwaga! Stanadardowe j±dro PLD nie ma
39 supportu ARPD!!. Demon nie powinien byæ startowany bez tego!! Ta
40 wersja potrafi zaakceptowaæ 2048 pozycji.
41
42 %prep
43 %setup  -q -n %{name}-%{version}.orig
44 %patch0 -p1
45 %patch1 -p1
46 %patch2 -p1
47 %patch3
48 %patch4 -p1
49
50 %build
51 %{__make}
52
53 %install
54 rm -rf $RPM_BUILD_ROOT
55 install -d $RPM_BUILD_ROOT/{usr/sbin,etc/rc.d/init.d,/var/lib/arpd}
56
57 install arpd $RPM_BUILD_ROOT%{_sbindir}/arpd
58 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/arpd
59
60 gzip -9nf CHANGES
61
62 %pre
63 if [ -n "`id -u arpd 2>/dev/null`" ]; then
64         if [ "`id -u arpd`" != "40" ]; then
65                 echo "Warning: user arpd haven't uid=40. Correct this before installing arpd." 1>&2
66                 exit 1
67         fi
68 else
69         echo "Adding arpd user (UID=40)"
70         /usr/sbin/useradd -u 40 -r -d /var/lib/arpd -s /bin/false -c "arpd user" -g daemon arpd 1>&2
71 fi
72
73 %post
74 /sbin/chkconfig --add arpd
75 if [ ! -L /dev/arpd ]; then
76         echo "Moving /dev/arpd to /var/lib/arpd/arpd and making symlink"
77         mv -f /dev/arpd /var/lib/arpd
78         chown arpd /var/lib/arpd/arpd
79         ln -s /var/lib/arpd/arpd dev/arpd
80 fi
81 echo "You need arpd kernel support. The standard kernels of PLD lack this support!!"
82 if [ -f /var/lock/subsys/arpd ]; then
83         /etc/rc.d/init.d/arpd restart 1>&2
84 else
85         echo "Run \"/etc/rc.d/init.d/arpd start\" to start arpd daemon."
86 fi
87
88
89 %preun
90 /sbin/chkconfig --del arpd
91 if [ "$1" = "0" ]; then
92         if [ -f /var/lock/subsys/arpd ]; then
93                 /etc/rc.d/init.d/arpd stop 1>&2
94         fi
95         /sbin/chkconfig --del arpd
96         echo "Moving /var/lib/arpd/arpd to /dev/arpd and removing symlink"
97         rm -f /dev/arpd
98         mv -f /var/lib/arpd/arpd /dev/arpd
99         chown root:root /dev/arpd
100 fi
101
102 %postun
103 if [ "$1" = "0" ]; then
104         echo "Removing arpd user (UID=40)"
105         /usr/sbin/userdel arpd
106 fi
107
108 %clean
109 rm -rf $RPM_BUILD_ROOT
110
111 %files
112 %defattr(644,root,root,755)
113 %doc *.gz README.html
114 %attr(754,root,root) %{_sbindir}/arpd
115 %attr(754,root,root) /etc/rc.d/init.d/arpd
116 %dir %attr(750,arpd,root) /var/lib/arpd
This page took 0.082175 seconds and 4 git commands to generate.