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