]> arthur.barton.de Git - netatalk.git/blob - distrib/rpm/netatalk-mandrake.spec
call readt with ONE_DELAY = 5 s
[netatalk.git] / distrib / rpm / netatalk-mandrake.spec
1 #################################################### VERSIONING INFORMATION
2 %define name    netatalk
3 %define version 1.5pre6
4 %define release 1mdk
5 %define tardir  %{name}-%{version}
6
7 ################################################# BASIC PACKAGE INFORMATION
8 Summary: Appletalk and Appleshare/IP services for Linux
9 Name: %{name}
10 Version: %{version}
11 Release: %{release}
12 Copyright: BSD
13 Group: Networking/Daemons
14 Source0: %{name}-%{version}.tar.bz2
15 URL: http://netatalk.sourceforge.net/
16 Packager: rufus t firefly <rufus.t.firefly@linux-mandrake.com>
17 Obsoletes: netatalk-1.4b2+asun netatalk-1.4.99
18
19 ############################################################## REQUIREMENTS
20 Requires: cracklib, openssl, tcp_wrappers, pam
21 BuildRequires: cracklib-devel, openssl-devel, pam-devel
22
23 Prefix:    %{_prefix}
24 BuildRoot: %{_tmppath}/%{name}-buildroot
25
26 %description
27 netatalk is an implementation of the AppleTalk Protocol Suite for Unix/Linux
28 systems. The current release contains support for Ethertalk Phase I and II,
29 DDP, RTMP, NBP, ZIP, AEP, ATP, PAP, ASP, and AFP. It provides Appletalk file
30 printing and routing services on Solaris 2.5, Linux, FreeBSD, SunOS 4.1 and
31 Ultrix 4. It also supports AFP 2.1 and 2.2 (Appleshare IP).
32
33 %package devel
34 Group: Development/Networking
35 Summary: Appletalk and Appleshare/IP services for Linux development files
36 %description devel
37 netatalk is an implementation of the AppleTalk Protocol Suite for Unix/Linux
38 systems. The current release contains support for Ethertalk Phase I and II,
39 DDP, RTMP, NBP, ZIP, AEP, ATP, PAP, ASP, and AFP. It provides Appletalk file
40 printing and routing services on Solaris 2.5, Linux, FreeBSD, SunOS 4.1 and
41 Ultrix 4. It also supports AFP 2.1 and 2.2 (Appleshare IP).
42
43 This package is required for developing appletalk-based applications.
44
45 %changelog
46
47 * Thu Apr 12 2001 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
48   - v1.5pre6-1mdk
49   - pre-release 6 for sourceforge
50
51 * Wed Mar 07 2001 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
52   - v1.5pre5-1mdk
53   - pre-release 5 for sourceforge
54   - sync with redhat package
55
56 * Mon Dec 18 2000 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
57   - v1.5pre3-1mdk
58   - pre-release 3 for sourceforge
59   - moved away from 1.4.99 ... 
60
61 * Wed Nov 08 2000 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
62   - v1.4.99-0.20001108mdk
63   - pre-release 2 for sourceforge
64
65 * Wed Sep 27 2000 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
66   - v1.4.99-0.20000927mdk
67   - pre-release 1 for sourceforge
68
69 %prep
70 %setup -q -n %{tardir}/
71
72 %build
73 export LD_PRELOAD=
74 CFLAGS="$RPM_OPT_FLAGS -fomit-frame-pointer -fsigned-char" ./configure \
75         --prefix=%{prefix} \
76     --with-config-dir=/etc/atalk \
77         --with-uams-path=/etc/atalk/uams \
78     --with-message-dir=/etc/atalk/msg \
79         --enable-lastdid \
80         --enable-redhat \
81         --with-cracklib \
82         --with-pam \
83         --with-shadow \
84         --with-tcp-wrappers \
85         --with-ssl \
86         --enable-pgp-uam
87 make all
88
89 %install
90 ### INSTALL (USING "make install") ###
91 mkdir -p $RPM_BUILD_ROOT{%{prefix},/etc/atalk/{uams,msg}}
92 make DESTDIR=$RPM_BUILD_ROOT install-strip
93
94 # bzip2 man pages
95 for i in 1 3 4 5 8; do
96         bzip2 -v $RPM_BUILD_ROOT/usr/man/man$i/*.$i
97 done
98
99 %post
100 ### RUN CHKCONFIG ###
101 /sbin/chkconfig --add atalk
102 /sbin/ldconfig
103 # after the first install only
104 if [ "$1" = 1 ]; then
105         # add the ddp lines to /etc/services
106         if (grep '[0-9][0-9]*/ddp' /etc/services >/dev/null); then
107                 cat <<'_EOD1_' >&2
108 warning: The DDP services appear to be present in /etc/services.
109 warning: Please check them against services.atalk in the documentation.
110 _EOD1_
111                 true
112         else
113                 cat <<'_EOD2_' >>/etc/services
114 # start of DDP services
115 #
116 # Everything between the 'start of DDP services' and 'end of DDP services'
117 # lines will be automatically deleted when the netatalk package is removed.
118 #
119 rtmp            1/ddp           # Routing Table Maintenance Protocol
120 nbp             2/ddp           # Name Binding Protocol
121 echo            4/ddp           # AppleTalk Echo Protocol
122 zip             6/ddp           # Zone Information Protocol
123
124 afpovertcp      548/tcp         # AFP over TCP
125 afpovertcp      548/udp
126 # end of DDP services
127 _EOD2_
128         fi
129 fi
130
131 %preun
132 ### RUN CHKCONFIG ###
133 /sbin/chkconfig --del atalk
134
135 %postun
136 # do only for the last un-install
137 if [ "$1" = 0 ]; then
138         # remove the ddp lines from /etc/services
139         if (grep '^# start of DDP services$' /etc/services >/dev/null && \
140             grep '^# end of DDP services$'   /etc/services >/dev/null ); then
141           sed -e '/^# start of DDP services$/,/^# end of DDP services$/d' \
142             </etc/services >/tmp/services.tmp$$
143           cat /tmp/services.tmp$$ >/etc/services
144           rm /tmp/services.tmp$$
145         else
146           cat <<'_EOD3_' >&2
147 warning: Unable to find the lines `# start of DDP services` and
148 warning: `# end of DDP services` in the file /etc/services.
149 warning: You should remove the DDP services from /etc/services manually.
150 _EOD3_
151         fi
152 fi
153
154 %clean
155 rm -rf $RPM_BUILD_ROOT
156 rm -rf $RPM_BUILD_DIR/%{tardir}/
157
158 %files
159 %defattr(-,root,root)
160 %doc [A-Z][A-Z]* ChangeLog doc/[A-Z][A-Z]*
161 %dir /etc/atalk
162 %dir /etc/atalk/msg
163 %config /etc/atalk/Apple*
164 %config /etc/atalk/*.conf
165 %config /etc/pam.d/netatalk
166 %dir /etc/atalk/nls
167 /etc/atalk/nls/*
168 %dir /etc/atalk/uams
169 /etc/atalk/uams/*.so
170 /etc/rc.d/init.d/atalk
171 %{prefix}/bin/*
172 %{prefix}/sbin/*
173 %{prefix}/man/man*/*
174
175 %files devel
176 %defattr(-,root,root)
177 %{prefix}/lib/*.a
178 %dir %{prefix}/include/atalk
179 %{prefix}/include/atalk/*.h
180 %dir %{prefix}/include/netatalk
181 %{prefix}/include/netatalk/*.h
182 %{prefix}/share/aclocal/netatalk.m4