From 8219eb57475366faf06e95c85235c12e11246060 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Wed, 13 May 2015 07:09:01 +0700 Subject: perl/perl-lwp-useragent-cached: Added (UserAgent caching mechanism). Signed-off-by: Willy Sudiarto Raharjo --- perl/perl-lwp-useragent-cached/README | 5 ++ .../no_test_requires.diff | 38 ++++++++++ .../perl-lwp-useragent-cached.SlackBuild | 87 ++++++++++++++++++++++ .../perl-lwp-useragent-cached.info | 10 +++ perl/perl-lwp-useragent-cached/slack-desc | 19 +++++ 5 files changed, 159 insertions(+) create mode 100644 perl/perl-lwp-useragent-cached/README create mode 100644 perl/perl-lwp-useragent-cached/no_test_requires.diff create mode 100644 perl/perl-lwp-useragent-cached/perl-lwp-useragent-cached.SlackBuild create mode 100644 perl/perl-lwp-useragent-cached/perl-lwp-useragent-cached.info create mode 100644 perl/perl-lwp-useragent-cached/slack-desc (limited to 'perl') diff --git a/perl/perl-lwp-useragent-cached/README b/perl/perl-lwp-useragent-cached/README new file mode 100644 index 0000000000..e3700fdfc6 --- /dev/null +++ b/perl/perl-lwp-useragent-cached/README @@ -0,0 +1,5 @@ +perl-lwp-useragent-cached (LWP::UserAgent caching mechanism) + +LWP::UserAgent::Cached is yet another LWP::UserAgent subclass with cache +support. It stores cache in the files on local filesystem and if response +already available in the cache returns it instead of making HTTP request. diff --git a/perl/perl-lwp-useragent-cached/no_test_requires.diff b/perl/perl-lwp-useragent-cached/no_test_requires.diff new file mode 100644 index 0000000000..91f6f03ba6 --- /dev/null +++ b/perl/perl-lwp-useragent-cached/no_test_requires.diff @@ -0,0 +1,38 @@ +diff -Naur LWP-UserAgent-Cached-0.06/Makefile.PL LWP-UserAgent-Cached-0.06.patched/Makefile.PL +--- LWP-UserAgent-Cached-0.06/Makefile.PL 2014-06-27 13:32:55.000000000 -0400 ++++ LWP-UserAgent-Cached-0.06.patched/Makefile.PL 2015-05-12 18:40:40.000000000 -0400 +@@ -4,33 +4,7 @@ + # See lib/ExtUtils/MakeMaker.pm for details of how to influence + # the contents of the Makefile that is written. + +-my %test_requires = ( +- 'Test::Mock::LWP::Dispatch' => 0.02, +- 'File::Temp' => 0 +-); +- +-my $not_installed_test_modules = ''; +-while (my ($module, $ver) = each %test_requires) { +- +- eval "use $module $ver"; +- if ($@) { +- $not_installed_test_modules .= "\t$module $ver\n"; +- } +-} +- +-if ($not_installed_test_modules) { +- my $choose = prompt( +- "We need few optional additional modules to test this package on your system:\n". +- $not_installed_test_modules. +- "If you'll choose `n' this tests will be skipped.\n". +- "Append this modules to installation queue?", +- "y" +- ); +- +- if ($choose =~ /n/) { +- %test_requires = (); +- } +-} ++my %test_requires = (); + + $test_requires{'Test::More'} = 0.88; + diff --git a/perl/perl-lwp-useragent-cached/perl-lwp-useragent-cached.SlackBuild b/perl/perl-lwp-useragent-cached/perl-lwp-useragent-cached.SlackBuild new file mode 100644 index 0000000000..0b7fc10019 --- /dev/null +++ b/perl/perl-lwp-useragent-cached/perl-lwp-useragent-cached.SlackBuild @@ -0,0 +1,87 @@ +#!/bin/sh + +# Slackware build script for perl-lwp-useragent-cached + +# Written by B. Watson (yalhcru@gmail.com) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +PRGNAM=perl-lwp-useragent-cached +VERSION=${VERSION:-0.06} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +SRCNAM="LWP-UserAgent-Cached" + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.gz +cd $SRCNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# it wants to interactively ask whether to automatically install +# Test::Mock::LWP::Dispatch for its tests. Don't let it. +patch -p1 < $CWD/no_test_requires.diff + +perl Makefile.PL \ + PREFIX=/usr \ + INSTALLDIRS=vendor \ + INSTALLVENDORMAN1DIR=/usr/man/man1 \ + INSTALLVENDORMAN3DIR=/usr/man/man3 +make +make test +make install DESTDIR=$PKG + +find $PKG -name perllocal.pod \ + -o -name ".packlist" \ + -o -name "*.bs" \ + | xargs rm -f + +find $PKG -depth -type d -empty -delete || true +gzip $PKG/usr/man/man?/*.? + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a README Changes $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/perl/perl-lwp-useragent-cached/perl-lwp-useragent-cached.info b/perl/perl-lwp-useragent-cached/perl-lwp-useragent-cached.info new file mode 100644 index 0000000000..a27c0bfb6d --- /dev/null +++ b/perl/perl-lwp-useragent-cached/perl-lwp-useragent-cached.info @@ -0,0 +1,10 @@ +PRGNAM="perl-lwp-useragent-cached" +VERSION="0.06" +HOMEPAGE="https://metacpan.org/release/LWP-UserAgent-Cached" +DOWNLOAD="https://cpan.metacpan.org/authors/id/O/OL/OLEG/LWP-UserAgent-Cached-0.06.tar.gz" +MD5SUM="2dd2ec330ee13d87ae50c7a30f12c99e" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="libwww-perl" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" diff --git a/perl/perl-lwp-useragent-cached/slack-desc b/perl/perl-lwp-useragent-cached/slack-desc new file mode 100644 index 0000000000..072e1be140 --- /dev/null +++ b/perl/perl-lwp-useragent-cached/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +perl-lwp-useragent-cached: perl-lwp-useragent-cached (LWP::UserAgent caching mechanism) +perl-lwp-useragent-cached: +perl-lwp-useragent-cached: LWP::UserAgent::Cached is yet another LWP::UserAgent subclass with +perl-lwp-useragent-cached: cache support. It stores cache in the files on local filesystem and +perl-lwp-useragent-cached: if response already available in the cache returns it instead of +perl-lwp-useragent-cached: making HTTP request. +perl-lwp-useragent-cached: +perl-lwp-useragent-cached: +perl-lwp-useragent-cached: +perl-lwp-useragent-cached: +perl-lwp-useragent-cached: -- cgit v1.2.3