Changeset 1061
- Timestamp:
- Mar 17, 2017, 5:05:57 PM (8 years ago)
- Location:
- spec/trunk/SPECS
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
spec/trunk/SPECS/file.spec
r519 r1061 1 #define svn_url F:/rd/ports/file/trunk 2 %define svn_url http://svn.netlabs.org/repos/ports/file/trunk 3 %define svn_rev 266 4 5 %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} 6 %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} 7 %define __libtoolize : 1 %global with_python3 0 8 2 9 3 Summary: A utility for determining file types 10 4 Name: file 11 Version: 5. 0412 Release: 7%{?dist}5 Version: 5.30 6 Release: 1%{?dist} 13 7 License: BSD 14 8 Group: Applications/File 9 10 Vendor: bww bitwise works GmbH 11 %scm_source svn http://svn.netlabs.org/repos/ports/file/trunk 2149 12 13 # DEF files to create forwarders for the legacy package 14 Source10: magic.def 15 15 16 URL: http://www.darwinsys.com/file/ 16 17 Source: %{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip18 19 17 Requires: file-libs = %{version}-%{release} 20 Requires: mmap >= 2011010321 22 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)23 18 BuildRequires: zlib-devel 19 BuildRequires: autoconf automake libtool 24 20 25 21 %description … … 32 28 Summary: Libraries for applications using libmagic 33 29 Group: Applications/File 30 License: BSD 34 31 35 32 %description libs … … 46 43 necessary for developing programs using libmagic. 47 44 48 %package static49 Summary: Static library for file development50 Group: Applications/File51 Requires: %{name} = %{version}-%{release}52 53 %description static54 The file-static package contains the static version of55 the libmagic library.56 57 45 %package -n python-magic 58 Summary: Python bindings for the libmagic API46 Summary: Python 2 bindings for the libmagic API 59 47 Group: Development/Libraries 60 BuildRequires: python-devel 48 BuildRequires: python2-devel 49 BuildArch: noarch 61 50 Requires: %{name} = %{version}-%{release} 62 51 … … 66 55 file(1) command. 67 56 68 %package debug 69 Summary: HLL debug data for exception handling support. 57 %if %{with_python3} 58 %package -n python3-magic 59 Summary: Python 3 bindings for the libmagic API 60 Group: Development/Libraries 61 BuildRequires: python3-devel 62 BuildArch: noarch 63 Requires: %{name} = %{version}-%{release} 70 64 71 %description debug 72 HLL debug data for exception handling support. 65 %description -n python3-magic 66 This package contains the Python 3 bindings to allow access to the 67 libmagic API. The libmagic library is also used by the familiar 68 file(1) command. 69 %endif 70 71 %debug_package 73 72 74 73 %prep 75 %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0} 76 %setup -q 77 %else 78 %setup -n "%{name}-%{version}" -Tc 79 svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force 80 rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" 81 (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}") 82 %endif 74 %scm_setup 75 autoreconf -fvi 76 77 # Prepare forwarder DLLs. 78 for m in %{SOURCE10}; do 79 cp ${m} . 80 done 83 81 84 82 #iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_ … … 86 84 mv doc/libmagic.man_ doc/libmagic.man 87 85 86 %if %{with_python3} 87 rm -rf %{py3dir} 88 cp -a python %{py3dir} 89 %endif 90 88 91 %build 89 export CONFIG_SITE="/@unixroot/usr/share/config.legacy" 90 export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" 91 export LIBS="-lurpo -lmmap" 92 export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" 93 export LIBS="-lcx" 92 94 export CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" 93 %configure \ 94 --enable-fsect-man5 --disable-rpath \ 95 --disable-shared --disable-static 95 export VENDOR="%{vendor}" 96 %configure --enable-fsect-man5 --disable-rpath 96 97 98 export BEGINLIBPATH=%{_builddir}/%{name}-%{version}/src/.libs 97 99 make %{?_smp_mflags} 98 100 99 101 cd python 100 102 CFLAGS="%{optflags}" %{__python} setup.py build 103 %if %{with_python3} 104 cd %{py3dir} 105 CFLAGS="%{optflags}" %{__python3} setup.py build 106 %endif 101 107 102 108 %install 103 rm -rf $RPM_BUILD_ROOT104 109 mkdir -p ${RPM_BUILD_ROOT}%{_bindir} 105 110 mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man1 … … 113 118 cat magic/Magdir/* > ${RPM_BUILD_ROOT}%{_datadir}/misc/magic 114 119 ln -s misc/magic ${RPM_BUILD_ROOT}%{_datadir}/magic 115 #ln -s file/magic.mime ${RPM_BUILD_ROOT}%{_datadir}/magic.mime116 120 ln -s ../magic ${RPM_BUILD_ROOT}%{_datadir}/file/magic 117 121 118 cp src/magic.dll ${RPM_BUILD_ROOT}%{_libdir} 119 cp src/.libs/magic_s.a ${RPM_BUILD_ROOT}%{_libdir} 122 # Generate & install forwarder DLLs. 123 gcc -Zomf -Zdll -nostdlib magic.def -l$RPM_BUILD_ROOT/%{_libdir}/magic1.dll -lend -o $RPM_BUILD_ROOT/%{_libdir}/magic.dll 120 124 121 125 cd python 122 126 %{__python} setup.py install -O1 --skip-build --root ${RPM_BUILD_ROOT} 127 %if %{with_python3} 128 cd %{py3dir} 129 %{__python3} setup.py install -O1 --skip-build --root ${RPM_BUILD_ROOT} 130 %endif 123 131 %{__install} -d ${RPM_BUILD_ROOT}%{_datadir}/%{name} 124 132 125 %clean 126 rm -rf $RPM_BUILD_ROOT 133 #post libs -p /sbin/ldconfig 134 135 #postun libs -p /sbin/ldconfig 127 136 128 137 %files 129 %defattr(-,root,root,-) 130 %doc COPYING ChangeLog README 131 %{_bindir}/* 138 %{!?_licensedir:%global license %%doc} 139 %license COPYING 140 %doc ChangeLog README 141 %{_bindir}/*.exe 132 142 %{_mandir}/man1/* 133 143 134 144 %files libs 135 %defattr(-,root,root,-) 145 %{!?_licensedir:%global license %%doc} 146 %license COPYING 147 %doc ChangeLog README 136 148 %{_libdir}/*.dll 137 149 %{_datadir}/magic* … … 141 153 142 154 %files devel 143 %defattr(-,root,root,-) 144 %{_libdir}/*.dll 145 %{_libdir}/magic.a 155 %{_libdir}/magic*_dll.a 146 156 %{_includedir}/magic.h 147 157 %{_mandir}/man3/* 148 158 149 %files static150 %defattr(-,root,root,-)151 %{_libdir}/*_s.a152 159 153 160 %files -n python-magic 154 %defattr(-, root, root, -) 155 %doc python/README COPYING python/example.py 161 %{!?_licensedir:%global license %%doc} 162 %license COPYING 163 %doc python/README python/example.py 156 164 %{_libdir}/python*/* 165 %{python_sitelib}/magic.py 166 %{python_sitelib}/magic.pyc 167 %{python_sitelib}/magic.pyo 168 %{python_sitelib}/*egg-info 157 169 158 %files debug 159 %defattr(-,root,root) 160 %{_libdir}/*.dbg 170 %if %{with_python3} 171 %files -n python3-magic 172 %{!?_licensedir:%global license %%doc} 173 %license COPYING 174 %doc python/README python/example.py 175 %{python3_sitelib}/magic.py 176 %{python3_sitelib}/*egg-info 177 %{python3_sitelib}/__pycache__/* 178 %endif 161 179 162 180 %changelog 181 * Mon Mar 06 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> 5.30-1 182 - updated to vendor version 5.30 183 - use scm_ macros 184 - add forwarder 185 163 186 * Mon Feb 02 2015 yd <yd@os2power.com> 5.04-7 164 187 - r266, rebuilt with gcc 4.9.2 and python 2.7.
Note:
See TracChangeset
for help on using the changeset viewer.