mirror of
https://github.com/Ponce/slackbuilds
synced 2024-10-01 06:32:51 +02:00
perl/perl-file-libmagic: Added (determine MIME types with libmagic).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
This commit is contained in:
parent
1754886ae8
commit
284c7ff385
4 changed files with 119 additions and 0 deletions
6
perl/perl-file-libmagic/README
Normal file
6
perl/perl-file-libmagic/README
Normal file
|
@ -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".
|
84
perl/perl-file-libmagic/perl-file-libmagic.SlackBuild
Normal file
84
perl/perl-file-libmagic/perl-file-libmagic.SlackBuild
Normal file
|
@ -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}
|
10
perl/perl-file-libmagic/perl-file-libmagic.info
Normal file
10
perl/perl-file-libmagic/perl-file-libmagic.info
Normal file
|
@ -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"
|
19
perl/perl-file-libmagic/slack-desc
Normal file
19
perl/perl-file-libmagic/slack-desc
Normal file
|
@ -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:
|
Loading…
Reference in a new issue