File physfs.spec of Package physfs

#
# spec file for package physfs (Version 1.0.1)
#
# Copyright (c) 2007 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:           physfs
BuildRequires:  doxygen readline-devel zlib-devel
URL:            http://www.icculus.org/physfs/
Summary:        PhysicsFS file abstraction layer for games
Version:        1.0.1
Release:        44
Source0:        %{name}-%{version}.tar.gz
License:        zlib/libpng License
Group:          System/Libraries
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Prefix:         %{_prefix}
Patch:          physfs-1.0.1-ncurses.diff

%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.



Authors:
--------
    Ryan C. Gordon

%package devel
Summary:        Libraries, includes and more to develop PhysicsFS applications
Group:          System/Libraries
Requires:       %{name} = %{version}
Requires:       zlib-devel

%description devel
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.



Authors:
--------
    Ryan C. Gordon

%prep
%setup -q
%patch -p1

%build
test -f NEWS      || touch NEWS
test -f README    || touch README
test -f AUTHORS   || touch AUTHORS
test -f ChangeLog || touch ChangeLog
# just to be sure...
rm zlib123/zutil.*
autoreconf -fi
CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="${RPM_OPT_FLAGS}" ./configure \
	--prefix=%{prefix} \
	--libdir=%{_libdir}
make %{?jobs:-j%jobs}
doxygen

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
install -d -m755 %{buildroot}%{_mandir}
cp -a docs/man/* %{buildroot}%{_mandir}

%post
%run_ldconfig

%postun
%run_ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
%doc CHANGELOG CREDITS INSTALL LICENSE TODO zlib_license_change.txt
%{_bindir}/test_physfs
%{_libdir}/*so.*

%files devel
%defattr(-,root,root)
%doc docs/html
%{_mandir}/man*/*
%{_libdir}/*a
%{_libdir}/*.so
%{_includedir}/physfs.h

%changelog
* Thu Apr 05 2007 - lnussel@suse.de
- build test program with readline support
- install man pages into proper directory
- use %%jobs
* Mon Apr 02 2007 - rguenther@suse.de
- add zlib-devel BuildRequires
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Sun Aug 14 2005 - sndirsch@suse.de
- created package; useful e.g. for building lincity-ng
openSUSE Build Service is sponsored by