From 5911523877cfa091cb1c15440e3f8cf27f7467cdaefa7771d82ee4e5fcd927a0 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Tue, 29 Jan 2008 00:36:02 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/file?expand=0&rev=14 --- file.changes | 6 +++++ file.spec | 53 ++++++++-------------------------------- python-magic.changes | 5 ++++ python-magic.spec | 57 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 78 insertions(+), 43 deletions(-) create mode 100644 python-magic.changes create mode 100644 python-magic.spec diff --git a/file.changes b/file.changes index 7cc6969..93566a0 100644 --- a/file.changes +++ b/file.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jan 28 18:09:01 CET 2008 - rguenther@suse.de + +- Split python-magic off to separate spec file to avoid pulling + python into the base build cycle + ------------------------------------------------------------------- Tue Jan 15 10:46:05 CET 2008 - werner@suse.de diff --git a/file.spec b/file.spec index dcf86fa..8facfb0 100644 --- a/file.spec +++ b/file.spec @@ -12,15 +12,12 @@ Name: file BuildRequires: findutils zlib-devel -%if %suse_version > 1030 -BuildRequires: python-devel -%endif Url: http://www.darwinsys.com/file/ License: Other uncritical OpenSource License Group: Productivity/File utilities AutoReqProv: on Version: 4.21 -Release: 25 +Release: 30 Summary: A Tool to Determine File Types Source: ftp://ftp.astron.com/pub/file/file-%{version}.tar.bz2 Patch: file-%{version}.dif @@ -76,28 +73,8 @@ Authors: Mark Moraes Christos Zoulas -%if %suse_version > 1030 - -%package -n python-magic -Summary: Python module to use libmagic -Group: Development/Languages/Python -Requires: python = %{py_ver} - -%description -n python-magic -This package contains the python binding that require the magic "file" -interface. - - - -Authors: --------- - Mark Moraes - Christos Zoulas - -%endif - %prep -%setup -q +%setup -q -n file-%{version} %patch1 -p0 -b .misc %patch2 -p0 -b .pcp %patch3 -p0 -b .exec @@ -116,7 +93,7 @@ Authors: %ifarch mips %patch20 -p0 -b .mips %endif -%if %suse_version > 1030 +%if 0%{?build_python_bindings:1} %patch21 -p0 -b .python %endif %patch @@ -134,7 +111,7 @@ CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64 -DHOWMANY=69632 -D_LARGEFILE_SOURC ./configure --prefix=%{_prefix} --datadir=%{_miscdir} --mandir=%{_mandir} \ --libdir=%{_libdir} --sysconfdir=%{_sysconfdir} --enable-fsect-man5 make pkgdatadir='$(datadir)' -%if %suse_version > 1030 +%if 0%{?build_python_bindings:1} pushd python python setup.py build popd @@ -151,13 +128,6 @@ rm -vf %{buildroot}%{_sysconfdir}/magic echo '# Localstuff: file(1) magic(5) for locally observed files' > %{buildroot}%{_sysconfdir}/magic echo '# global magic file is %{_miscdir}/magic(.mgc)' >> %{buildroot}%{_sysconfdir}/magic #install -s dcore %{buildroot}%{_bindir} -%if %suse_version > 1030 -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 @@ -189,14 +159,11 @@ unset LD_LIBRARY_PATH %{_libdir}/lib*.so %{_includedir}/magic.h %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 +* Mon Jan 28 2008 rguenther@suse.de +- Split python-magic off to separate spec file to avoid pulling + python into the base build cycle * Tue Jan 15 2008 werner@suse.de - Move python-base to python * Wed Dec 05 2007 werner@suse.de @@ -224,7 +191,7 @@ unset LD_LIBRARY_PATH - Add zlib-devel BuildRequires * Wed Mar 21 2007 werner@suse.de - Update to file 4.20 due security reason CVE-2007-1536 (#256290) -* Tue Mar 06 2007 rguenther@suse.de +* Wed Mar 07 2007 rguenther@suse.de - Fix order of changelog entries * Thu Nov 23 2006 werner@suse.de - Initialize variable in elf patch @@ -319,7 +286,7 @@ unset LD_LIBRARY_PATH - removed bogus self-provides * Tue Jul 23 2002 werner@suse.de - Add mySQL bytes to magic (bug #16138) -* Fri Jun 07 2002 olh@suse.de +* Sat Jun 08 2002 olh@suse.de - don't change the union u in readelf.c:tryelf() on ppc64 * Mon Feb 04 2002 werner@suse.de - Fix looking of manual page @@ -382,7 +349,7 @@ unset LD_LIBRARY_PATH - ran old prepare_spec on spec file to switch to new prepare_spec. * Tue Aug 24 1999 uli@suse.de - added -fsigned-char to CFLAGS (PPC) -* Wed Nov 04 1998 ro@suse.de +* Thu Nov 05 1998 ro@suse.de - disabled dcore (won't build with glibc-2.0) * Thu Oct 01 1998 ro@suse.de - update to 3.26 diff --git a/python-magic.changes b/python-magic.changes new file mode 100644 index 0000000..57244e0 --- /dev/null +++ b/python-magic.changes @@ -0,0 +1,5 @@ +------------------------------------------------------------------- +Mon Jan 28 18:10:23 CET 2008 - rguenther@suse.de + +- Split off from file. + diff --git a/python-magic.spec b/python-magic.spec new file mode 100644 index 0000000..dea1042 --- /dev/null +++ b/python-magic.spec @@ -0,0 +1,57 @@ +# +# spec file for package python-magic (Version 4.21) +# +# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + +Name: python-magic +%define build_python_bindings 1 +BuildRequires: findutils zlib-devel +BuildRequires: python-devel +Url: http://www.darwinsys.com/file/ +License: Other uncritical OpenSource License +Group: Development/Languages/Python +AutoReqProv: on +Version: 4.21 +Release: 30 +Summary: Python module to use libmagic +%py_requires +Source99: file.spec +%{expand:%(sed -n -e '/^Source:/,/^BuildRoot:/p' <%_sourcedir/file.spec)} +%global _sysconfdir /etc +%global _miscdir %{_datadir}/misc + +%description +This package contains the python binding that require the magic "file" +interface. + + + +Authors: +-------- + Mark Moraes + Christos Zoulas + +%prep +%{expand:%(sed -n -e '/^%%prep/,/^%%install/p' <%_sourcedir/file.spec | sed -e '1d' -e '$d')} + +%install +pushd python +python setup.py install --root=%{buildroot} \ + --prefix=%{_prefix} \ + --record-rpm=../python_files +popd + +%files -f python_files +%defattr(-,root,root) +%doc python/README python/example.py + +%changelog +* Mon Jan 28 2008 rguenther@suse.de +- Split off from file.