diff --git a/.cvsignore b/.cvsignore index f3bc8f8..c5d2ff9 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,3 +1,4 @@ lftp-3.2.1.tar.bz2 lftp-3.3.0.tar.bz2 lftp-3.3.0.tar.bz2.asc +String-CRC32-1.3.tar.gz diff --git a/lftp.spec b/lftp.spec index e00f799..42684bc 100644 --- a/lftp.spec +++ b/lftp.spec @@ -6,9 +6,12 @@ License: GPL Group: Applications/Internet Source0: http://ftp.yars.free.net/pub/software/unix/net/ftp/client/lftp/lftp-%{version}.tar.bz2 Source1: http://ftp.yars.free.net/pub/software/unix/net/ftp/client/lftp/lftp-%{version}.tar.bz2.asc +#Source2: http://search.cpan.org/CPAN/authors/id/S/SO/SOENKE/String-CRC32-1.3.tar.gz +Source2: String-CRC32-1.3.tar.gz URL: http://lftp.yar.ru/ BuildRoot: %{_tmppath}/%{name}-%{version}-root -BuildPrereq: ncurses-devel, openssl-devel, pkgconfig, readline-devel +BuildPrereq: ncurses-devel, openssl-devel, pkgconfig, readline-devel, perl +Provides: perl(String::CRC32), perl-String-CRC32 %description LFTP is a sophisticated ftp/http file transfer program. Like bash, it has job @@ -28,6 +31,11 @@ LDFLAGS="-L`pwd`/src/.libs $LDFLAGS"; export LDFLAGS %configure --with-modules --disable-static --with-ssl --with-debug export tagname=CC make LIBTOOL=%{_bindir}/libtool +gunzip < %SOURCE2 | tar -xpf - +pushd String-CRC32-1.3 +CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL PREFIX=$RPM_BUILD_ROOT%{_prefix} < /dev/null +make OPTIMIZE="$RPM_OPT_FLAGS" +popd %install rm -rf $RPM_BUILD_ROOT @@ -36,11 +44,22 @@ export tagname=CC rm -f $RPM_BUILD_ROOT%{_libdir}/lftp/%{version}/*.la chmod 0755 $RPM_BUILD_ROOT%{_libdir}/lftp/* chmod 0755 $RPM_BUILD_ROOT%{_libdir}/lftp/%{version}/*.so - # Remove files from $RPM_BUILD_ROOT that we aren't shipping. rm -f $RPM_BUILD_ROOT%{_libdir}/lftp/%{version}/*.a - +# Build the String::CRC32 module, required by new verify-file script +pushd String-CRC32-1.3 >/dev/null 2>&1 +eval `perl '-V:installarchlib' '-V:installprefix' '-V:installstyle'` +perldir=${installprefix}/${installstyle} +mkdir -p $RPM_BUILD_ROOT$installarchlib +%makeinstall +# Remove files from String::CRC32 that could cause problems (from cpanflute2): +find $RPM_BUILD_ROOT$perldir -type f -a \( -name perllocal.pod -o -name .packlist \ + -o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';' +find $RPM_BUILD_ROOT$perldir -type d -depth -exec rmdir {} 2>/dev/null ';' +popd >/dev/null 2>&1 %find_lang %{name} +# append String::CRC32 module files onto .lang files list: +find $RPM_BUILD_ROOT$perldir -type f | sed "s#$RPM_BUILD_ROOT##" >> %{name}.lang %clean rm -rf $RPM_BUILD_ROOT diff --git a/sources b/sources index a7c0771..e225327 100644 --- a/sources +++ b/sources @@ -1,2 +1,3 @@ 5f06462c88618ecd61db8e46ef494bc3 lftp-3.3.0.tar.bz2 3ac945ba9b5ae8b819ddd5e3813216ec lftp-3.3.0.tar.bz2.asc +7683cd1b183a6af807f20ee5fd076d0b String-CRC32-1.3.tar.gz