Dominique Leuenberger 2016-05-30 07:59:18 +00:00 committed by Git OBS Bridge
commit 5c9b5d5e55
8 changed files with 98 additions and 36 deletions

16
_service Normal file
View File

@ -0,0 +1,16 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="url">git://github.com/chazomaticus/asteroid.git</param>
<param name="scm">git</param>
<param name="version">1.2.1+git-4efc7fc</param>
<param name="changesgenerate">enable</param>
</service>
<service name="recompress" mode="disabled">
<param name="file">*.tar</param>
<param name="compression">bz2</param>
</service>
<service name="set_version" mode="disabled"/>
</services>

4
_servicedata Normal file
View File

@ -0,0 +1,4 @@
<servicedata>
<service name="tar_scm">
<param name="url">git://github.com/chazomaticus/asteroid.git</param>
<param name="changesrevision">64869dfe745800f34f1c68248ba2e350dc95a592</param></service></servicedata>

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:123d2c4e97e5535b4a3b7fb57beac9da564a6924ee308a2a456c2a77f6fcb27c
size 291007

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8f97bfbc59fc52426fbe4ead3bff45cdd62625157eef198e678772cce239c259
size 998884

View File

@ -1,11 +0,0 @@
--- CMakeLists.txt.orig 2014-10-15 02:25:30.000000000 +0200
+++ CMakeLists.txt 2014-10-20 13:03:19.908402756 +0200
@@ -31,7 +31,7 @@
endif(SDL_FOUND AND SDLMIXER_FOUND)
# Config header
-set(Asteroid_BUILD_RES_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/share/asteroid")
+SET(CMAKE_INSTALL_PREFIX "")
configure_file("${PROJECT_SOURCE_DIR}/src/config.h.in" "${PROJECT_BINARY_DIR}/include/config.h")
include_directories("${PROJECT_BINARY_DIR}/include")

View File

@ -1,3 +1,37 @@
-------------------------------------------------------------------
Sun May 29 21:00:51 UTC 2016 - nemysis@openSUSE.org
- Use -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} instead of -DCMAKE_INSTALL_PREFIX=/usr
-------------------------------------------------------------------
Sun May 29 14:07:23 UTC 2016 - nemysis@openSUSE.org
- After discussion with Upstream removed asteroid-1.2.1-CMakeLists.txt.patch
and sed for path, use cmake . -DCMAKE_INSTALL_PREFIX=/usr
- Add AUTHORS to Documentation
- Change generate-service-file.sh to use <service name="tar_scm" mode="disabled">
and more
- Add _servicedata
-------------------------------------------------------------------
Wed May 25 21:07:49 UTC 2016 - nemysis@openSUSE.org
- Used "osc service localrun" that works check script
-------------------------------------------------------------------
Wed May 25 15:43:42 UTC 2016 - nemysis@openSUSE.org
- Add asteroid-1.2.1+git-4efc7fc.tar.bz2 that works
"osc service localrun source_validator"
-------------------------------------------------------------------
Tue May 24 20:48:43 UTC 2016 - nemysis@openSUSE.org
- Rerolled tarball
- Add %global commit and %global shortcommit
- Add _service and generate-service-file.sh
- Remove check %if 0%{?suse_version}, because is only for openSUSE
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Oct 30 15:23:11 UTC 2014 - nemysis@gmx.ch Thu Oct 30 15:23:11 UTC 2014 - nemysis@gmx.ch

View File

@ -1,7 +1,7 @@
# #
# spec file for package asteroid # spec file for package asteroid
# #
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,6 +16,9 @@
# #
%global commit 4efc7fc0a1246f023d6f96b94081678e302ab430
%global shortcommit %(c=%{commit}; echo ${c:0:7})
Name: asteroid Name: asteroid
Version: 1.2.1 Version: 1.2.1
Release: 0 Release: 0
@ -23,25 +26,20 @@ Summary: Modern version of the classic arcade Game
License: GPL-3.0 License: GPL-3.0
Group: Amusements/Games/Action/Arcade Group: Amusements/Games/Action/Arcade
Url: https://chazomaticus.github.io/asteroid/ Url: https://chazomaticus.github.io/asteroid/
# Downloaded from https://github.com/chazomaticus/asteroid Source0: %{name}-%{version}+git-4efc7fc.tar.bz2
# Packed as tar.bz2 Source1: generate-service-file.sh
Source0: %{name}-%{version}+git0e37197.tar.bz2
# PATCH-FEATURE-UPSTREAM Asteroid not build in openSUSE #1
Patch0: %{name}-%{version}-CMakeLists.txt.patch
%if 0%{?suse_version}
BuildRequires: fdupes
BuildRequires: update-desktop-files
%endif
BuildRequires: cmake BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: freeglut-devel BuildRequires: freeglut-devel
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: gtk2-devel BuildRequires: gtk2-devel
BuildRequires: hicolor-icon-theme BuildRequires: hicolor-icon-theme
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(SDL_mixer) BuildRequires: pkgconfig(SDL_mixer)
BuildRequires: pkgconfig(glu) BuildRequires: pkgconfig(glu)
BuildRequires: pkgconfig(sdl)
BuildRequires: pkgconfig(xi) BuildRequires: pkgconfig(xi)
BuildRequires: pkgconfig(xmu) BuildRequires: pkgconfig(xmu)
BuildRequires: pkgconfig(sdl)
%description %description
Asteroid (just one!) is a modern version of the arcade classic Asteroids, Asteroid (just one!) is a modern version of the arcade classic Asteroids,
@ -50,31 +48,26 @@ It features a variety of powerups, taunting aliens, 3D textured asteroids,
face-melting sound effects, and infinite playability. face-melting sound effects, and infinite playability.
%prep %prep
%setup -q -n %{name} %setup -q -n %{name}-%{version}+git-%{shortcommit}
%patch0 # fix include
# fix include and path
sed -i -e 's|${OPENGL_LIBRARIES}|-lm ${OPENGL_LIBRARIES}|' \ sed -i -e 's|${OPENGL_LIBRARIES}|-lm ${OPENGL_LIBRARIES}|' \
-i -e 's|CMAKE_INSTALL_PREFIX ""|CMAKE_INSTALL_PREFIX "/usr"|' \
CMakeLists.txt CMakeLists.txt
%build %build
# Not works build with %%cmake # Not works build with %%cmake
cmake . cmake . -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix}
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
%make_install %make_install
%if 0%{?suse_version} %suse_update_desktop_file %{name}
%suse_update_desktop_file %{name} %fdupes -s %{buildroot}%{_prefix}
%fdupes -s %{buildroot}%{_prefix}
%endif
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc COPYING NEWS README.md %doc AUTHORS COPYING NEWS README.md
%{_bindir}/%{name} %{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop %{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/ %{_datadir}/icons/hicolor/

26
generate-service-file.sh Normal file
View File

@ -0,0 +1,26 @@
#!/bin/sh
commit=4efc7fc0a1246f023d6f96b94081678e302ab430
shortcommit=$(c=${commit}; echo ${c:0:7})
version=1.2.1+git
echo -n "Creating _service file ..."
cat << EOF > _service
<services>
<service name="tar_scm" mode="disabled">
<param name="url">git://github.com/chazomaticus/asteroid.git</param>
<param name="scm">git</param>
<param name="version">${version}-${shortcommit}</param>
<param name="changesgenerate">enable</param>
</service>
<service name="recompress" mode="disabled">
<param name="file">*.tar</param>
<param name="compression">bz2</param>
</service>
<service name="set_version" mode="disabled"/>
</services>
EOF
echo done