[billiards] Initial import (#919867).
Tadej Janež
tadej at fedoraproject.org
Wed Mar 20 11:50:36 UTC 2013
commit 6e5b0892f95eb9bcb0e18f13d7742d2cb8c4e148
Author: Tadej Janež <tadej.janez at tadej.hicsalta.si>
Date: Wed Mar 20 12:49:42 2013 +0100
Initial import (#919867).
.gitignore | 1 +
billiards-0.4.1-prefix.patch | 9 +++
billiards.spec | 118 ++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
4 files changed, 129 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..bb49448 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/billiards-0.4.1.tar.gz
diff --git a/billiards-0.4.1-prefix.patch b/billiards-0.4.1-prefix.patch
new file mode 100644
index 0000000..856d6bd
--- /dev/null
+++ b/billiards-0.4.1-prefix.patch
@@ -0,0 +1,9 @@
+diff -up billiards-0.4.1/src/billiards.in~ billiards-0.4.1/src/billiards.in
+--- billiards-0.4.1/src/billiards.in~ 2012-05-13 19:23:13.000000000 +0200
++++ billiards-0.4.1/src/billiards.in 2013-03-18 20:18:42.761333288 +0100
+@@ -16,4 +16,4 @@ if [ ! -e ${HOME}/.billiards ]; then
+ cp ${datadir}/techne/billiards/defaults.lua ${HOME}/.billiards
+ fi
+
+-${techne} -c ${datadir}/techne/billiards/billiards.lua $*
++${techne} -Oprefix=${datadir}/techne -c ${datadir}/techne/billiards/billiards.lua $*
diff --git a/billiards.spec b/billiards.spec
new file mode 100644
index 0000000..79e8e83
--- /dev/null
+++ b/billiards.spec
@@ -0,0 +1,118 @@
+# 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ž <tadej.janez at tadej.hicsalta.si> 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ž <tadej.janez at tadej.hicsalta.si> 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ž <tadej.janez at tadej.hicsalta.si> 0.4.1-1
+- initial package
+
diff --git a/sources b/sources
index e69de29..8c72690 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+c00786f1ca0cd62a276f6d6383a75249 billiards-0.4.1.tar.gz
More information about the scm-commits
mailing list