I think I fixed the pilot link package. This one was quite difficult,
since it had some hardcoded "i368" stuff in a Makefile. I produced a
patch to modify the Makefine if you're trying to build it on an alpha
(the same should also be done for sparc and ppc). I'm not happy with the
way it works, it's dirty, but it does get the job done. I do think
there's room for improvement.

Anyway, please take a look at the package, test it and merge into cooker
if possible.

Thanks,

Stefan

PS: I'll upload the src.rpm to /incoming. Someone else has already
uploaded a pilot-link package, I renamed mine to
pilot-link-0.9.3-12mdk.src.rpm.stefan.
--- pilot-link.spec.orig        Sat Aug 26 17:54:42 2000
+++ pilot-link.spec     Sat Aug 26 22:26:36 2000
@@ -1,16 +1,17 @@
 Summary:       File transfer utilities between Linux and PalmPilots
 Name:          pilot-link
 Version:       0.9.3
-Release:       11mdk
+Release:       12mdk
 
 Source:                
ftp://ryeham.ee.ryerson.ca/pub/PalmOS/pilot-link.%{version}.tar.bz2 
 Patch0:                pilot-link-perl-install.patch.bz2
 Patch3:                pilot-link-pixdir.patch.bz2
 Patch4:                pilot-link.0.9.3.perl5.6.patch.bz2
+Patch5:                pilot-link.0.9.3.perl-Makefile-alpha.patch.bz2
 
 Copyright:     GPL
 Group:         Communications
-BuildRoot:     /var/tmp/%{name}-root
+BuildRoot:     %{_tmppath}/%{name}-root
 Requires:      perl
 
 %description
@@ -43,6 +44,11 @@
 %patch3 -p1 -b .pixdir
 %patch4 -p1 -b .perl
 
+# Each non-x86 platform needs to have the Makefile.in patched
+%ifarch alpha
+%patch5 -p1 -b .alpha
+%endif
+
 %build
 %configure
 make
@@ -50,16 +56,19 @@
 cd Perl5
 perl Makefile.PL
 make OPTIMIZE="$RPM_OPT_FLAGS"
-mv Makefile Makefile.mdk
-cat Makefile.mdk | sed 's/PREFIX = \/usr/PREFIX = \/var\/tmp\/pilot-link-root\/usr/' 
> Makefile
 cd ..
 
 %install
-make install prefix=$RPM_BUILD_ROOT/usr
+%makeinstall \
+       prefix=$RPM_BUILD_ROOT%{prefix} \
+       mandir1=$RPM_BUILD_ROOT%{_mandir}/man1 \
+       mandir7=$RPM_BUILD_ROOT%{_mandir}/man7
 cd Perl5
-make install OPTIMIZE="$RPM_OPT_FLAGS"
+%makeinstall \
+       PREFIX=$RPM_BUILD_ROOT/usr \
+       OPTIMIZE="$RPM_OPT_FLAGS"
 cd ..
-mv $RPM_BUILD_ROOT/usr/lib/perl5/site_perl/i386-linux/ 
$RPM_BUILD_ROOT/usr/lib/perl5/site_perl/5.005/
+mv $RPM_BUILD_ROOT%{_libdir}/perl5/site_perl/%{_arch}-linux/ 
+$RPM_BUILD_ROOT%{_libdir}/perl5/site_perl/5.005/
 
 %post -p /sbin/ldconfig
 
@@ -71,23 +80,30 @@
 %files
 %defattr(-,root,root)
 %doc COPYING ChangeLog README TODO
-/usr/lib/perl5/site_perl/5.005/auto/*
-/usr/lib/perl5/site_perl/5.005/PDA/*
-/usr/lib/libpisock.so.3.0.1
-/usr/lib/libpisock.so.3
-/usr/lib/pilot-link/*
-/usr/bin/*
-/usr/man/man*/*
+%{_libdir}/perl5/site_perl/5.005/auto/*
+%{_libdir}/perl5/site_perl/5.005/PDA/*
+%{_libdir}/libpisock.so.3.0.1
+%{_libdir}/libpisock.so.3
+%{_libdir}/pilot-link/*
+%{_bindir}/*
+%{_mandir}/man*/*
 
 %files devel
 %defattr(-,root,root)
-/usr/lib/libpicc.a
-/usr/lib/libpisock.a
-/usr/lib/libpisock.so
-/usr/lib/libpisock.la
-/usr/include/*
+%{_libdir}/libpicc.a
+%{_libdir}/libpisock.a
+%{_libdir}/libpisock.so
+%{_libdir}/libpisock.la
+%{_includedir}/*
 
 %changelog
+* Sat Aug 26 2000 Stefan van der Eijk <[EMAIL PROTECTED]> 0.9.3-12mdk
+- BM
+- set RPM_BUILD_ROOT to %{_tmppath}/%{name}-root
+- some macro's
+- cleanup of .spec file
+- fix for build on alpha (todo: other non x86 platforms)
+
 * Wed May 17 2000 David BAUENS <[EMAIL PROTECTED]> 0.9.3-11mdk
 - Fix build for i486
 

Reply via email to