From 7220684a67cce97729a98610b0b316b3cc651d02dc71e2b342e4971f0bbf963f Mon Sep 17 00:00:00 2001 From: Philip Taylor Date: Sun, 8 Aug 2010 20:33:19 +0000 Subject: [PATCH] Add desktop files. Install lib files to subdirectory. OBS-URL: https://build.opensuse.org/package/show/games/0ad?expand=0&rev=8 --- 0ad.desktop | 9 +++++++++ 0ad.png | 3 +++ 0ad.sh | 3 +++ 0ad.spec | 28 ++++++++++++++++++++-------- 4 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 0ad.desktop create mode 100644 0ad.png create mode 100644 0ad.sh diff --git a/0ad.desktop b/0ad.desktop new file mode 100644 index 0000000..bbf56d8 --- /dev/null +++ b/0ad.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Version=1.0 +Name=0 A.D. +Comment=A real-time strategy game of ancient warfare +Exec=/usr/bin/0ad +Icon=0ad +Terminal=false +Type=Application +Categories=Game;StrategyGame; diff --git a/0ad.png b/0ad.png new file mode 100644 index 0000000..f277127 --- /dev/null +++ b/0ad.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4cf1f7637f7a7ff1d6fcb8325a2769947e031643fe78eb15973edf5fa59606c +size 4566 diff --git a/0ad.sh b/0ad.sh new file mode 100644 index 0000000..ba73f79 --- /dev/null +++ b/0ad.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +/usr/bin/pyrogenesis_dbg "$@" diff --git a/0ad.spec b/0ad.spec index 059e0dc..8b6bcff 100644 --- a/0ad.spec +++ b/0ad.spec @@ -7,6 +7,9 @@ License: GNU GPL v2 or later Group: Amusements/Games/Strategy/Real Time Url: http://wildfiregames.com/0ad/ Source: 0ad-%{version}.tar.gz +Source1: 0ad.desktop +Source2: 0ad.png +Source3: 0ad.sh Patch0: 0ad-cs7755.patch Patch1: 0ad-cs7757.patch Patch2: 0ad-cs7758.patch @@ -32,6 +35,7 @@ BuildRequires: nasm BuildRequires: python BuildRequires: subversion BuildRequires: zip +BuildRequires: update-desktop-files %if 0%{?suse_version} BuildRequires: libenet-devel @@ -111,7 +115,7 @@ history. %build export CFLAGS="%{optflags}" export CPPFLAGS="%{optflags}" -build/workspaces/update-workspaces.sh --verbose --bindir %{_bindir} --datadir %{_datadir}/%{name} --libdir %{_libdir} +build/workspaces/update-workspaces.sh --verbose --bindir %{_bindir} --datadir %{_datadir}/%{name} --libdir %{_libdir}/%{name} pushd build/workspaces/gcc %__make %{?_smp_mflags} popd @@ -124,15 +128,21 @@ LD_LIBRARY_PATH=binaries/system binaries/system/test_dbg -libdir binaries/system %install #makeinstall %__install -Dm 0755 binaries/system/pyrogenesis_dbg %{buildroot}%{_bindir}/pyrogenesis_dbg -%__install -Dm 0755 binaries/system/libCollada_dbg.so %{buildroot}%{_libdir}/libCollada_dbg.so -%__install -Dm 0755 binaries/system/libAtlasUI_dbg.so %{buildroot}%{_libdir}/libAtlasUI_dbg.so -%__install -Dm 0755 binaries/system/libmozjs-ps-debug.so %{buildroot}%{_libdir}/libmozjs-ps-debug.so +%__install -Dm 0755 binaries/system/libCollada_dbg.so %{buildroot}%{_libdir}/%{name}/libCollada_dbg.so +%__install -Dm 0755 binaries/system/libAtlasUI_dbg.so %{buildroot}%{_libdir}/%{name}/libAtlasUI_dbg.so +%__install -Dm 0755 binaries/system/libmozjs-ps-debug.so %{buildroot}%{_libdir}/%{name}/libmozjs-ps-debug.so #__install -Dm 0755 binaries/system/ActorEditor_dbg %{buildroot}/%{_libexecdir}/%{name}/bin/ActorEditor_dbg #__install -Dm 0755 binaries/system/ColourTester_dbg %{buildroot}/%{_libexecdir}/%{name}/bin/ColourTester_dbg -%__ln_s %{_bindir}/pyrogenesis_dbg %{buildroot}%{_bindir}/0ad +%__install -Dm 0644 %{SOURCE1} %{buildroot}%{_datadir}/applications/%{name}.desktop +%__install -Dm 0644 %{SOURCE2} %{buildroot}%{_datadir}/pixmaps/%{name}.png +%suse_update_desktop_file %{name} + +%__install -Dm 0755 %{SOURCE3} %{buildroot}%{_bindir}/0ad + +%__mkdir_p %{buildroot}%{_libdir}/%{name} %__mkdir_p %{buildroot}%{_datadir}/%{name} %clean @@ -143,7 +153,9 @@ test "%{buildroot}" != "/" && %__rm -rf %{buildroot} %doc README.txt %{_bindir}/0ad %{_bindir}/pyrogenesis_dbg -%{_libdir}/libCollada_dbg.so -%{_libdir}/libAtlasUI_dbg.so -%{_libdir}/libmozjs-ps-debug.so +%{_libdir}/%{name}/libCollada_dbg.so +%{_libdir}/%{name}/libAtlasUI_dbg.so +%{_libdir}/%{name}/libmozjs-ps-debug.so +%{_datadir}/pixmaps/%{name}.png +%{_datadir}/applications/%{name}.desktop %dir %{_datadir}/%{name}