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