physfs-vl.spec 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. %define name physfs
  2. %define version 2.0.2
  3. %define release 1%{?_dist_release}
  4. Summary: Library to provide abstract access to various archives
  5. Name: %{name}
  6. Version: %{version}
  7. Release: %{release}
  8. Source0: http://icculus.org/physfs/downloads/%{name}-%{version}.tar.gz
  9. Patch0: do_not_link_against_curses.diff
  10. Patch1: remove_unused_variable.diff
  11. License: BSD
  12. Group: System Environment/Libraries
  13. URL: http://icculus.org/physfs/
  14. BuildRequires: zlib-devel, readline-devel, doxygen
  15. BuildRequires: cmake
  16. BuildRequires: wxGTK-devel
  17. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  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. %package devel
  41. Summary: Development libraries and headers for physfs
  42. Group: Development/Libraries
  43. Requires: %{name} = %{version}-%{release}
  44. %description devel
  45. This package contains the libraries and headers necessary for developing
  46. packages with physfs functionality.
  47. %prep
  48. %setup -q
  49. %patch0 -p1
  50. %patch1 -p1
  51. %build
  52. %ifarch x86_64
  53. mv CMakeLists.txt CMakeLists.txt.orig
  54. cat CMakeLists.txt.orig \
  55. | sed "s/LIBRARY DESTINATION lib/LIBRARY DESTINATION %{_lib}/" \
  56. | sed "s/ARCHIVE DESTINATION lib/ARCHIVE DESTINATION %{_lib}/" \
  57. > CMakeLists.txt
  58. %endif
  59. cmake -D CMAKE_INSTALL_PREFIX=%{_prefix} .
  60. make %{?_smp_mflags}
  61. doxygen
  62. %install
  63. %{__rm} -rf ${RPM_BUILD_ROOT}
  64. make DESTDIR=${RPM_BUILD_ROOT} install
  65. #%{__rm} -rf ${RPM_BUILD_ROOT}%{_libdir}/*.la
  66. mkdir -p $RPM_BUILD_ROOT%{_mandir}/man3
  67. install -m0644 docs/man/man3/* $RPM_BUILD_ROOT%{_mandir}/man3
  68. # Handle man page conflicts (bz #183705) from Fedora
  69. mv $RPM_BUILD_ROOT%{_mandir}/man3/author.3 \
  70. $RPM_BUILD_ROOT%{_mandir}/man3/physfs-author.3
  71. mv $RPM_BUILD_ROOT%{_mandir}/man3/description.3 \
  72. $RPM_BUILD_ROOT%{_mandir}/man3/physfs-description.3
  73. mv $RPM_BUILD_ROOT%{_mandir}/man3/extension.3 \
  74. $RPM_BUILD_ROOT%{_mandir}/man3/physfs-extension.3
  75. mv $RPM_BUILD_ROOT%{_mandir}/man3/major.3 \
  76. $RPM_BUILD_ROOT%{_mandir}/man3/physfs-major.3
  77. mv $RPM_BUILD_ROOT%{_mandir}/man3/minor.3 \
  78. $RPM_BUILD_ROOT%{_mandir}/man3/physfs-minor.3
  79. mv $RPM_BUILD_ROOT%{_mandir}/man3/patch.3 \
  80. $RPM_BUILD_ROOT%{_mandir}/man3/physfs-patch.3
  81. mv $RPM_BUILD_ROOT%{_mandir}/man3/url.3 \
  82. $RPM_BUILD_ROOT%{_mandir}/man3/physfs-url.3
  83. %clean
  84. %{__rm} -rf ${RPM_BUILD_ROOT}
  85. %post -p /sbin/ldconfig
  86. %postun -p /sbin/ldconfig
  87. %files
  88. %defattr(-,root,root,-)
  89. %doc CHANGELOG.txt CREDITS.txt LICENSE.txt TODO.txt
  90. %{_libdir}/*.so.*
  91. %{_bindir}/test_physfs
  92. %{_bindir}/wxtest_physfs
  93. %files devel
  94. %defattr(-,root,root,-)
  95. %doc docs/html/ docs/latex/
  96. %{_includedir}/physfs.h
  97. %{_libdir}/*.a
  98. #%{_libdir}/*.la
  99. %{_libdir}/*.so
  100. %{_mandir}/man3/*
  101. %changelog
  102. * Wed Jul 11 2012 Toshiharu Kudoh <toshi.kd2@gmail.com> - 2.0.2-1
  103. - new upstream release
  104. - added Patch0,1 from Debian sid
  105. - added BuildRequires: wxGTK-devel
  106. * Thu Oct 09 2008 Shu KONNO <owa@bg.wakwak.com> 1.1.1-1vl5
  107. - applied new versioning policy
  108. * Wed Jan 03 2008 Shu KONNO <owa@bg.wakwak.com> 1.1.1-0vl3
  109. - updated CMakeLists.txt for lib64
  110. * Fri Sep 07 2007 Atsushi SHICHI <ats777@gmail.com> 1.1.1-0vl2
  111. - remove "-D PHYSFS_BUILD_TEST:BOOL=OFF" from cmake option.
  112. - add test_physfs to %%files.
  113. * Wed Sep 06 2007 Atsushi SHICHI <ats777@gmail.com> 1.1.1-0vl1
  114. - new upstream release.
  115. - add "BuildRequires: cmake".
  116. - to use cmake instead of %%configure.
  117. - update %%files.
  118. - temporarily remove test_physfs from %%files.
  119. - remove libphysfs.la from %%files devel.
  120. * Mon Sep 3 2007 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.1.0-0vl1
  121. - initial build for Vine Linux 4.1
  122. * Mon Oct 17 2005 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.1.0-0vlmp2
  123. - change Group: System Environment/Libraries
  124. * Fri Jun 24 2005 Munehiro Yamamoto <myamamoto@g.math.s.chiba-u.ac.jp> 1.0.0-0vlmp1
  125. - initial build for Vine Linux 3.2
  126. # end of file