#################################################### VERSIONING INFORMATION %define name netatalk %define version 1.5.5 %define release 1 %define tardir %{name}-%{version} ################################################# BASIC PACKAGE INFORMATION Summary: Appletalk and Appleshare/IP services for Linux Name: %{name} Version: %{version} Release: %{release} Packager: Troy Engel License: BSD Group: System Environment/Daemons Source0: %{name}-%{version}.tar.gz URL: http://netatalk.sourceforge.net/ # Wrap the find-requires to get rid of janky stuff Source1: netatalk-filter-requires.sh %define __find_requires %SOURCE1 ############################################################## REQUIREMENTS Requires: cracklib, openssl, tcp_wrappers, pam >= 0.56 BuildRequires: cracklib, openssl-devel, pam-devel Prefix: %{_prefix} BuildRoot: %{_tmppath}/%{name}-buildroot %description netatalk is an implementation of the AppleTalk Protocol Suite for Unix/Linux systems. The current release contains support for Ethertalk Phase I and II, DDP, RTMP, NBP, ZIP, AEP, ATP, PAP, ASP, and AFP. It provides Appletalk file printing and routing services on Solaris 2.5, Linux, FreeBSD, SunOS 4.1 and Ultrix 4. It also supports AFP 2.1 and 2.2 (Appleshare IP). %package devel Group: Development/Libraries Summary: Appletalk and Appleshare/IP services for Linux development files Requires: netatalk >= %{version} %description devel netatalk is an implementation of the AppleTalk Protocol Suite for Unix/Linux systems. The current release contains support for Ethertalk Phase I and II, DDP, RTMP, NBP, ZIP, AEP, ATP, PAP, ASP, and AFP. It provides Appletalk file printing and routing services on Solaris 2.5, Linux, FreeBSD, SunOS 4.1 and Ultrix 4. It also supports AFP 2.1 and 2.2 (Appleshare IP). This package is required for developing appletalk-based applications. %prep %setup -q -n %{tardir}/ %build export LD_PRELOAD= CFLAGS="$RPM_OPT_FLAGS -fomit-frame-pointer -fsigned-char" ./configure \ --prefix=%{prefix} \ --with-message-dir=%{_libdir}/netatalk/msg \ --with-nls-dir=%{_libdir}/netatalk/nls \ --enable-fhs \ --enable-lastdid \ --enable-redhat \ --enable-pgp-uam \ --enable-timelord \ --with-cracklib \ --with-pam \ --with-shadow \ --with-tcp-wrappers \ --with-ssl make all # make maccode.* codepage files ./etc/afpd/nls/makecode %install ### clean up zero-byte doc files find $RPM_BUILD_DIR/%{tardir} -size 0 |xargs rm -f ### INSTALL (USING "make install") ### mkdir -p $RPM_BUILD_ROOT{%{prefix},%{_sysconfdir}/netatalk/} mkdir -p $RPM_BUILD_ROOT/%{_libdir}/netatalk mkdir -p $RPM_BUILD_ROOT/%{_libdir}/netatalk/msg mkdir -p $RPM_BUILD_ROOT/%{_libdir}/netatalk/nls ### breaks on perl script - let rpm strip #make DESTDIR=$RPM_BUILD_ROOT install-strip make DESTDIR=$RPM_BUILD_ROOT install ### copy config files - install doesn't do it now cp $RPM_BUILD_DIR/%{tardir}/config/*.conf $RPM_BUILD_ROOT%{_sysconfdir}/netatalk/ cp $RPM_BUILD_DIR/%{tardir}/config/AppleVolumes.* $RPM_BUILD_ROOT%{_sysconfdir}/netatalk/ ### remove file that conflicts witht he kernel rm -f $RPM_BUILD_ROOT/%{prefix}/include/netatalk/at.h || : ### bzip2 man pages for i in 1 3 4 5 8; do bzip2 $RPM_BUILD_ROOT/%{_mandir}/man$i/*.$i done %post ### RUN CHKCONFIG ### /sbin/chkconfig --add atalk /sbin/ldconfig ### after the first install only if [ "$1" = 1 ]; then # add the ddp lines to /etc/services if (grep '[0-9][0-9]*/ddp' /etc/services >/dev/null); then cat <<'_EOD1_' >&2 warning: The DDP services appear to be present in /etc/services. warning: Please check them against services.atalk in the documentation. _EOD1_ true else cat <<'_EOD2_' >>/etc/services # start of DDP services # # Everything between the 'start of DDP services' and 'end of DDP services' # lines will be automatically deleted when the netatalk package is removed. # rtmp 1/ddp # Routing Table Maintenance Protocol nbp 2/ddp # Name Binding Protocol echo 4/ddp # AppleTalk Echo Protocol zip 6/ddp # Zone Information Protocol afpovertcp 548/tcp # AFP over TCP afpovertcp 548/udp # end of DDP services _EOD2_ fi fi %preun ### RUN CHKCONFIG ### if [ "$1" = "0" ] ; then /sbin/service atalk stop > /dev/null 2>&1 /sbin/chkconfig --del atalk fi %postun ### do only for the last un-install if [ "$1" = 0 ]; then # remove the ddp lines from /etc/services if (grep '^# start of DDP services$' /etc/services >/dev/null && \ grep '^# end of DDP services$' /etc/services >/dev/null ); then sed -e '/^# start of DDP services$/,/^# end of DDP services$/d' \ /etc/services.tmp$$ cat /etc/services.tmp$$ >/etc/services rm /etc/services.tmp$$ else cat <<'_EOD3_' >&2 warning: Unable to find the lines `# start of DDP services` and warning: `# end of DDP services` in the file /etc/services. warning: You should remove the DDP services from /etc/services manually. _EOD3_ fi fi %clean rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_DIR/%{tardir}/ %files %defattr(-,root,root) %doc ChangeLog CHANGES CONTRIBUTORS COPYING COPYRIGHT NEWS README TODO %doc doc/ %dir %{_sysconfdir}/netatalk %dir %{_libdir}/netatalk %dir %{_libdir}/netatalk/msg %dir %{_libdir}/netatalk/nls %config(noreplace) %{_sysconfdir}/netatalk/Apple* %config(noreplace) %{_sysconfdir}/netatalk/*.conf %config(noreplace) %{_sysconfdir}/pam.d/netatalk %config(noreplace) %attr(755,root,root) %{_initrddir}/atalk %{_libdir}/netatalk/*.so %{_libdir}/netatalk/nls/* %{prefix}/bin/* %{prefix}/sbin/* %{_mandir}/man*/* %files devel %defattr(-,root,root) %dir %{prefix}/include/atalk %dir %{prefix}/include/netatalk %{prefix}/lib/*.*a %{prefix}/lib/netatalk/*.*a %{prefix}/include/atalk/*.h %{prefix}/include/netatalk/*.h %{prefix}/share/aclocal/netatalk.m4 %changelog * Mon Sep 23 2002 Troy Engel 1.5.5-1rh7 - Update to 1.5.5 release - Remove configure patches (nls-dir and message-dir now work) * Mon Apr 01 2002 Troy Engel 1.5.3.1-2rh7 - Wrap the find-requires in the new rpm to get rid of some seemingly janky stuff it's adding * Sat Mar 30 2002 Troy Engel 1.5.3.1-1rh7 - Upgraded to 1.5.3.1 - Added --with-nls-dir and removed previous patch for NLSDIR, and added new patch for NLSDIR because it's still broken - Patched SERVERTEXT (--with-message-dir) to work correctly - Removed BUGS from docfiles - Changed RPM Group to System Environment from Networking - Cleaned up Requires/BuildRequires lines - Remove conflicting "at.h" file in -devel (kernel provides) - Cleaned up the preun section a tad - Pull in uams from the new proper location - Made -devel require netatalk >= [current version] * Mon Feb 18 2002 Troy Engel 1.5.2-1rh7 - Upgraded to 1.5.2 - Fixed --with-msg-dir to --with-message-dir - Using "--enable-fhs" now, which means all your configs go into /etc/netatalk/, not /etc/atalk. This changes the libdir to /usr/lib/netatalk/ (from ../atalk/) as well. All your files are belong to FHS. PID files also end up in /var/run/ with this. - Patched ./configure to place uams and msgs into respective locations within /usr/lib/netatalk/xxx/ - Added codepage creation (from Mandrake, thx), installation - Man pages no longer need moved after bzipping * Mon Jan 28 2002 Troy Engel 1.5.1.1-1rh7 - Upgraded to 1.5.1.1 - Added Packager line for rpmfind.net * Fri Jan 4 2002 Troy Engel 1.5.0-2rh7 - Changed --with-config-dir to --with-pkgconfdir (duh) * Fri Jan 4 2002 Troy Engel 1.5.0-1rh7 - RedHat-ized the Mandrake stuff - cleaned up spec, minor mods * Wed Jan 2 2002 Stew Benedict 1.5.0-1mdk - 1.5 release, spec mods * Thu Nov 8 2001 Stew Benedict 1.5_pre6-1mdk - SRPM from sourceforge - cleanup spec a bit - rpmlint/FHS conformance * Thu Apr 12 2001 rufus t firefly - v1.5pre6-1mdk - pre-release 6 for sourceforge * Wed Mar 07 2001 rufus t firefly - v1.5pre5-1mdk - pre-release 5 for sourceforge - sync with redhat package * Mon Dec 18 2000 rufus t firefly - v1.5pre3-1mdk - pre-release 3 for sourceforge - moved away from 1.4.99 ... * Wed Nov 08 2000 rufus t firefly - v1.4.99-0.20001108mdk - pre-release 2 for sourceforge * Wed Sep 27 2000 rufus t firefly - v1.4.99-0.20000927mdk - pre-release 1 for sourceforge