summaryrefslogtreecommitdiff
path: root/testing/file
diff options
context:
space:
mode:
authorroot <root@rshg047.dnsready.net>2011-07-15 23:12:20 +0000
committerroot <root@rshg047.dnsready.net>2011-07-15 23:12:20 +0000
commit76c26b027d797f3671bf0b6c6618eda2496cf88d (patch)
treec386be56a0a3bc7b668a674e9cec6405a4d2fb2f /testing/file
parent29657877f6a02dbba1bd58b417b4ccd211939690 (diff)
Fri Jul 15 23:12:20 UTC 2011
Diffstat (limited to 'testing/file')
-rw-r--r--testing/file/PKGBUILD39
-rw-r--r--testing/file/file-5.07-zip-detect.patch40
2 files changed, 79 insertions, 0 deletions
diff --git a/testing/file/PKGBUILD b/testing/file/PKGBUILD
new file mode 100644
index 000000000..2a5489e9d
--- /dev/null
+++ b/testing/file/PKGBUILD
@@ -0,0 +1,39 @@
+# $Id: PKGBUILD 131726 2011-07-14 01:54:47Z allan $
+# Maintainer: Allan McRae <allan@archlinux.org>
+# Contributor: Andreas Radke <andyrtr@archlinux.org>
+
+pkgname=file
+pkgver=5.07
+pkgrel=4
+pkgdesc="File type identification utility"
+arch=('i686' 'x86_64')
+license=('custom')
+groups=('base')
+url="http://www.darwinsys.com/file/"
+depends=('glibc' 'zlib')
+options=('!libtool')
+source=(ftp://ftp.astron.com/pub/${pkgname}/${pkgname}-${pkgver}.tar.gz
+ file-5.07-zip-detect.patch)
+md5sums=('b8d1f9a8a644067bd0a703cebf3f4858'
+ 'ac155cf89af6665dfee76738c27366d8')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ sed -i 's#\$(datadir)/misc#\$(datadir)#' configure
+
+ # combined upstream patches to fix zip file detection
+ patch -Np1 -i ${srcdir}/file-5.07-zip-detect.patch
+
+ ./configure --prefix=/usr --datadir=/usr/share/file
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make DESTDIR=${pkgdir} install
+ install -dm755 ${pkgdir}/usr/share/misc
+ ln -s ../file/magic.mgc ${pkgdir}/usr/share/misc
+
+ install -D -m644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/COPYING
+}
diff --git a/testing/file/file-5.07-zip-detect.patch b/testing/file/file-5.07-zip-detect.patch
new file mode 100644
index 000000000..ce433bb90
--- /dev/null
+++ b/testing/file/file-5.07-zip-detect.patch
@@ -0,0 +1,40 @@
+diff -Naur file-5.07-orig//magic/Magdir/archive file-5.07/magic/Magdir/archive
+--- file-5.07-orig//magic/Magdir/archive 2011-04-24 01:02:48.000000000 +1000
++++ file-5.07/magic/Magdir/archive 2011-07-14 11:55:11.821178049 +1000
+@@ -1,5 +1,5 @@
+ #------------------------------------------------------------------------------
+-# $File: archive,v 1.63 2011/04/23 15:02:48 christos Exp $
++# $File: archive,v 1.66 2011/05/25 17:45:54 christos Exp $
+ # archive: file(1) magic for archive formats (see also "msdos" for self-
+ # extracting compressed archives)
+ #
+@@ -654,12 +654,6 @@
+ >>>>78 string -template Template
+ !:mime application/vnd.oasis.opendocument.image-template
+
+-# StarView Metafile
+-# From Pierre Ducroquet <pinaraf@pinaraf.info>
+-0 string VCLMTF StarView MetaFile
+->6 beshort x \b, version %d
+->8 belong x \b, size %d
+-
+ # EPUB (OEBPS) books using OCF (OEBPS Container Format)
+ # From: Adam Buchbinder <adam.buchbinder@gmail.com>
+ # http://www.idpf.org/ocf/ocf1.0/download/ocf10.htm, section 4.
+@@ -692,8 +686,15 @@
+ >>4 byte 0x09 \b, at least v0.9 to extract
+ >>4 byte 0x0a \b, at least v1.0 to extract
+ >>4 byte 0x0b \b, at least v1.1 to extract
+->>0x161 string WINZIP \b, WinZIP self-extracting
+ >>4 byte 0x14 \b, at least v2.0 to extract
++>>4 byte 0x2d \b, at least v3.0 to extract
++>>0x161 string WINZIP \b, WinZIP self-extracting
++
++# StarView Metafile
++# From Pierre Ducroquet <pinaraf@pinaraf.info>
++0 string VCLMTF StarView MetaFile
++>6 beshort x \b, version %d
++>8 belong x \b, size %d
+
+ # Zoo archiver
+ 20 lelong 0xfdc4a7dc Zoo archive data