mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-21 19:42:24 +01:00
misc/fileinfo: Added to 13.0 repository
This commit is contained in:
parent
24476c05d6
commit
336c941bcf
5 changed files with 122 additions and 0 deletions
12
misc/fileinfo/README
Normal file
12
misc/fileinfo/README
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
This PHP extension allows for the retrieval of information regarding
|
||||||
|
a vast majority of files.
|
||||||
|
|
||||||
|
This information may include dimensions, quality, length, etc.,
|
||||||
|
|
||||||
|
Additionally it can also be used to retrieve the mime type for a
|
||||||
|
particular file and for text files proper language encoding.
|
||||||
|
|
||||||
|
This package is deprecated but I do need it for an AvantFAX web
|
||||||
|
application install I'm putting together. The PECL install for this
|
||||||
|
particular extension doesn't work correctly so I've put together this
|
||||||
|
SlackBuild script and am sharing it with the community.
|
22
misc/fileinfo/doinst.sh
Normal file
22
misc/fileinfo/doinst.sh
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# Use the magic mime file from Apache as the mime database
|
||||||
|
if [ -a /etc/httpd/magic ]; then
|
||||||
|
ln -s /etc/httpd/magic /etc/magic.mime
|
||||||
|
else
|
||||||
|
cat << EOF
|
||||||
|
|
||||||
|
This extension requires a MIME database /etc/magic.mime. You can
|
||||||
|
symlink to the one included with Apache with the following command
|
||||||
|
|
||||||
|
# ln -s /etc/httpd/magic /etc/magic.mime
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! grep ^extension=fileinfo.so /etc/httpd/php.ini 2>&1 > /dev/null; then
|
||||||
|
cat << EOF
|
||||||
|
|
||||||
|
Add the following line to the /etc/httpd/php.ini configuration
|
||||||
|
file in order to enable this extension
|
||||||
|
|
||||||
|
extension=fileinfo.so
|
||||||
|
EOF
|
||||||
|
fi
|
59
misc/fileinfo/fileinfo.SlackBuild
Normal file
59
misc/fileinfo/fileinfo.SlackBuild
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
PRGNAM=fileinfo
|
||||||
|
VERSION=1.0.4
|
||||||
|
ARCH=${ARCH:-i486}
|
||||||
|
BUILD=${BUILD:-2}
|
||||||
|
TAG=${TAG:-_SBo}
|
||||||
|
|
||||||
|
CWD=$(pwd)
|
||||||
|
TMP=${TMP:-/tmp/SBo}
|
||||||
|
PKG=$TMP/package-$PRGNAM
|
||||||
|
OUTPUT=${OUTPUT:-/tmp}
|
||||||
|
|
||||||
|
if [ "$ARCH" = "i486" ]; then
|
||||||
|
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||||
|
elif [ "$ARCH" = "i686" ]; then
|
||||||
|
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||||
|
elif [ "$ARCH" = "x86_64" ]; then
|
||||||
|
SLKCFLAGS="-O2 -fPIC"
|
||||||
|
elif [ "$ARCH" = "s390" ]; then
|
||||||
|
SLKCFLAGS="-O2"
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
rm -rf $TMP/$PRGNAM-$VERSION $PKG
|
||||||
|
mkdir -p $TMP $PKG $OUTPUT
|
||||||
|
cd $TMP
|
||||||
|
tar xvf $CWD/Fileinfo-$VERSION.tgz
|
||||||
|
cd Fileinfo-$VERSION
|
||||||
|
chown -R root:root .
|
||||||
|
chmod -R u+w,go+r-w,a-s .
|
||||||
|
|
||||||
|
phpize
|
||||||
|
CFLAGS="$SLKCFLAGS" \
|
||||||
|
./configure \
|
||||||
|
--prefix=/usr
|
||||||
|
make
|
||||||
|
make install INSTALL_ROOT=$PKG
|
||||||
|
|
||||||
|
( cd $PKG
|
||||||
|
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
|
||||||
|
xargs strip --strip-unneeded 2> /dev/null || true
|
||||||
|
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
|
||||||
|
xargs strip --strip-unneeded 2> /dev/null
|
||||||
|
)
|
||||||
|
|
||||||
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||||
|
cp -a \
|
||||||
|
CREDITS \
|
||||||
|
$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
|
||||||
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
||||||
|
|
||||||
|
cd $PKG
|
||||||
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|
10
misc/fileinfo/fileinfo.info
Normal file
10
misc/fileinfo/fileinfo.info
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
PRGNAM="fileinfo"
|
||||||
|
VERSION="1.0.4"
|
||||||
|
HOMEPAGE="http://pecl.php.net/package/Fileinfo"
|
||||||
|
DOWNLOAD="http://pecl.php.net/get/Fileinfo-1.0.4.tgz"
|
||||||
|
DOWNLOAD_x86_64=""
|
||||||
|
MD5SUM="2854e749db157365c769cb9496f5586f"
|
||||||
|
MD5SUM_x86_64=""
|
||||||
|
MAINTAINER="Christopher Walker"
|
||||||
|
EMAIL="kris240376@gmail.com"
|
||||||
|
APPROVED="dsomero"
|
19
misc/fileinfo/slack-desc
Normal file
19
misc/fileinfo/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 ':'.
|
||||||
|
|
||||||
|
|-----handy-ruler------------------------------------------------------|
|
||||||
|
fileinfo: fileinfo (libmagic bindings)
|
||||||
|
fileinfo:
|
||||||
|
fileinfo: This PHP extension allows for the retrieval of information regarding
|
||||||
|
fileinfo: a vast majority of files.
|
||||||
|
fileinfo:
|
||||||
|
fileinfo: This information may include dimensions, quality, length, etc.,
|
||||||
|
fileinfo:
|
||||||
|
fileinfo: Additionally it can also be used to retrieve the mime type for a
|
||||||
|
fileinfo: particular file and for text files proper language encoding.
|
||||||
|
fileinfo:
|
||||||
|
fileinfo:
|
Loading…
Reference in a new issue