[2679] | 1 | %{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} |
---|
| 2 | %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} |
---|
[521] | 3 | %define __libtoolize : |
---|
[2679] | 4 | |
---|
[521] | 5 | Summary: A utility for determining file types. |
---|
| 6 | Summary(ja): ファイルの種類を判別するユーティリティー |
---|
| 7 | Name: file |
---|
[7177] | 8 | Version: 5.11 |
---|
| 9 | Release: 1%{?_dist_release} |
---|
[2679] | 10 | |
---|
| 11 | License: BSD |
---|
[521] | 12 | Group: Applications/System |
---|
| 13 | |
---|
[2679] | 14 | Source0: ftp://ftp.astron.com/pub/file/%{name}-%{version}.tar.gz |
---|
[521] | 15 | |
---|
[2679] | 16 | # Addtional magic file for Vine |
---|
| 17 | Source10: magic.printer-j |
---|
[521] | 18 | |
---|
[7177] | 19 | # Upstream says it's up to distributions to add a way to support local-magic. |
---|
| 20 | Patch0: file-localmagic.patch |
---|
| 21 | # sent upstream - should be included in next upstream release |
---|
| 22 | Patch1: file-tnef.patch |
---|
| 23 | Patch2: file-5.10-strength.patch |
---|
| 24 | Patch3: file-5.10-sticky-bit.patch |
---|
| 25 | Patch4: file-python-func.patch |
---|
| 26 | Patch5: file-qed-vdi-image.patch |
---|
| 27 | Patch6: file-5.11-ia64-swap.patch |
---|
| 28 | Patch7: file-4.17-rpm-name.patch |
---|
| 29 | Patch8: file-5.11-magicmgc-home.patch |
---|
| 30 | Patch9: file-5.11-compress.patch |
---|
[2679] | 31 | |
---|
[521] | 32 | Buildroot: %{_tmppath}/%{name}-%{version}-root |
---|
[2679] | 33 | #BuildRequires: automake |
---|
| 34 | #BuildRequires: autoconf |
---|
| 35 | BuildRequires: zlib-devel |
---|
[521] | 36 | |
---|
| 37 | Vendor: Project Vine |
---|
| 38 | Distribution: Vine Linux |
---|
[7177] | 39 | Packager: daisuke |
---|
[521] | 40 | |
---|
| 41 | %description |
---|
| 42 | The file command is used to identify a particular file according to the |
---|
| 43 | type of data contained by the file. File can identify many different |
---|
| 44 | file types, including ELF binaries, system libraries, RPM packages, and |
---|
| 45 | different graphics formats. |
---|
| 46 | |
---|
| 47 | You should install the file package, since the file command is such a |
---|
| 48 | useful utility. |
---|
| 49 | |
---|
| 50 | %description -l ja |
---|
[2679] | 51 | file コマンドは、ファイルに含まれるデータの種類によって各ファイルが |
---|
[521] | 52 | どのようなファイルかを判定するために使います。file は ELF バイナリ、シ |
---|
| 53 | ステムライブラリ、RPM パッケージ、そして様々なグラフィックフォーマット |
---|
| 54 | を含む、多くの異なるファイルの種類を見分けることができます。 |
---|
| 55 | |
---|
| 56 | |
---|
[2679] | 57 | %package devel |
---|
| 58 | Summary: Libraries and header files for file development |
---|
| 59 | Summary(ja): libmagic の開発用ファイル |
---|
| 60 | Group: Development/Libraries |
---|
| 61 | Requires: %{name} = %{version}-%{release} |
---|
| 62 | |
---|
| 63 | %description devel |
---|
| 64 | The file-devel package contains the header files and libmagic library |
---|
| 65 | necessary for developing programs using libmagic. |
---|
| 66 | |
---|
| 67 | %package static |
---|
| 68 | Summary: Static library for file development |
---|
| 69 | Summary(ja): libmagic のスタティックライブラリ |
---|
| 70 | Group: Development/Libraries |
---|
| 71 | Requires: %{name} = %{version}-%{release} |
---|
| 72 | |
---|
| 73 | %description static |
---|
| 74 | The file-static package contains the static version of |
---|
| 75 | the libmagic library. |
---|
| 76 | |
---|
| 77 | %package -n python-magic |
---|
| 78 | Summary: Python bindings for the libmagic API |
---|
| 79 | Group: Development/Libraries |
---|
| 80 | BuildRequires: python-devel |
---|
| 81 | Requires: %{name} = %{version}-%{release} |
---|
| 82 | |
---|
| 83 | %description -n python-magic |
---|
| 84 | This package contains the Python bindings to allow access to the |
---|
| 85 | libmagic API. The libmagic library is also used by the familiar |
---|
| 86 | file(1) command. |
---|
| 87 | |
---|
| 88 | |
---|
[521] | 89 | %prep |
---|
| 90 | %setup -q |
---|
| 91 | |
---|
[7177] | 92 | %patch0 -p1 |
---|
[2679] | 93 | %patch1 -p1 |
---|
| 94 | %patch2 -p1 |
---|
[7177] | 95 | %patch3 -p1 |
---|
| 96 | %patch4 -p1 |
---|
| 97 | %patch5 -p1 |
---|
| 98 | %patch6 -p1 |
---|
| 99 | %patch7 -p1 |
---|
| 100 | %patch8 -p1 |
---|
| 101 | %patch9 -p1 |
---|
[521] | 102 | |
---|
[2679] | 103 | cat %{SOURCE10} >> ./magic/Localstuff |
---|
[521] | 104 | |
---|
[2679] | 105 | iconv -f iso-8859-1 -t utf-8 < doc/libmagic.man > doc/libmagic.man_ |
---|
| 106 | touch -r doc/libmagic.man doc/libmagic.man_ |
---|
| 107 | mv doc/libmagic.man_ doc/libmagic.man |
---|
| 108 | |
---|
[521] | 109 | %build |
---|
[2679] | 110 | #autoreconf |
---|
[521] | 111 | CFLAGS="%{optflags} -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" \ |
---|
[2679] | 112 | %configure --enable-fsect-man5 --disable-rpath |
---|
| 113 | # remove hardcoded library paths from local libtool |
---|
| 114 | sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool |
---|
| 115 | sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool |
---|
| 116 | export LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{name}-%{version}/src/.libs |
---|
| 117 | make |
---|
[521] | 118 | |
---|
[2679] | 119 | cd python |
---|
| 120 | CFLAGS="%{optflags}" %{__python} setup.py build |
---|
| 121 | |
---|
[521] | 122 | %install |
---|
[2679] | 123 | rm -rf $RPM_BUILD_ROOT |
---|
| 124 | mkdir -p $RPM_BUILD_ROOT%{_bindir} |
---|
| 125 | mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 |
---|
| 126 | mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3 |
---|
| 127 | mkdir -p $RPM_BUILD_ROOT%{_mandir}/man5 |
---|
| 128 | mkdir -p $RPM_BUILD_ROOT%{_datadir}/misc |
---|
| 129 | mkdir -p $RPM_BUILD_ROOT%{_datadir}/file |
---|
[521] | 130 | |
---|
[2679] | 131 | make install DESTDIR=$RPM_BUILD_ROOT |
---|
[521] | 132 | |
---|
[2679] | 133 | cat magic/Magdir/* > ${RPM_BUILD_ROOT}%{_datadir}/misc/magic |
---|
| 134 | ln -s misc/magic ${RPM_BUILD_ROOT}%{_datadir}/magic |
---|
| 135 | ##ln -s file/magic.mime ${RPM_BUILD_ROOT}%{_datadir}/magic.mime |
---|
| 136 | ln -s ../magic ${RPM_BUILD_ROOT}%{_datadir}/file/magic |
---|
[521] | 137 | |
---|
[2679] | 138 | cd python |
---|
| 139 | %{__python} setup.py install -O1 --skip-build --root ${RPM_BUILD_ROOT} |
---|
| 140 | %{__install} -d ${RPM_BUILD_ROOT}%{_datadir}/%{name} |
---|
| 141 | |
---|
| 142 | |
---|
| 143 | # LIBTOOL=/usr/bin/libtool |
---|
| 144 | #ln -s file/magic ${RPM_BUILD_ROOT}%{_datadir}/magic |
---|
| 145 | #ln -s file/magic.mime ${RPM_BUILD_ROOT}%{_datadir}/magic.mime |
---|
| 146 | |
---|
| 147 | #ln -s ../magic ${RPM_BUILD_ROOT}%{_datadir}/misc/magic |
---|
| 148 | |
---|
| 149 | #{ cd ${RPM_BUILD_ROOT} |
---|
| 150 | # strip .%{_bindir}/file |
---|
| 151 | # cp %SOURCE1 .%{_datadir}/magic.mime |
---|
| 152 | #} |
---|
| 153 | |
---|
| 154 | # remove unuse files |
---|
[521] | 155 | rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la |
---|
| 156 | |
---|
| 157 | %clean |
---|
[2679] | 158 | rm -rf $RPM_BUILD_ROOT |
---|
[521] | 159 | |
---|
[2679] | 160 | %post -p /sbin/ldconfig |
---|
| 161 | |
---|
| 162 | %postun -p /sbin/ldconfig |
---|
| 163 | |
---|
| 164 | |
---|
[521] | 165 | %files |
---|
| 166 | %defattr(-,root,root) |
---|
[2679] | 167 | %doc COPYING ChangeLog README |
---|
[521] | 168 | %{_bindir}/* |
---|
| 169 | %{_libdir}/libmagic.so.* |
---|
| 170 | %{_datadir}/file/* |
---|
| 171 | %{_datadir}/magic* |
---|
| 172 | %{_datadir}/misc/* |
---|
| 173 | %{_mandir}/man[15]/* |
---|
| 174 | |
---|
[2679] | 175 | %files devel |
---|
| 176 | %defattr(-,root,root,-) |
---|
| 177 | %{_libdir}/*.so |
---|
[521] | 178 | %{_includedir}/magic.h |
---|
| 179 | %{_mandir}/man3/* |
---|
| 180 | |
---|
[2679] | 181 | %files static |
---|
| 182 | %defattr(-,root,root,-) |
---|
| 183 | %{_libdir}/*.a |
---|
[521] | 184 | |
---|
[2679] | 185 | %files -n python-magic |
---|
| 186 | %defattr(-, root, root, -) |
---|
| 187 | %doc python/README COPYING python/example.py |
---|
| 188 | %{python_sitelib}/magic.py |
---|
| 189 | %{python_sitelib}/magic.pyc |
---|
| 190 | %{python_sitelib}/magic.pyo |
---|
| 191 | %{python_sitelib}/*egg-info |
---|
| 192 | |
---|
| 193 | |
---|
[521] | 194 | %changelog |
---|
[7177] | 195 | * Thu Nov 29 2012 Daisuke SUZUKI <daisuke@linux.or.jp> 5.11-1 |
---|
| 196 | - new upstream reelase |
---|
| 197 | - drop all local patches |
---|
| 198 | - import fedora patches |
---|
| 199 | |
---|
[5701] | 200 | * Wed Feb 15 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 5.05-3 |
---|
| 201 | - rebuild with python-2.7.2 |
---|
| 202 | |
---|
[2730] | 203 | * Sun Feb 20 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 5.05-2 |
---|
| 204 | - rebuild package |
---|
| 205 | - fix Patch100 |
---|
| 206 | |
---|
[2679] | 207 | * Sat Feb 12 2011 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 5.05-1 |
---|
| 208 | - new upstream release |
---|
| 209 | - updated Vine patches (but Patch100 has not been ported yet...) |
---|
| 210 | - split to devel and static subpackcages |
---|
| 211 | |
---|
[1926] | 212 | * Mon Sep 27 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 4.21-3 |
---|
[2679] | 213 | - rebuilt with rpm-4.8.1 |
---|
[1926] | 214 | - add environment variable LIBTOOL for make command |
---|
| 215 | |
---|
[521] | 216 | * Fri Sep 26 2008 Shu KONNO <owa@bg.wakwak.com> 4.21-2 |
---|
| 217 | - spec in utf-8 |
---|
| 218 | - removed *.la |
---|
| 219 | |
---|
| 220 | * Mon May 12 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.21-1 |
---|
| 221 | - applied new versioning policy |
---|
| 222 | |
---|
| 223 | * Tue Dec 11 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 4.21-0vl1 |
---|
| 224 | - new upstream release |
---|
| 225 | - import debian/fedora patches |
---|
| 226 | - drop obsolete vine magic. |
---|
| 227 | |
---|
| 228 | * Thu Jun 14 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.09-0vl3 |
---|
| 229 | - rebuild for VineSeed with new tool chain |
---|
| 230 | |
---|
| 231 | * Thu May 31 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.09-0vl2.2 |
---|
| 232 | - add patch110 for fix CVE-2007-2799 |
---|
| 233 | - add zlib-devel to BuildPreReq tag |
---|
| 234 | |
---|
| 235 | * Mon Mar 26 2007 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 4.09-0vl2.1 |
---|
| 236 | - add patch100 for fix CVE-2007-1536 |
---|
| 237 | |
---|
| 238 | * Sun Sep 10 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.09-0vl2 |
---|
| 239 | - changed Group to Applications/System |
---|
| 240 | |
---|
| 241 | * Sun Apr 18 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 4.09-0vl1 |
---|
| 242 | - new upstream release |
---|
| 243 | - update vine patches |
---|
| 244 | |
---|
| 245 | * Wed Sep 10 2003 Tomoya TAKA <taka@vinelinux.org> 4.03-0vl2 |
---|
| 246 | - update Patch10, use 'size_t' in src/jcode.[ch] |
---|
| 247 | |
---|
| 248 | * Tue Sep 09 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.03-0vl1 |
---|
| 249 | - update to 4.03 |
---|
| 250 | - update Patch0, 1, 10 for 4.03 |
---|
| 251 | - s/Copyright/License/ |
---|
| 252 | |
---|
| 253 | * Mon May 12 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 4.02-1vl1 |
---|
| 254 | - update to 4.02 |
---|
| 255 | - update Vine patches for 4.02 |
---|
| 256 | |
---|
| 257 | * Sun Mar 9 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 3.41-0vl1 |
---|
| 258 | - new upstream release |
---|
| 259 | - fixed security bug (http://www.idefense.com/advisory/03.04.03.txt) |
---|
| 260 | - remove unneeded patches. |
---|
| 261 | - update Vine patches for 3.41 |
---|
| 262 | |
---|
| 263 | * Mon Apr 1 2002 Jun Nishii <jun@vinelinux.org> 3.37-0vl2 |
---|
| 264 | - added NPDL2 data [Vine:02348] |
---|
| 265 | |
---|
| 266 | * Fri Feb 08 2002 Daisuke SUZUKI <daisuke@linux.or.jp> 3.37-0vl1 |
---|
| 267 | - update to 3.37 |
---|
| 268 | |
---|
| 269 | * Sun Jul 15 2001 MATSUBAYASHI 'Shaolin' Kohji <shaolin@vinelinux.org> |
---|
| 270 | - 3.35-0vl3 |
---|
| 271 | - disable some entries in elf for problems on big-endian archs |
---|
| 272 | |
---|
| 273 | * Wed Jun 6 2001 Jun Nishii <jun@vinelinux.org> |
---|
| 274 | - file-3.35-0vl1 |
---|
| 275 | - ver.up |
---|
| 276 | - added %doc |
---|
| 277 | |
---|
| 278 | * Thu Jan 11 2001 Jun Nishii <jun@vinelinux.org> |
---|
| 279 | - file-3.33-1vl4 |
---|
| 280 | - more fix and clean up jtext patch (file-3.33-vinejtext.patch) |
---|
| 281 | |
---|
| 282 | * Thu Jan 11 2001 Jun Nishii <jun@vinelinux.org> |
---|
| 283 | - file-3.33-1vl3 |
---|
| 284 | - fix again jtext patch (file-3.33-vinejtext.patch) |
---|
| 285 | - added file-3.33-vinenames.patch to avoid miss-judgement |
---|
| 286 | |
---|
| 287 | * Wed Jan 10 2001 Jun Nishii <jun@vinelinux.org> |
---|
| 288 | - file-3.33-1vl2 |
---|
| 289 | - update jtext patch (file-3.33-vinejtext.patch) |
---|
| 290 | |
---|
| 291 | * Mon Jan 8 2001 Jun Nishii <jun@vinelinux.org> |
---|
| 292 | - file-3.33-1vl1 |
---|
| 293 | - modify description-ja and spec |
---|
| 294 | |
---|
| 295 | * Sun Jul 09 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org> |
---|
| 296 | - file-3.28-2vl2 |
---|
| 297 | - fixed %files section to handle compressed man pages |
---|
| 298 | |
---|
| 299 | * Tue Jun 13 2000 Lisa Sagami <czs14350@nifty.ne.jp> |
---|
| 300 | - marged RH 3.28-2 and Vine 3.27-3vl3 |
---|
| 301 | |
---|
| 302 | * Wed Feb 16 2000 Cristian Gafton <gafton@redhat.com> |
---|
| 303 | - add ia64 patch from rth |
---|
| 304 | |
---|
| 305 | * Mon Feb 7 2000 Bill Nottingham <notting@redhat.com> |
---|
| 306 | - handle compressed manpages |
---|
| 307 | - update to 3.28 |
---|
| 308 | |
---|
| 309 | * Mon Sep 6 1999 Norihito Ohmori <ohmori@flatout.org> |
---|
| 310 | - Japanese Text detection bug fix. (by Toru Hoshina <hoshina@best.com>) |
---|
| 311 | |
---|
| 312 | * Fri Aug 27 1999 Norihito Ohmori <ohmori@flatout.org> |
---|
| 313 | - patch dues not apply bug. |
---|
| 314 | |
---|
| 315 | * Wed Aug 26 1999 Norihito Ohmori <ohmori@flatout.org> |
---|
| 316 | - not need kcc (Thanks for Toru Hoshina <hoshina@best.com>) |
---|
| 317 | - ASCII data and Shift JIS data detected in Japanese Text Detection bug fix. |
---|
| 318 | |
---|
| 319 | * Mon Aug 23 1999 Jeff Johnson <jbj@redhat.com> |
---|
| 320 | - identify ELF stripped files correctly (#4665). |
---|
| 321 | - use SPARC (not sparc) consistently throughout (#4665). |
---|
| 322 | - add entries for MS Office files (#4665). |
---|
| 323 | |
---|
| 324 | * Thu Aug 12 1999 Jeff Johnson <jbj@redhat.com> |
---|
| 325 | - diddle magic so that *.tfm files are identified correctly. |
---|
| 326 | |
---|
| 327 | * Tue Jul 6 1999 Jeff Johnson <jbj@redhat.com> |
---|
| 328 | - update to 3.27. |
---|
| 329 | |
---|
| 330 | * Mon Mar 22 1999 Preston Brown <pbrown@redhat.com> |
---|
| 331 | - experimental support for realmedia files added |
---|
| 332 | |
---|
| 333 | * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> |
---|
| 334 | - auto rebuild in the new build environment (release 5) |
---|
| 335 | |
---|
| 336 | * Fri Mar 19 1999 Jeff Johnson <jbj@redhat.com> |
---|
| 337 | - strip binary. |
---|
| 338 | |
---|
| 339 | * Fri Nov 27 1998 Jakub Jelinek <jj@ultra.linux.cz> |
---|
| 340 | - add SPARC V9 magic. |
---|
| 341 | |
---|
| 342 | * Tue Nov 10 1998 Jeff Johnson <jbj@redhat.com> |
---|
| 343 | - update to 3.26. |
---|
| 344 | |
---|
| 345 | * Mon Aug 24 1998 Jeff Johnson <jbj@redhat.com> |
---|
| 346 | - update to 3.25. |
---|
| 347 | - detect gimp XCF versions. |
---|
| 348 | |
---|
| 349 | * Thu May 07 1998 Prospector System <bugs@redhat.com> |
---|
| 350 | - translations modified for de, fr, tr |
---|
| 351 | |
---|
| 352 | * Wed Apr 08 1998 Erik Troan <ewt@redhat.com> |
---|
| 353 | - updated to 3.24 |
---|
| 354 | - buildrooted |
---|
| 355 | |
---|
| 356 | * Mon Jun 02 1997 Erik Troan <ewt@redhat.com> |
---|
| 357 | - built against glibc |
---|
| 358 | |
---|
| 359 | * Mon Mar 31 1997 Erik Troan <ewt@redhat.com> |
---|
| 360 | - Fixed problems caused by 64 bit time_t. |
---|
| 361 | |
---|
| 362 | * Thu Mar 06 1997 Michael K. Johnson <johnsonm@redhat.com> |
---|
| 363 | - Improved recognition of Linux kernel images. |
---|