]> git.pld-linux.org Git - packages/arpd.git/blob - arpd.spec
- Release 5
[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:        5
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 BuildRequires:  fakeroot
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 This is version which runs at UID=40.
33
34 %description -l pl
35 Demon ARP przekazuje zarz±dzanie tablic± ARP (Address Resolution
36 Protocol) z kernel'a do przestrzeni u¿ytkownika. Jest to bardzo
37 u¿yteczne dla miejsc o du¿ych segmentach sieci (256+ systemów na
38 segment), poniewa¿ tablice w j±drze nie s± zoptymalizowane na takie
39 sytuacje. Aby u¿ywaæ tego demona musisz mieæ ARPD support oraz NETLINK
40 support uaktywnione w j±drze. Uwaga! Stanadardowe j±dro PLD nie ma
41 supportu ARPD!!. Demon nie powinien byæ startowany bez tego!! Ta
42 wersja potrafi zaakceptowaæ 2048 pozycji.
43
44 Ta wersja pracuje na UID=40.
45
46 %prep
47 %setup  -q -n %{name}-%{version}.orig
48 %patch0 -p1
49 %patch1 -p1
50 %patch2 -p1
51 %patch3
52 %patch4 -p1
53
54 %build
55 %{__make}
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT/{usr/sbin,etc/rc.d/init.d,/var/lib/arpd}
60
61 install arpd $RPM_BUILD_ROOT%{_sbindir}/arpd
62 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/arpd
63
64 gzip -9nf CHANGES
65
66 # making device with fakeroot:
67 cd $RPM_BUILD_ROOT/var/lib/arpd
68 mknod arpd c 36 8
69
70 %pre
71 if [ -n "`id -u arpd 2>/dev/null`" ]; then
72         if [ "`id -u arpd`" != "40" ]; then
73                 echo "Warning: user arpd haven't uid=40. Correct this before installing arpd." 1>&2
74                 exit 1
75         fi
76 else
77         echo "Adding arpd user (UID=40)"
78         /usr/sbin/useradd -u 40 -r -d /var/lib/arpd -s /bin/false -c "arpd user" -g daemon arpd 1>&2
79 fi
80
81 %post
82 /sbin/chkconfig --add arpd
83 if [ -f /var/lock/subsys/arpd ]; then
84         /etc/rc.d/init.d/arpd restart 1>&2
85 else
86         echo "Run \"/etc/rc.d/init.d/arpd start\" to start arpd daemon."
87 fi
88
89
90 %preun
91 /sbin/chkconfig --del arpd
92 if [ "$1" = "0" ]; then
93         if [ -f /var/lock/subsys/arpd ]; then
94                 /etc/rc.d/init.d/arpd stop 1>&2
95         fi
96         /sbin/chkconfig --del arpd
97 fi
98
99 %postun
100 if [ "$1" = "0" ]; then
101         echo "Removing arpd user (UID=40)"
102         /usr/sbin/userdel arpd
103 fi
104
105 %clean
106 rm -rf $RPM_BUILD_ROOT
107
108 %files
109 %defattr(644,root,root,755)
110 %doc *.gz README.html
111 %attr(754,root,root) %{_sbindir}/arpd
112 %attr(754,root,root) /etc/rc.d/init.d/arpd
113 %dir %attr(750,arpd,root) /var/lib/arpd/*
This page took 0.08689 seconds and 4 git commands to generate.