summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/fileinfo/README12
-rw-r--r--misc/fileinfo/doinst.sh22
-rw-r--r--misc/fileinfo/fileinfo.SlackBuild59
-rw-r--r--misc/fileinfo/fileinfo.info10
-rw-r--r--misc/fileinfo/slack-desc19
5 files changed, 122 insertions, 0 deletions
diff --git a/misc/fileinfo/README b/misc/fileinfo/README
new file mode 100644
index 0000000000..b14bfee79c
--- /dev/null
+++ b/misc/fileinfo/README
@@ -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.
diff --git a/misc/fileinfo/doinst.sh b/misc/fileinfo/doinst.sh
new file mode 100644
index 0000000000..6e75204a61
--- /dev/null
+++ b/misc/fileinfo/doinst.sh
@@ -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
diff --git a/misc/fileinfo/fileinfo.SlackBuild b/misc/fileinfo/fileinfo.SlackBuild
new file mode 100644
index 0000000000..e201b36c7c
--- /dev/null
+++ b/misc/fileinfo/fileinfo.SlackBuild
@@ -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}
diff --git a/misc/fileinfo/fileinfo.info b/misc/fileinfo/fileinfo.info
new file mode 100644
index 0000000000..52aa0844e2
--- /dev/null
+++ b/misc/fileinfo/fileinfo.info
@@ -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"
diff --git a/misc/fileinfo/slack-desc b/misc/fileinfo/slack-desc
new file mode 100644
index 0000000000..6e0e85dd29
--- /dev/null
+++ b/misc/fileinfo/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 ':'.
+
+ |-----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: