aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2015-05-13 07:09:01 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-05-13 07:09:01 +0700
commit8219eb57475366faf06e95c85235c12e11246060 (patch)
tree9d5b869ab5b84e13f2982f2173b479378dcc490f
parent8f64f583fb761ac1c993563fe8882886b5acab2e (diff)
perl/perl-lwp-useragent-cached: Added (UserAgent caching mechanism).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--perl/perl-lwp-useragent-cached/README5
-rw-r--r--perl/perl-lwp-useragent-cached/no_test_requires.diff38
-rw-r--r--perl/perl-lwp-useragent-cached/perl-lwp-useragent-cached.SlackBuild87
-rw-r--r--perl/perl-lwp-useragent-cached/perl-lwp-useragent-cached.info10
-rw-r--r--perl/perl-lwp-useragent-cached/slack-desc19
5 files changed, 159 insertions, 0 deletions
diff --git a/perl/perl-lwp-useragent-cached/README b/perl/perl-lwp-useragent-cached/README
new file mode 100644
index 000000000000..e3700fdfc689
--- /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 000000000000..91f6f03ba60f
--- /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 000000000000..0b7fc1001977
--- /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 000000000000..a27c0bfb6dd1
--- /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 000000000000..072e1be140fb
--- /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: