[521] | 1 | %define name physfs |
---|
| 2 | %define version 1.1.1 |
---|
| 3 | %define release 1%{?_dist_release} |
---|
| 4 | |
---|
| 5 | Summary: Library to provide abstract access to various archives |
---|
| 6 | Name: %{name} |
---|
| 7 | Version: %{version} |
---|
| 8 | Release: %{release} |
---|
| 9 | Source0: http://icculus.org/physfs/downloads/%{name}-%{version}.tar.gz |
---|
| 10 | License: BSD |
---|
| 11 | Group: System Environment/Libraries |
---|
| 12 | URL: http://icculus.org/physfs/ |
---|
| 13 | |
---|
| 14 | BuildRequires: zlib-devel, readline-devel, doxygen |
---|
| 15 | BuildRequires: cmake |
---|
| 16 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
| 17 | |
---|
| 18 | %description |
---|
| 19 | PhysicsFS is a library to provide abstract access to various archives. |
---|
| 20 | It is intended for use in video games, and the design was somewhat |
---|
| 21 | inspired by Quake 3's file subsystem. |
---|
| 22 | The programmer defines a "write directory" on the physical filesystem. |
---|
| 23 | No file writing done through the PhysicsFS API can leave that write directory, |
---|
| 24 | for security. |
---|
| 25 | For example, an embedded scripting language cannot write outside |
---|
| 26 | of this path if it uses PhysFS for all of its I/O, which means |
---|
| 27 | that untrusted scripts can run more safely. |
---|
| 28 | Symbolic links can be disabled as well, for added safety. |
---|
| 29 | For file reading, the programmer lists directories and archives |
---|
| 30 | that form a "search path". |
---|
| 31 | Once the search path is defined, it becomes a single, |
---|
| 32 | transparent hierarchical filesystem. |
---|
| 33 | This makes for easy access to ZIP files in the same way |
---|
| 34 | as you access a file directly on the disk, |
---|
| 35 | and it makes it easy to ship a new archive |
---|
| 36 | that will override a previous archive on a per-file basis. |
---|
| 37 | Finally, PhysicsFS gives you platform-abstracted means to determine |
---|
| 38 | if CD-ROMs are available, the user's home directory, |
---|
| 39 | where in the real filesystem your program is running, etc. |
---|
| 40 | |
---|
| 41 | %package devel |
---|
| 42 | Summary: Development libraries and headers for physfs |
---|
| 43 | Group: Development/Libraries |
---|
| 44 | Requires: %{name} = %{version}-%{release} |
---|
| 45 | |
---|
| 46 | %description devel |
---|
| 47 | This package contains the libraries and headers necessary for developing |
---|
| 48 | packages with physfs functionality. |
---|
| 49 | |
---|
| 50 | |
---|
| 51 | %prep |
---|
| 52 | %setup -q |
---|
| 53 | |
---|
| 54 | %build |
---|
| 55 | %ifarch x86_64 |
---|
| 56 | mv CMakeLists.txt CMakeLists.txt.orig |
---|
| 57 | cat CMakeLists.txt.orig \ |
---|
| 58 | | sed "s/LIBRARY DESTINATION lib/LIBRARY DESTINATION %{_lib}/" \ |
---|
| 59 | | sed "s/ARCHIVE DESTINATION lib/ARCHIVE DESTINATION %{_lib}/" \ |
---|
| 60 | > CMakeLists.txt |
---|
| 61 | %endif |
---|
| 62 | cmake -D CMAKE_INSTALL_PREFIX=%{_prefix} . |
---|
| 63 | make %{?_smp_mflags} |
---|
| 64 | doxygen |
---|
| 65 | |
---|
| 66 | %install |
---|
| 67 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
| 68 | make DESTDIR=${RPM_BUILD_ROOT} install |
---|
| 69 | #%{__rm} -rf ${RPM_BUILD_ROOT}%{_libdir}/*.la |
---|
| 70 | mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3 |
---|
| 71 | install -m0644 docs/man/man3/* $RPM_BUILD_ROOT%{_mandir}/man3 |
---|
| 72 | |
---|
| 73 | # Handle man page conflicts (bz #183705) from Fedora |
---|
| 74 | mv $RPM_BUILD_ROOT%{_mandir}/man3/author.3 \ |
---|
| 75 | $RPM_BUILD_ROOT%{_mandir}/man3/physfs-author.3 |
---|
| 76 | mv $RPM_BUILD_ROOT%{_mandir}/man3/description.3 \ |
---|
| 77 | $RPM_BUILD_ROOT%{_mandir}/man3/physfs-description.3 |
---|
| 78 | mv $RPM_BUILD_ROOT%{_mandir}/man3/extension.3 \ |
---|
| 79 | $RPM_BUILD_ROOT%{_mandir}/man3/physfs-extension.3 |
---|
| 80 | mv $RPM_BUILD_ROOT%{_mandir}/man3/major.3 \ |
---|
| 81 | $RPM_BUILD_ROOT%{_mandir}/man3/physfs-major.3 |
---|
| 82 | mv $RPM_BUILD_ROOT%{_mandir}/man3/minor.3 \ |
---|
| 83 | $RPM_BUILD_ROOT%{_mandir}/man3/physfs-minor.3 |
---|
| 84 | mv $RPM_BUILD_ROOT%{_mandir}/man3/patch.3 \ |
---|
| 85 | $RPM_BUILD_ROOT%{_mandir}/man3/physfs-patch.3 |
---|
| 86 | mv $RPM_BUILD_ROOT%{_mandir}/man3/url.3 \ |
---|
| 87 | $RPM_BUILD_ROOT%{_mandir}/man3/physfs-url.3 |
---|
| 88 | |
---|
| 89 | %clean |
---|
| 90 | %{__rm} -rf ${RPM_BUILD_ROOT} |
---|
| 91 | |
---|
| 92 | %post -p /sbin/ldconfig |
---|
| 93 | |
---|
| 94 | %postun -p /sbin/ldconfig |
---|
| 95 | |
---|
| 96 | %files |
---|
| 97 | %defattr(-,root,root,-) |
---|
| 98 | %doc CHANGELOG.txt CREDITS.txt LICENSE.txt TODO.txt |
---|
| 99 | %{_libdir}/*.so.* |
---|
| 100 | %{_bindir}/test_physfs |
---|
| 101 | %{_bindir}/wxtest_physfs |
---|
| 102 | |
---|
| 103 | %files devel |
---|
| 104 | %defattr(-,root,root,-) |
---|
| 105 | %doc docs/html/ docs/latex/ |
---|
| 106 | %{_includedir}/physfs.h |
---|
| 107 | %{_libdir}/*.a |
---|
| 108 | #%{_libdir}/*.la |
---|
| 109 | %{_libdir}/*.so |
---|
| 110 | %{_mandir}/man3/* |
---|
| 111 | |
---|
| 112 | %changelog |
---|
| 113 | * Thu Oct 09 2008 Shu KONNO <owa@bg.wakwak.com> 1.1.1-1vl5 |
---|
| 114 | - applied new versioning policy |
---|
| 115 | |
---|
| 116 | * Wed Jan 03 2008 Shu KONNO <owa@bg.wakwak.com> 1.1.1-0vl3 |
---|
| 117 | - updated CMakeLists.txt for lib64 |
---|
| 118 | |
---|
| 119 | * Fri Sep 07 2007 Atsushi SHICHI <ats777@gmail.com> 1.1.1-0vl2 |
---|
| 120 | - remove "-D PHYSFS_BUILD_TEST:BOOL=OFF" from cmake option. |
---|
| 121 | - add test_physfs to %%files. |
---|
| 122 | |
---|
| 123 | * Wed Sep 06 2007 Atsushi SHICHI <ats777@gmail.com> 1.1.1-0vl1 |
---|
| 124 | - new upstream release. |
---|
| 125 | - add "BuildRequires: cmake". |
---|
| 126 | - to use cmake instead of %%configure. |
---|
| 127 | - update %%files. |
---|
| 128 | - temporarily remove test_physfs from %%files. |
---|
| 129 | - remove libphysfs.la from %%files devel. |
---|
| 130 | |
---|
| 131 | * Mon Sep 3 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.1.0-0vl1 |
---|
| 132 | - initial build for Vine Linux 4.1 |
---|
| 133 | |
---|
| 134 | * Mon Oct 17 2005 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.1.0-0vlmp2 |
---|
| 135 | - change Group: System Environment/Libraries |
---|
| 136 | |
---|
| 137 | * Fri Jun 24 2005 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.0.0-0vlmp1 |
---|
| 138 | - initial build for Vine Linux 3.2 |
---|
| 139 | |
---|
| 140 | # end of file |
---|