summaryrefslogtreecommitdiff
path: root/core/file
diff options
context:
space:
mode:
Diffstat (limited to 'core/file')
-rw-r--r--core/file/PKGBUILD44
-rw-r--r--core/file/file-5.05-python-3.2.patch11
-rw-r--r--core/file/file-5.05-zip64.patch11
3 files changed, 66 insertions, 0 deletions
diff --git a/core/file/PKGBUILD b/core/file/PKGBUILD
new file mode 100644
index 000000000..e81c14eb9
--- /dev/null
+++ b/core/file/PKGBUILD
@@ -0,0 +1,44 @@
+# $Id: PKGBUILD 111169 2011-02-24 15:25:47Z stephane $
+# Maintainer: Allan McRae <allan@archlinux.org>
+# Contributor: Andreas Radke <andyrtr@archlinux.org>
+
+pkgname=file
+pkgver=5.05
+pkgrel=2
+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.05-zip64.patch
+ file-5.05-python-3.2.patch)
+md5sums=('0b429063710457be2bd17a18389cb018'
+ '385f020467debd98bd2d8df6143f93d0'
+ '3f5e147be5b9c36c74323a1317328538')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ sed -i 's#\$(datadir)/misc#\$(datadir)#' configure
+
+ # identify zip64 files
+ patch -Np1 -i ${srcdir}/file-5.05-zip64.patch
+
+ # identify python 3.2 files
+ patch -Np1 -i ../file-5.05-python-3.2.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/core/file/file-5.05-python-3.2.patch b/core/file/file-5.05-python-3.2.patch
new file mode 100644
index 000000000..355eb08a6
--- /dev/null
+++ b/core/file/file-5.05-python-3.2.patch
@@ -0,0 +1,11 @@
+diff -Naur file-5.05.ori/magic/Magdir/python file-5.05/magic/Magdir/python
+--- file-5.05.ori/magic/Magdir/python 2010-12-31 10:15:28.000000000 -0800
++++ file-5.05/magic/Magdir/python 2011-02-24 07:07:36.030004467 -0800
+@@ -20,6 +20,7 @@
+ 0 belong 0x03f30d0a python 2.7 byte-compiled
+ 0 belong 0x3b0c0d0a python 3.0 byte-compiled
+ 0 belong 0x4f0c0d0a python 3.1 byte-compiled
++0 belong 0x6c0c0d0a python 3.2 byte-compiled
+
+ 0 search/1/w #!\ /usr/bin/python Python script text executable
+ !:mime text/x-python
diff --git a/core/file/file-5.05-zip64.patch b/core/file/file-5.05-zip64.patch
new file mode 100644
index 000000000..2c9aede5f
--- /dev/null
+++ b/core/file/file-5.05-zip64.patch
@@ -0,0 +1,11 @@
+diff -Naur file-5.05-old//magic/Magdir/archive file-5.05/magic/Magdir/archive
+--- file-5.05-old//magic/Magdir/archive 2011-01-08 06:24:25.000000000 +1000
++++ file-5.05/magic/Magdir/archive 2011-01-19 14:37:47.766673895 +1000
+@@ -688,6 +688,7 @@
+ >>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
+
+ # Zoo archiver
+ 20 lelong 0xfdc4a7dc Zoo archive data