[arch-commits] Commit in file/trunk (3 files)

Stéphane Gaudreault stephane at archlinux.org
Fri Nov 19 17:08:06 UTC 2010


    Date: Friday, November 19, 2010 @ 12:08:06
  Author: stephane
Revision: 99994

upgpkg: file 5.04-3
rebuild of old package, tidy up PKGBUILD, detect python2.7 and zip64 files

Added:
  file/trunk/file-5.04-python-2.7.patch
  file/trunk/file-5.04-zip64.patch
Modified:
  file/trunk/PKGBUILD

----------------------------+
 PKGBUILD                   |   25 ++++++++++++++++++++-----
 file-5.04-python-2.7.patch |   20 ++++++++++++++++++++
 file-5.04-zip64.patch      |   11 +++++++++++
 3 files changed, 51 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2010-11-19 17:03:59 UTC (rev 99993)
+++ PKGBUILD	2010-11-19 17:08:06 UTC (rev 99994)
@@ -4,7 +4,7 @@
 
 pkgname=file
 pkgver=5.04
-pkgrel=2
+pkgrel=3
 pkgdesc="File type identification utility"
 arch=('i686' 'x86_64')
 license=('custom')
@@ -12,14 +12,29 @@
 url="http://www.darwinsys.com/file/"
 depends=('glibc' 'zlib')
 options=('!libtool')
-source=(ftp://ftp.astron.com/pub/$pkgname/$pkgname-$pkgver.tar.gz)
-md5sums=('accade81ff1cc774904b47c72c8aeea0')
+source=(ftp://ftp.astron.com/pub/${pkgname}/${pkgname}-${pkgver}.tar.gz 
+        file-5.04-python-2.7.patch
+        file-5.04-zip64.patch)
+md5sums=('accade81ff1cc774904b47c72c8aeea0' 
+         '4f223a3ff4f157320f1e6faffc4afb88'
+         'b547eb3430adb3deb756d3a43dd7ad46')
 
 build() {
-  cd ${srcdir}/$pkgname-$pkgver
+  cd "${srcdir}/${pkgname}-${pkgver}"
   sed -i 's#\$(datadir)/misc#\$(datadir)#' configure 
+
+  # identify python 2.7 byte-compiled files
+  patch -Np1 -i ../file-5.04-python-2.7.patch
+  # identify zip64 files
+  patch -Np1 -i ../file-5.04-zip64.patch
+
   ./configure --prefix=/usr --datadir=/usr/share/file
-  make || return 1
+  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

Added: file-5.04-python-2.7.patch
===================================================================
--- file-5.04-python-2.7.patch	                        (rev 0)
+++ file-5.04-python-2.7.patch	2010-11-19 17:08:06 UTC (rev 99994)
@@ -0,0 +1,20 @@
+diff -up file-5.04/magic/Magdir/python.py27 file-5.04/magic/Magdir/python
+--- file-5.04/magic/Magdir/python.py27	2009-10-27 15:49:57.000000000 +0100
++++ file-5.04/magic/Magdir/python	2010-08-12 11:44:48.387964124 +0200
+@@ -6,7 +6,7 @@
+ # From: David Necas <yeti at physics.muni.cz>
+ # often the module starts with a multiline string
+ 0	string		"""	a python script text executable
+-# MAGIC as specified in Python/import.c (1.5 to 2.6a1 and 3.1a0, assuming
++# MAGIC as specified in Python/import.c (1.5 to 2.7a0 and 3.1a0, assuming
+ # that Py_UnicodeFlag is off for Python 2)
+ # 20121  ( YEAR - 1995 ) + MONTH  + DAY (little endian followed by "\r\n"
+ 0	belong		0x994e0d0a	python 1.5/1.6 byte-compiled
+@@ -17,6 +17,7 @@
+ 0	belong		0x6df20d0a	python 2.4 byte-compiled
+ 0	belong		0xb3f20d0a	python 2.5 byte-compiled
+ 0	belong		0xd1f20d0a	python 2.6 byte-compiled
++0	belong		0x03f30d0a	python 2.7 byte-compiled
+ 0	belong		0x3b0c0d0a	python 3.0 byte-compiled
+ 0	belong		0x4f0c0d0a	python 3.1 byte-compiled
+ 

Added: file-5.04-zip64.patch
===================================================================
--- file-5.04-zip64.patch	                        (rev 0)
+++ file-5.04-zip64.patch	2010-11-19 17:08:06 UTC (rev 99994)
@@ -0,0 +1,11 @@
+--- file-5.04/magic/Magdir/archive	2010-09-27 17:52:19.242245630 +0530
++++ file-5.04/magic/Magdir/archive	2010-09-27 17:52:12.015252938 +0530
+@@ -581,6 +581,8 @@
+ !:mime	application/zip
+ >>4	byte		0x14		Zip archive data, at least v2.0 to extract
+ !:mime	application/zip
++>>4     byte            0x2d            Zip64 archive data, at least v3.0 to extract
++!:mime  application/zip
+ 
+ # OpenOffice.org / KOffice / StarOffice documents
+ # Listed here because they ARE zip files




More information about the arch-commits mailing list