]> arthur.barton.de Git - netatalk.git/blob - distrib/rpm/netatalk-mandrake.spec
updated spec files for release
[netatalk.git] / distrib / rpm / netatalk-mandrake.spec
1 #################################################### VERSIONING INFORMATION
2 %define name    netatalk
3 %define version 1.5pre5
4 %define release 1mdk
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.bz2
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: cracklib-devel, openssl-devel, pam-devel
21
22 Prefix:    %{_prefix}
23 BuildRoot: %{_tmppath}/%{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 2000 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
47   - v1.5pre5-1mdk
48   - pre-release 5 for sourceforge
49   - sync with redhat package
50
51 * Mon Dec 18 2000 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
52   - v1.5pre3-1mdk
53   - pre-release 3 for sourceforge
54   - moved away from 1.4.99 ... 
55
56 * Wed Nov 08 2000 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
57   - v1.4.99-0.20001108mdk
58   - pre-release 2 for sourceforge
59
60 * Wed Sep 27 2000 rufus t firefly <rufus.t.firefly@linux-mandrake.com>
61   - v1.4.99-0.20000927mdk
62   - pre-release 1 for sourceforge
63
64 %prep
65 %setup -q -n netatalk-%{version}/
66
67 %build
68 ./autogen.sh
69 CFLAGS="$RPM_OPT_FLAGS -fomit-frame-pointer -fsigned-char" ./configure \
70         --prefix=%{prefix} \
71         --enable-lastdid \
72         --enable-redhat \
73         --with-cracklib \
74         --with-pam \
75         --with-shadow \
76         --with-tcp-wrappers \
77         --with-flock-locks \
78         --with-ssl
79 make all
80
81 %install
82 ### INSTALL (USING "make install") ###
83 mkdir -p $RPM_BUILD_ROOT/usr
84 make DESTDIR=$RPM_BUILD_ROOT install-strip
85
86 # bzip2 man pages
87 for i in 1 3 4 5 8; do
88         bzip2 -v $RPM_BUILD_ROOT/usr/man/man$i/*.$i
89 done
90
91 %post
92 ### RUN CHKCONFIG ###
93 /sbin/chkconfig --add atalk
94 /sbin/ldconfig
95 # after the first install only
96 if [ "$1" = 1 ]; then
97         # add the ddp lines to /etc/services
98         if (grep '[0-9][0-9]*/ddp' /etc/services >/dev/null); then
99                 cat <<'_EOD1_' >&2
100 warning: The DDP services appear to be present in /etc/services.
101 warning: Please check them against services.atalk in the documentation.
102 _EOD1_
103                 true
104         else
105                 cat <<'_EOD2_' >>/etc/services
106 # start of DDP services
107 #
108 # Everything between the 'start of DDP services' and 'end of DDP services'
109 # lines will be automatically deleted when the netatalk package is removed.
110 #
111 rtmp            1/ddp           # Routing Table Maintenance Protocol
112 nbp             2/ddp           # Name Binding Protocol
113 echo            4/ddp           # AppleTalk Echo Protocol
114 zip             6/ddp           # Zone Information Protocol
115
116 afpovertcp      548/tcp         # AFP over TCP
117 afpovertcp      548/udp
118 # end of DDP services
119 _EOD2_
120         fi
121 fi
122
123 %preun
124 ### RUN CHKCONFIG ###
125 /sbin/chkconfig --del atalk
126
127 %postun
128 # do only for the last un-install
129 if [ "$1" = 0 ]; then
130         # remove the ddp lines from /etc/services
131         if (grep '^# start of DDP services$' /etc/services >/dev/null && \
132             grep '^# end of DDP services$'   /etc/services >/dev/null ); then
133           sed -e '/^# start of DDP services$/,/^# end of DDP services$/d' \
134             </etc/services >/tmp/services.tmp$$
135           cat /tmp/services.tmp$$ >/etc/services
136           rm /tmp/services.tmp$$
137         else
138           cat <<'_EOD3_' >&2
139 warning: Unable to find the lines `# start of DDP services` and
140 warning: `# end of DDP services` in the file /etc/services.
141 warning: You should remove the DDP services from /etc/services manually.
142 _EOD3_
143         fi
144 fi
145
146 %clean
147 rm -rf $RPM_BUILD_ROOT
148
149 %files
150 %defattr(-,root,root)
151 %doc [A-Z][A-Z]* ChangeLog doc/[A-Z][A-Z]*
152 %dir /etc/atalk
153 %config /etc/atalk/Apple*
154 %config /etc/atalk/*.conf
155 %config /etc/pam.d/netatalk
156 %dir /etc/atalk/nls
157 /etc/atalk/nls/*
158 %dir /etc/atalk/uams
159 /etc/atalk/uams/*.so
160 /etc/rc.d/init.d/atalk
161 %{prefix}/bin/*
162 %{prefix}/sbin/*
163 %{prefix}/man/man*/*
164
165 %files devel
166 %defattr(-,root,root)
167 %{prefix}/lib/*.a
168 %dir %{prefix}/include/atalk
169 %{prefix}/include/atalk/*.h
170 %dir %{prefix}/include/netatalk
171 %{prefix}/include/netatalk/*.h
172 %{prefix}/share/aclocal/netatalk.m4