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