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