- Perl bindings need to be compiled after libpisock is installed

0.12.2-6
- Enable Perl bindings
- Include important docs such as README.usb
This commit is contained in:
alexlan 2007-11-14 06:33:37 +00:00
parent cf4f2aa753
commit a39b4d829f

View File

@ -1,11 +1,11 @@
%define support_perl 0
%define perl_version 5.8.0
%define support_perl 1
%define perl_version %(eval "`%{__perl} -V:version`"; echo $version)
Name: pilot-link
Version: 0.12.2
Release: 5%{?dist}
Release: 7%{?dist}
Epoch: 2
License: GPLv2 and GPLv2+ and LGPLv2+ and tcl
License: GPLv2 and GPLv2+ and LGPLv2+ and TCL
Group: Applications/Communications
Summary: File transfer utilities between Linux and PalmPilots
URL: http://www.pilot-link.org/
@ -22,7 +22,8 @@ Patch6: pilot-link-0.12.2-open.patch
Requires: /sbin/ldconfig
%if %{support_perl}
BuildRequireseq: perl
Requires: perl(:MODULE_COMPAT_%{perl_version})
BuildRequires: perl(ExtUtils::MakeMaker)
%endif
BuildRequires: libpng-devel
@ -91,23 +92,30 @@ make
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot} libdir=%{_libdir}
make install -C doc/man DESTDIR=%{buildroot} libdir=%{_libdir}
%if %{support_perl}
if test -f bindings/Perl/Makefile.PL ; then
cd bindings/Perl
perl -pi -e 's|^\$libdir =.*|\$libdir = "%{buildroot}%{_libdir}";|g' Makefile.PL
CFLAGS="%{optflags}" perl Makefile.PL PREFIX=%{buildroot}%{_prefix} INSTALLDIRS=vendor
CFLAGS="%{optflags}" %{__perl} Makefile.PL INSTALLDIRS=vendor
make -B || :
make
cd ../..
fi
%endif
make install DESTDIR=%{buildroot} libdir=%{_libdir}
make install -C doc/man DESTDIR=%{buildroot} libdir=%{_libdir}
%if %{support_perl}
make install -C bindings/Perl
rm -f %{buildroot}%{_libdir}/perl5/vendor_perl/%{perl_version}/*/auto/PDA/Pilot/Pilot.bs \
%{buildroot}%{_libdir}/perl5/site_perl/*/*/*/PDA/Pilot/.packlist
cd bindings/Perl
make pure_install PERL_INSTALL_ROOT=%{buildroot}
cd ../..
# remove files and fix perms
find %{buildroot}%{_libdir}/perl5/ -type f -name '.packlist' -exec rm -f {} \;
find %{buildroot}%{_libdir}/perl5/ -type f -name '*.bs' -size 0 -exec rm -f {} \;
find %{buildroot}%{_libdir}/perl5/ -type f -name '*.so' -exec chmod 0755 {} \;
rm -f %{buildroot}%{_libdir}/perl5/*/*/perllocal.pod
rm -f %{buildroot}%{_libdir}/perl5/*/*/*/PDA/dump.pl
%else
rm -f %{buildroot}%{_mandir}/man1/ietf2datebook*
%endif
@ -127,11 +135,11 @@ rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc COPYING ChangeLog README NEWS
%doc COPYING ChangeLog README NEWS doc/README.usb doc/README.debugging doc/README.libusb
%{_libdir}/*.so.*
%if %{support_perl}
%{_libdir}/perl5/vendor_perl/*/*/*/PDA
%{_libdir}/perl5/vendor_perl/*/*/PDA
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/PDA*
%endif
%{_bindir}/*
%{_datadir}/pilot-link
@ -146,6 +154,13 @@ rm -rf %{buildroot}
%{_datadir}/aclocal/*.m4
%changelog
* Mon Nov 12 2007 Alex Lancaster <alexl@users.sourceforge.net> - 2:0.12.2-7
- Perl bindings need to be compiled after libpisock is installed
* Mon Nov 12 2007 Alex Lancaster <alexl@users.sourceforge.net> - 2:0.12.2-6
- Enable Perl bindings
- Include important docs such as README.usb
* Tue Aug 29 2007 Ivana Varekova <varekova@redhat.com> - 2:0.12.2-5
- Rebuild for selinux ppc32 issue.
- fix open function calls