summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--perl/perl-file-libmagic/README6
-rw-r--r--perl/perl-file-libmagic/perl-file-libmagic.SlackBuild84
-rw-r--r--perl/perl-file-libmagic/perl-file-libmagic.info10
-rw-r--r--perl/perl-file-libmagic/slack-desc19
4 files changed, 119 insertions, 0 deletions
diff --git a/perl/perl-file-libmagic/README b/perl/perl-file-libmagic/README
new file mode 100644
index 0000000000..54485e1a8e
--- /dev/null
+++ b/perl/perl-file-libmagic/README
@@ -0,0 +1,6 @@
+perl-file-libmagic (determine MIME types of data or files using libmagic)
+
+File::LibMagic is a simple perl interface to libmagic from the file package.
+
+perl-Test-Fatal is an optional build-time dependency, required
+for running "make test".
diff --git a/perl/perl-file-libmagic/perl-file-libmagic.SlackBuild b/perl/perl-file-libmagic/perl-file-libmagic.SlackBuild
new file mode 100644
index 0000000000..d31fc48ad5
--- /dev/null
+++ b/perl/perl-file-libmagic/perl-file-libmagic.SlackBuild
@@ -0,0 +1,84 @@
+#!/bin/sh
+
+# Slackware build script for perl-file-libmagic
+
+# Written by B. Watson (yalhcru@gmail.com)
+
+# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details.
+
+PRGNAM=perl-file-libmagic
+TARNAM=File-LibMagic
+VERSION=${VERSION:-1.15}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -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
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $TARNAM-$VERSION
+tar xvf $CWD/$TARNAM-$VERSION.tar.gz
+cd $TARNAM-$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 {} \;
+
+perl Makefile.PL \
+ PREFIX=/usr \
+ INSTALLDIRS=vendor \
+ INSTALLVENDORMAN1DIR=/usr/man/man1 \
+ INSTALLVENDORMAN3DIR=/usr/man/man3
+make
+
+# only run 'make test' if perl-Test-Fatal is installed.
+perl -MTest::Fatal -e 0 2>/dev/null && make test
+
+make install DESTDIR=$PKG
+gzip -9 $PKG/usr/man/man?/*.?
+
+find $PKG -name perllocal.pod \
+ -o -name ".packlist" \
+ -o -name "*.bs" \
+ | xargs rm -f
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a Changes LICENSE README.md \
+ $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-file-libmagic/perl-file-libmagic.info b/perl/perl-file-libmagic/perl-file-libmagic.info
new file mode 100644
index 0000000000..b167b95a49
--- /dev/null
+++ b/perl/perl-file-libmagic/perl-file-libmagic.info
@@ -0,0 +1,10 @@
+PRGNAM="perl-file-libmagic"
+VERSION="1.15"
+HOMEPAGE="https://metacpan.org/pod/File::LibMagic"
+DOWNLOAD="https://cpan.metacpan.org/authors/id/D/DR/DROLSKY/File-LibMagic-1.15.tar.gz"
+MD5SUM="e5753a9f1e992da5f79fdbe253b02cf9"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="B. Watson"
+EMAIL="yalhcru@gmail.com"
diff --git a/perl/perl-file-libmagic/slack-desc b/perl/perl-file-libmagic/slack-desc
new file mode 100644
index 0000000000..cf6f161e50
--- /dev/null
+++ b/perl/perl-file-libmagic/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-file-libmagic: perl-file-libmagic (determine MIME types of data/files with libmagic)
+perl-file-libmagic:
+perl-file-libmagic: File::LibMagic is a simple perl interface to libmagic from the
+perl-file-libmagic: file package.
+perl-file-libmagic:
+perl-file-libmagic:
+perl-file-libmagic:
+perl-file-libmagic:
+perl-file-libmagic:
+perl-file-libmagic:
+perl-file-libmagic: