[file/f19] build python-magic as noarch

Jan Kaluža jkaluza at fedoraproject.org
Mon Jun 17 12:24:00 UTC 2013


commit d9830217957aa7c1d91b72fae670cc8e3799e90e
Author: Jan Kaluza <hanzz.k at gmail.com>
Date:   Mon Jun 17 14:23:30 2013 +0200

    build python-magic as noarch
    
    - fix netpbm detection

 file-5.14-netpbm.patch |   52 ++++++++++++++++++++++++++++++++++++++++++++++++
 file.spec              |    9 +++++++-
 2 files changed, 60 insertions(+), 1 deletions(-)
---
diff --git a/file-5.14-netpbm.patch b/file-5.14-netpbm.patch
new file mode 100644
index 0000000..90d8b1d
--- /dev/null
+++ b/file-5.14-netpbm.patch
@@ -0,0 +1,52 @@
+diff --git a/magic/Magdir/images b/magic/Magdir/images
+index e94905c..a25d292 100644
+--- a/magic/Magdir/images
++++ b/magic/Magdir/images
+@@ -32,17 +32,42 @@
+ 
+ # PBMPLUS images
+ # The next byte following the magic is always whitespace.
+-0	search/1	P1		Netpbm PBM image text
++# strength is changed to try these patterns before "x86 boot sector"
++0	search/1	P1		
++>3	regex		=[0-9]*\ [0-9]*		Netpbm PBM image text
++>3	regex		=[0-9]+\ 		\b, size = %sx
++>>3	regex		=\ [0-9]+	\b%s
++!:strength + 45
+ !:mime	image/x-portable-bitmap
+-0	search/1b	P2		Netpbm PGM image text
++0	search/1	P2		
++>3	regex		=[0-9]*\ [0-9]*		Netpbm PGM image text
++>3	regex		=[0-9]+\ 		\b, size = %sx
++>>3	regex		=\ [0-9]+	\b%s
++!:strength + 45
+ !:mime	image/x-portable-greymap
+ 0	search/1	P3		Netpbm PPM image text
++>3	regex		=[0-9]*\ [0-9]*		Netpbm PPM image text
++>3	regex		=[0-9]+\ 		\b, size = %sx
++>>3	regex		=\ [0-9]+	\b%s
++!:strength + 45
+ !:mime	image/x-portable-pixmap
+-0	string		P4		Netpbm PBM "rawbits" image data
++0	string		P4		
++>3	regex		=[0-9]*\ [0-9]*		Netpbm PBM "rawbits" image data
++>3	regex		=[0-9]+\ 		\b, size = %sx
++>>3	regex		=\ [0-9]+	\b%s
++!:strength + 45
+ !:mime	image/x-portable-bitmap
+-0	string		P5		Netpbm PGM "rawbits" image data
++0	string		P5		
++>3	regex		=[0-9]*\ [0-9]*		Netpbm PGM "rawbits" image data
++>3	regex		=[0-9]+\ 		\b, size = %sx
++>>3	regex		=\ [0-9]+	\b%s
++!:strength + 45
+ !:mime	image/x-portable-greymap
+-0	string		P6		Netpbm PPM "rawbits" image data
++0	string		P6		
++>3	regex		=[0-9]*\ [0-9]*		Netpbm PPM "rawbits" image data
++>3	regex		=[0-9]+\ 		\b, size = %sx
++>>3	regex		=\ [0-9]+	\b%s
++!:strength + 45
+ !:mime	image/x-portable-pixmap
+ 0	string		P7		Netpbm PAM image file
+ !:mime	image/x-portable-pixmap
diff --git a/file.spec b/file.spec
index b6a7999..efd19d2 100644
--- a/file.spec
+++ b/file.spec
@@ -5,7 +5,7 @@
 Summary: A utility for determining file types
 Name: file
 Version: 5.11
-Release: 9%{?dist}
+Release: 10%{?dist}
 License: BSD
 Group: Applications/File
 Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
@@ -25,6 +25,7 @@ Patch10: file-5.11-dump-twice.patch
 Patch11: file-5.04-volume_key.patch
 Patch12: file-5.04-man-return-code.patch
 Patch13: file-5.04-generic-msdos.patch
+Patch14: file-5.14-netpbm.patch
 URL: http://www.darwinsys.com/file/
 Requires: file-libs = %{version}-%{release}
 BuildRequires: zlib-devel
@@ -65,6 +66,7 @@ the libmagic library.
 %package -n python-magic
 Summary: Python bindings for the libmagic API
 Group:   Development/Libraries
+BuildArch: noarch
 BuildRequires: python2-devel
 Requires: %{name} = %{version}-%{release}
 
@@ -91,6 +93,7 @@ file(1) command.
 %patch11 -p1
 %patch12 -p1
 %patch13 -p1
+%patch14 -p1
 
 iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_
 touch -r doc/libmagic.man doc/libmagic.man_
@@ -166,6 +169,10 @@ cd python
 %endif
 
 %changelog
+* Mon Jun 17 2013 Jan Kaluza <jkaluza at redhat.com> - 5.11-10
+- build python-magic as noarch
+- fix netpbm detection
+
 * Mon Mar 11 2013 Jan Kaluza <jkaluza at redhat.com> - 5.11-9
 - fix #919466 - fix memory leak in get_default_magic
 


More information about the scm-commits mailing list