# The generation of debuginfo package is disabled since the only binary files # that the package contains are byte-compiled Lua (.lc) files and no useful # debuginfo can be extracted from them. %global debug_package %{nil} Name: billiards Version: 0.4.1 Release: 3%{?dist} Summary: A free cue sports simulator # The main part of the program is released under the terms of GNU General # Public License, either version 3 of the License, or any later version. # The manual is distributed under the terms of the GNU Free Documentation # License. # All Lua scripts found in the src/imagery, src/meshes and src/polyhedra # directories and their subdirectories are image data or geometry data and # are distributed under the terms of the GNU Free Documentation License. License: GPLv3+ and GFDL URL: http://www.nongnu.org/billiards/ Source0: http://download.savannah.gnu.org/releases/billiards/%{name}-%{version}.tar.gz # Makes Billiards work with a different prefix then Techne has. Patch0: billiards-0.4.1-prefix.patch BuildRequires: techne BuildRequires: lua-devel BuildRequires: desktop-file-utils Requires: techne Requires(post): /sbin/install-info Requires(preun): /sbin/install-info %description Billiards is a free cue sports simulator. It aims for physical accuracy and simplicity and should hopefully be useful for practicing billiards on your own and against your friends when a real pool table is not available. Currently both a pool table and a billiards table (that is with and without pockets) are implemented allowing you to play eightball, nineball and carom billiards games. %prep %setup -q %patch0 -p1 %build # byte-compiled Lua (.lc) files are arch-dependent -> override --datadir %configure --datadir=%{_libdir} make %{?_smp_mflags} \ desktopdir=%{_datadir}/applications \ iconsvgdir=%{_datadir}/icons/hicolor/scalable/apps \ icon48dir=%{_datadir}/icons/hicolor/48x48/apps %install make install DESTDIR=%{buildroot} \ desktopdir=%{_datadir}/applications \ iconsvgdir=%{_datadir}/icons/hicolor/scalable/apps \ icon48dir=%{_datadir}/icons/hicolor/48x48/apps # prevent the install of a useless, empty directory file generated by # install-info command rm -f %{buildroot}/%{_infodir}/dir # remove a redundant README file in an unappropriate place rm -f %{buildroot}/%{_docdir}/%{name}/README # valide the installed .desktop file desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop %post /sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || : /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %preun if [ $1 -eq 0 ] ; then /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || : fi %postun if [ $1 -eq 0 ] ; then /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : fi %posttrans /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files %doc AUTHORS ChangeLog COPYING NEWS README %{_bindir}/%{name}* %{_libdir}/techne/%{name} %{_mandir}/man6/* %{_infodir}/%{name}.info* %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/48x48/apps/%{name}.png %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %changelog * Tue Mar 19 2013 Tadej Janež 0.4.1-3 - fixes by Hans de Goede: - moved the byte-compiled Lua (.lc) files to %%{_libdir} - added a patch to make Billiards work with the above change - switched from "%%make_install" to "make install DESTDIR=%%{buildroot}" * Mon Mar 18 2013 Tadej Janež 0.4.1-2 - disabled the generation of the empty debuginfo package - implemented fixes suggested by Hans de Goede: - dropped assumption on the compression format (.gz) of info files * Sun Mar 10 2013 Tadej Janež 0.4.1-1 - initial package