This commit is contained in:
parent
e4bd01ee6a
commit
8305bf534a
13
file-4.16-python.dif
Normal file
13
file-4.16-python.dif
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
--- python/setup.py
|
||||||
|
+++ python/setup.py 2006-02-10 09:51:18.000000000 +0100
|
||||||
|
@@ -3,8 +3,8 @@
|
||||||
|
|
||||||
|
magic_module = Extension('magic',
|
||||||
|
libraries = ['magic'],
|
||||||
|
- library_dirs = ['./','../','../src','/usr/lib/'],
|
||||||
|
- include_dirs = ['./','../','../src','/usr/include/'],
|
||||||
|
+ library_dirs = ['./','../','../src/.libs','/usr/lib/'],
|
||||||
|
+ include_dirs = ['./','../','../src/','/usr/include/'],
|
||||||
|
sources = ['py_magic.c'])
|
||||||
|
|
||||||
|
setup (name = 'Magic file extensions',
|
9
file-4.21-xcursor.dif
Normal file
9
file-4.21-xcursor.dif
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
--- magic/Localstuff
|
||||||
|
+++ magic/Localstuff 2007-12-05 11:31:15.494119630 +0100
|
||||||
|
@@ -33,3 +33,6 @@
|
||||||
|
# File magic for Scribus, an Open Source Desktop Publishing system
|
||||||
|
0 string \<SCRIBUSUTF8\ Version Scribus Document
|
||||||
|
0 string \<SCRIBUSUTF8NEW\ Version Scribus Document
|
||||||
|
+
|
||||||
|
+# File magic for X11 cursor data files
|
||||||
|
+0 string Xcur\020\000 X11 cursor data
|
@ -1,6 +1,6 @@
|
|||||||
--- .pkgextract
|
--- .pkgextract
|
||||||
+++ .pkgextract 2006-03-27 13:29:19.000000000 +0200
|
+++ .pkgextract 2006-03-27 13:29:19.000000000 +0200
|
||||||
@@ -0,0 +1,14 @@
|
@@ -0,0 +1,15 @@
|
||||||
+patch -p0 -s --suffix=.misc < ../file-4.18-misc.dif
|
+patch -p0 -s --suffix=.misc < ../file-4.18-misc.dif
|
||||||
+patch -p0 -s --suffix=.pcp < ../file-4.12-pcp.dif
|
+patch -p0 -s --suffix=.pcp < ../file-4.12-pcp.dif
|
||||||
+patch -p0 -s --suffix=.exec < ../file-4.20-exec.dif
|
+patch -p0 -s --suffix=.exec < ../file-4.20-exec.dif
|
||||||
@ -15,6 +15,7 @@
|
|||||||
+patch -p0 -s --suffix=.opt < ../file-4.21-option.dif
|
+patch -p0 -s --suffix=.opt < ../file-4.21-option.dif
|
||||||
+patch -p0 -s --suffix=.scri < ../file-4.21-scribus.dif
|
+patch -p0 -s --suffix=.scri < ../file-4.21-scribus.dif
|
||||||
+patch -p0 -s --suffix=.awk < ../file-4.21-awk.dif
|
+patch -p0 -s --suffix=.awk < ../file-4.21-awk.dif
|
||||||
|
+patch -p0 -s --suffix=.xcur < ../file-4.21-xcursor.dif
|
||||||
--- magic/Header
|
--- magic/Header
|
||||||
+++ magic/Header 2006-03-27 13:29:19.000000000 +0200
|
+++ magic/Header 2006-03-27 13:29:19.000000000 +0200
|
||||||
@@ -1,5 +1,7 @@
|
@@ -1,5 +1,7 @@
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Dec 5 12:11:32 CET 2007 - werner@suse.de
|
||||||
|
|
||||||
|
- Add X11 cursor magic to Localstuff (bug #346132)
|
||||||
|
- New package python-magic, the python API for the libmagic
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Aug 31 17:32:04 CEST 2007 - werner@suse.de
|
Fri Aug 31 17:32:04 CEST 2007 - werner@suse.de
|
||||||
|
|
||||||
|
117
file.spec
117
file.spec
@ -11,13 +11,16 @@
|
|||||||
# norootforbuild
|
# norootforbuild
|
||||||
|
|
||||||
Name: file
|
Name: file
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: findutils zlib-devel
|
||||||
URL: http://www.darwinsys.com/file/
|
%if %suse_version > 1030
|
||||||
|
BuildRequires: python-devel
|
||||||
|
%endif
|
||||||
|
Url: http://www.darwinsys.com/file/
|
||||||
License: Other uncritical OpenSource License
|
License: Other uncritical OpenSource License
|
||||||
Group: Productivity/File utilities
|
Group: Productivity/File utilities
|
||||||
Autoreqprov: on
|
AutoReqProv: on
|
||||||
Version: 4.21
|
Version: 4.21
|
||||||
Release: 3
|
Release: 16
|
||||||
Summary: A Tool to Determine File Types
|
Summary: A Tool to Determine File Types
|
||||||
Source: ftp://ftp.astron.com/pub/file/file-%{version}.tar.bz2
|
Source: ftp://ftp.astron.com/pub/file/file-%{version}.tar.bz2
|
||||||
Patch: file-%{version}.dif
|
Patch: file-%{version}.dif
|
||||||
@ -35,8 +38,12 @@ Patch11: file-4.21-reg_dos.dif
|
|||||||
Patch12: file-4.21-option.dif
|
Patch12: file-4.21-option.dif
|
||||||
Patch13: file-4.21-scribus.dif
|
Patch13: file-4.21-scribus.dif
|
||||||
Patch14: file-4.21-awk.dif
|
Patch14: file-4.21-awk.dif
|
||||||
|
Patch15: file-4.21-xcursor.dif
|
||||||
Patch20: file-4.16-mips.dif
|
Patch20: file-4.16-mips.dif
|
||||||
|
Patch21: file-4.16-python.dif
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
%global _sysconfdir /etc
|
||||||
|
%global _miscdir %{_datadir}/misc
|
||||||
|
|
||||||
%description
|
%description
|
||||||
With the file command, you can obtain information on the file type of a
|
With the file command, you can obtain information on the file type of a
|
||||||
@ -53,10 +60,10 @@ Authors:
|
|||||||
|
|
||||||
%package -n file-devel
|
%package -n file-devel
|
||||||
Summary: Include Files and Libraries mandatory for Development
|
Summary: Include Files and Libraries mandatory for Development
|
||||||
Group: Productivity/File utilities
|
Group: Development/Libraries/Other
|
||||||
Provides: file:/usr/include/magic.h
|
Provides: file:/usr/include/magic.h
|
||||||
Requires: file = %{version}-%{release}, zlib-devel
|
Requires: file = %{version}-%{release}, zlib-devel
|
||||||
Autoreqprov: on
|
AutoReqProv: on
|
||||||
|
|
||||||
%description -n file-devel
|
%description -n file-devel
|
||||||
This package contains all necessary include files and libraries needed
|
This package contains all necessary include files and libraries needed
|
||||||
@ -69,6 +76,26 @@ Authors:
|
|||||||
Mark Moraes <moraes@deshaw.com>
|
Mark Moraes <moraes@deshaw.com>
|
||||||
Christos Zoulas <christos@deshaw.com>
|
Christos Zoulas <christos@deshaw.com>
|
||||||
|
|
||||||
|
%if %suse_version > 1030
|
||||||
|
|
||||||
|
%package -n python-magic
|
||||||
|
Summary: Python module to use libmagic
|
||||||
|
Group: Development/Languages/Python
|
||||||
|
Requires: python-base = %{py_ver}
|
||||||
|
|
||||||
|
%description -n python-magic
|
||||||
|
This package contains the python binding that require the magic "file"
|
||||||
|
interface.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Authors:
|
||||||
|
--------
|
||||||
|
Mark Moraes <moraes@deshaw.com>
|
||||||
|
Christos Zoulas <christos@deshaw.com>
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch1 -p0 -b .misc
|
%patch1 -p0 -b .misc
|
||||||
@ -85,9 +112,13 @@ Authors:
|
|||||||
%patch12 -p0 -b .opt
|
%patch12 -p0 -b .opt
|
||||||
%patch13 -p0 -b .scri
|
%patch13 -p0 -b .scri
|
||||||
%patch14 -p0 -b .awk
|
%patch14 -p0 -b .awk
|
||||||
|
%patch15 -p0 -b .xcur
|
||||||
%ifarch mips
|
%ifarch mips
|
||||||
%patch20 -p0 -b .mips
|
%patch20 -p0 -b .mips
|
||||||
%endif
|
%endif
|
||||||
|
%if %suse_version > 1030
|
||||||
|
%patch21 -p0 -b .python
|
||||||
|
%endif
|
||||||
%patch
|
%patch
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -100,41 +131,54 @@ aclocal
|
|||||||
automake
|
automake
|
||||||
autoconf
|
autoconf
|
||||||
CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64 -DHOWMANY=69632 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -fPIC" \
|
CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64 -DHOWMANY=69632 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -fPIC" \
|
||||||
./configure --prefix=/usr --datadir='${prefix}/share/misc' --mandir=%{_mandir} \
|
./configure --prefix=%{_prefix} --datadir=%{_miscdir} --mandir=%{_mandir} \
|
||||||
-libdir=%{_libdir} --sysconfdir=/etc --enable-fsect-man5
|
--libdir=%{_libdir} --sysconfdir=%{_sysconfdir} --enable-fsect-man5
|
||||||
make pkgdatadir='$(datadir)'
|
make pkgdatadir='$(datadir)'
|
||||||
|
%if %suse_version > 1030
|
||||||
|
pushd python
|
||||||
|
python setup.py build
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
export LANG=POSIX
|
export LANG=POSIX
|
||||||
export LC_ALL=POSIX
|
export LC_ALL=POSIX
|
||||||
make DESTDIR=$RPM_BUILD_ROOT install pkgdatadir='$(datadir)'
|
rm -rf %{buildroot}
|
||||||
mkdir -p $RPM_BUILD_ROOT/etc
|
mkdir %{buildroot}
|
||||||
rm -f $RPM_BUILD_ROOT/etc/magic
|
mkdir %{buildroot}/etc
|
||||||
echo '# Localstuff: file(1) magic(5) for locally observed files' > $RPM_BUILD_ROOT/etc/magic
|
make DESTDIR=%{buildroot} install pkgdatadir='$(datadir)'
|
||||||
echo '# global magic file is /usr/share/misc/magic(.mgc)' >> $RPM_BUILD_ROOT/etc/magic
|
rm -vf %{buildroot}%{_sysconfdir}/magic
|
||||||
#install -s dcore $RPM_BUILD_ROOT/usr/bin/
|
echo '# Localstuff: file(1) magic(5) for locally observed files' > %{buildroot}%{_sysconfdir}/magic
|
||||||
# Check the binary does not bail out:
|
echo '# global magic file is %{_miscdir}/magic(.mgc)' >> %{buildroot}%{_sysconfdir}/magic
|
||||||
LD_LIBRARY_PATH=${RPM_BUILD_ROOT}%{_libdir} \
|
#install -s dcore %{buildroot}%{_bindir}
|
||||||
${RPM_BUILD_ROOT}/usr/bin/file -m ${RPM_BUILD_ROOT}/usr/share/misc/magic \
|
%if %suse_version > 1030
|
||||||
${RPM_BUILD_ROOT}/usr/bin/file /usr/bin/* /%{_lib}/* /usr/%{_lib}/*
|
pushd python
|
||||||
|
python setup.py install --root=%{buildroot} \
|
||||||
|
--prefix=%{_prefix} \
|
||||||
|
--record-rpm=../python_files
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
# Check out that the binary does not bail out:
|
||||||
|
LD_LIBRARY_PATH=%{buildroot}%{_libdir}
|
||||||
|
export LD_LIBRARY_PATH
|
||||||
|
find %{buildroot}%{_bindir}/file %{_bindir}/ /%{_lib}/ %{_libdir}/ | \
|
||||||
|
xargs %{buildroot}%{_bindir}/file -m %{buildroot}%{_miscdir}/magic
|
||||||
|
unset LD_LIBRARY_PATH
|
||||||
|
|
||||||
%clean
|
%post -n file -p /sbin/ldconfig
|
||||||
rm -rf $RPM_BUILD_ROOT
|
|
||||||
#%pre
|
%postun -n file -p /sbin/ldconfig
|
||||||
#if test -L etc/magic; then
|
|
||||||
# rm -f etc/magic
|
|
||||||
#fi
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr (644,root,root,755)
|
%defattr (644,root,root,755)
|
||||||
%config(noreplace) /etc/magic
|
%config(noreplace) %{_sysconfdir}/magic
|
||||||
#/usr/bin/dcore
|
#%{_bindir}/dcore
|
||||||
%attr(755,root,root) /usr/bin/file
|
%attr(755,root,root) %{_bindir}/file
|
||||||
%{_libdir}/lib*.so.*
|
%{_libdir}/lib*.so.*
|
||||||
/usr/share/misc/magic
|
%{_miscdir}/magic
|
||||||
/usr/share/misc/magic.mgc
|
%{_miscdir}/magic.mgc
|
||||||
/usr/share/misc/magic.mime
|
%{_miscdir}/magic.mime
|
||||||
/usr/share/misc/magic.mime.mgc
|
%{_miscdir}/magic.mime.mgc
|
||||||
%attr(644,root,root) %{_mandir}/man1/file.1.gz
|
%attr(644,root,root) %{_mandir}/man1/file.1.gz
|
||||||
%attr(644,root,root) %{_mandir}/man5/magic.5.gz
|
%attr(644,root,root) %{_mandir}/man5/magic.5.gz
|
||||||
|
|
||||||
@ -143,10 +187,19 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_libdir}/lib*.a
|
%{_libdir}/lib*.a
|
||||||
%{_libdir}/lib*.la
|
%{_libdir}/lib*.la
|
||||||
%{_libdir}/lib*.so
|
%{_libdir}/lib*.so
|
||||||
/usr/include/magic.h
|
%{_includedir}/magic.h
|
||||||
%attr(644,root,root) %{_mandir}/man3/libmagic.3.gz
|
%attr(644,root,root) %{_mandir}/man3/libmagic.3.gz
|
||||||
|
%if %suse_version > 1030
|
||||||
|
|
||||||
|
%files -n python-magic -f python_files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%doc python/README python/example.py
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Dec 05 2007 - werner@suse.de
|
||||||
|
- Add X11 cursor magic to Localstuff (bug #346132)
|
||||||
|
- New package python-magic, the python API for the libmagic
|
||||||
* Fri Aug 31 2007 - werner@suse.de
|
* Fri Aug 31 2007 - werner@suse.de
|
||||||
- Make regex for awk more robust to avoid conflict with PostScript,
|
- Make regex for awk more robust to avoid conflict with PostScript,
|
||||||
thanks goes to Werner Lemberg for the report
|
thanks goes to Werner Lemberg for the report
|
||||||
|
Loading…
Reference in New Issue
Block a user