- split perl subpackage (461758) - thanks Peter Robinson

- spec file cleanup
This commit is contained in:
Ivana Varekova 2008-09-19 11:27:03 +00:00
parent 4144d0efa3
commit e5a3ac4851
1 changed files with 48 additions and 40 deletions

View File

@ -1,9 +1,8 @@
%define support_perl 1
%define perl_version %(eval "`%{__perl} -V:version`"; echo $version)
Name: pilot-link
Version: 0.12.3
Release: 16%{?dist}
Release: 17%{?dist}
Epoch: 2
License: GPLv2 and GPLv2+ and LGPLv2+ and TCL
Group: Applications/Communications
@ -26,15 +25,10 @@ Patch8: bluetooth-session-register.diff
Patch9: pilot-link-0.12.2-Zire.patch
Patch10: pilot-link-0.12.3-clio.patch
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
%if %{support_perl}
Requires: perl(:MODULE_COMPAT_%{perl_version})
BuildRequires: perl(ExtUtils::MakeMaker)
%endif
BuildRequires: libpng-devel
BuildRequires: readline-devel
BuildRequires: autoconf
@ -61,7 +55,6 @@ Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: libpng-devel
Requires: readline-devel
%description devel
This package contains the development headers that are used to build
the pilot-link package. It also includes the static libraries
@ -70,19 +63,30 @@ necessary to build static pilot applications.
If you want to develop PalmPilot synchronizing applications, you'll
need to install pilot-link-devel.
%package perl
Summary: PalmPilot utilies written in perl
Group: Applications/Communications
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: perl(:MODULE_COMPAT_%{perl_version})
%description perl
This package contains utilities that depend on perl
%prep
%setup -q
%patch4 -p1 -b .var
%if %{support_perl}
#%patch1 -p1 -b .perlmd5
#%patch2 -p1 -b .perlpollute
#%patch3 -p1 -b .malsync
%endif
%patch6 -p1 -b .open
%patch7 -p1 -b .md5
%patch8 -p0 -b .bluetooth-sdp
%patch9 -p1 -b .Zire
%patch10 -p1 -b .clio
iconv -f windows-1252 -t UTF8 doc/README.usb > doc/README.usb.aux
mv doc/README.usb.aux doc/README.usb
iconv -f windows-1252 -t UTF8 ChangeLog > ChangeLog.aux
mv ChangeLog.aux ChangeLog
iconv -f windows-1252 -t UTF8 NEWS > NEWS.aux
mv NEWS.aux NEWS
%build
autoreconf -is
@ -93,11 +97,7 @@ CFLAGS="%{optflags}" %configure \
--with-tcl=no \
--with-java=no \
--with-cpp=yes \
%if %{support_perl}
--with-perl=yes \
%else
--with-perl=no \
%endif
--enable-conduits \
--enable-libusb
@ -109,7 +109,6 @@ 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
@ -118,21 +117,16 @@ if test -f bindings/Perl/Makefile.PL ; then
make
cd ../..
fi
%endif
%if %{support_perl}
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
cd bindings/Perl
make pure_install PERL_INSTALL_ROOT=%{buildroot} %{?_smp_mflags}
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
# remove files we don't want to include
rm -f %{buildroot}%{_libdir}/*.la
@ -163,24 +157,38 @@ rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc COPYING ChangeLog README NEWS doc/README.usb doc/README.debugging doc/README.libusb README.fedora
%config(noreplace) %{_sysconfdir}/modprobe.d/blacklist-visor
%{_libdir}/*.so.*
%if %{support_perl}
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/PDA*
%endif
%{_bindir}/*
%exclude %{_bindir}/pilot-ietf2datebook
%exclude %{_bindir}/pilot-sync-plan
%exclude %{_bindir}/pilot-undelete
%{_datadir}/pilot-link
%{_mandir}/man?/*
%config(noreplace) %{_sysconfdir}/modprobe.d/blacklist-visor
%exclude %{_mandir}/man1/ietf2datebook*
%files devel
%defattr(-,root,root)
%defattr(-,root,root,-)
%{_libdir}/*.so
%{_libdir}/pkgconfig/*
%{_includedir}/*
%{_datadir}/aclocal/*.m4
%files perl
%defattr(-,root,root,-)
%{_bindir}/pilot-ietf2datebook
%{_bindir}/pilot-sync-plan
%{_bindir}/pilot-undelete
%{_mandir}/man1/ietf2datebook*
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/PDA*
%changelog
* Fri Sep 19 2008 Ivana Varekova <varekova@redhat.com> - 2:0.12.3-17
- split perl subpackage (461758) - thanks Peter Robinson
- spec file cleanup
* Fri Sep 19 2008 Ivana Varekova <varekova@redhat.com> - 2:0.12.3-16
- add clio patch (454178) - thanks Michael Ekstrand
@ -215,7 +223,7 @@ rm -rf %{buildroot}
* Fri Jan 11 2008 Ivana Varekova <varekova@redhat.com> - 2:0.12.3-6
- Synchronize with F-8 branch:
- remove visor modul remove from %post script
- remove visor modul remove from %%post script
- Change README.fedora use "ttyUSB[13579]" in 60-pilot.rules
* Wed Jan 09 2008 - Bastien Nocera <bnocera@redhat.com> - 2:0.12.3-5
@ -225,7 +233,7 @@ rm -rf %{buildroot}
* Mon Jan 7 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 2:0.12.3-4
- Synchronize with F-8 branch:
- Add README.fedora and visor configs as fallbacks (#280251: thanks Kevin Page)
- Don't tag HAL/PolicyKit files as %config (#427840)
- Don't tag HAL/PolicyKit files as %%config (#427840)
- Remove visor module if currently loaded (#280251)
* Fri Jan 4 2008 Alex Lancaster <alexlan[AT]fedoraproject org> - 2:0.12.3-3