Name: physfs2 Version: 2.0.2 Release: 1%{?dist} License: zlib Group: System Environment/Libraries Summary: Library to provide abstract access to various archives URL: http://www.icculus.org/physfs/ Source0: http://www.icculus.org/physfs/downloads/physfs-%{version}.tar.gz Patch0: physfs-2.0.2-unused.patch Patch1: physfs-2.0.2-system-lzma-sdk.patch # Rename library to libphysfs2 Patch2: physfs-2.0.2-v2.patch BuildRequires: doxygen, zlib-devel, readline-devel, libtool, cmake BuildRequires: wxGTK-devel, lzma-sdk457-devel %description PhysicsFS is a library to provide abstract access to various archives. It is intended for use in video games, and the design was somewhat inspired by Quake 3's file subsystem. The programmer defines a "write directory" on the physical filesystem. No file writing done through the PhysicsFS API can leave that write directory, for security. For example, an embedded scripting language cannot write outside of this path if it uses PhysFS for all of its I/O, which means that untrusted scripts can run more safely. Symbolic links can be disabled as well, for added safety. For file reading, the programmer lists directories and archives that form a "search path". Once the search path is defined, it becomes a single, transparent hierarchical filesystem. This makes for easy access to ZIP files in the same way as you access a file directly on the disk, and it makes it easy to ship a new archive that will override a previous archive on a per-file basis. Finally, PhysicsFS gives you platform-abstracted means to determine if CD-ROMs are available, the user's home directory, where in the real filesystem your program is running, etc. %package devel Summary: Development libraries and headers for physfs Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} %description devel This package contains the libraries and headers necessary for developing packages with physfs functionality. %prep %setup -q -n physfs-%{version} %patch0 -p1 -b .unused %patch1 -p1 -b .system-lzmasdk %patch2 -p1 -b .v2 # rm -rf lzma %build %cmake . make %{?_smp_mflags} LIBTOOL=%{_bindir}/libtool doxygen %install make DESTDIR=$RPM_BUILD_ROOT install rm -rf $RPM_BUILD_ROOT%{_libdir}/*.la mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3 install -m0644 docs/man/man3/* $RPM_BUILD_ROOT%{_mandir}/man3 # Handle man page conflicts (bz #183705) mv $RPM_BUILD_ROOT%{_mandir}/man3/author.3 $RPM_BUILD_ROOT%{_mandir}/man3/physfs2-author.3 mv $RPM_BUILD_ROOT%{_mandir}/man3/description.3 $RPM_BUILD_ROOT%{_mandir}/man3/physfs2-description.3 mv $RPM_BUILD_ROOT%{_mandir}/man3/extension.3 $RPM_BUILD_ROOT%{_mandir}/man3/physfs2-extension.3 mv $RPM_BUILD_ROOT%{_mandir}/man3/major.3 $RPM_BUILD_ROOT%{_mandir}/man3/physfs2-major.3 mv $RPM_BUILD_ROOT%{_mandir}/man3/minor.3 $RPM_BUILD_ROOT%{_mandir}/man3/physfs2-minor.3 mv $RPM_BUILD_ROOT%{_mandir}/man3/patch.3 $RPM_BUILD_ROOT%{_mandir}/man3/physfs2-patch.3 mv $RPM_BUILD_ROOT%{_mandir}/man3/url.3 $RPM_BUILD_ROOT%{_mandir}/man3/physfs2-url.3 # Handle conflicts with physfs1 mv $RPM_BUILD_ROOT%{_bindir}/test_physfs $RPM_BUILD_ROOT%{_bindir}/test_physfs2 mv $RPM_BUILD_ROOT%{_bindir}/wxtest_physfs $RPM_BUILD_ROOT%{_bindir}/wxtest_physfs2 mv $RPM_BUILD_ROOT%{_includedir}/physfs.h $RPM_BUILD_ROOT%{_includedir}/physfs2.h for i in $RPM_BUILD_ROOT%{_mandir}/man3/PHYSFS_*; do NEWNAME=`echo $i |sed 's|PHYSFS_|PHYSFS2_|g'`; mv $i $NEWNAME; done mv $RPM_BUILD_ROOT%{_mandir}/man3/physfs.h.3 $RPM_BUILD_ROOT%{_mandir}/man3/physfs2.h.3 # Rename poorly named manpages for i in Deinit Free Init Malloc Realloc opaque; do mv $RPM_BUILD_ROOT%{_mandir}/man3/$i.3 $RPM_BUILD_ROOT%{_mandir}/man3/physfs2-$i.3 done # Fix multilib conflicts touch -r LICENSE.txt docs/html/* touch -r LICENSE.txt docs/latex/* # Get rid of static library. rm -rf $RPM_BUILD_ROOT%{_libdir}/*.a %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %doc CHANGELOG.txt CREDITS.txt LICENSE.txt TODO.txt %{_libdir}/*.so.* %files devel %doc docs/html/ %{_includedir}/physfs2.h %{_libdir}/*.so %{_mandir}/man3/* %{_bindir}/test_physfs2 %{_bindir}/wxtest_physfs2 %changelog * Mon Oct 17 2011 Tom Callaway - 2.0.2-1 - physfs2 package