All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [RFC PATCH] Add OpenTyrian package (SDL game)
@ 2014-02-05 18:17 julien.boibessot at free.fr
  2014-02-05 20:41 ` Thomas Petazzoni
  2014-02-05 22:42 ` Arnout Vandecappelle
  0 siblings, 2 replies; 6+ messages in thread
From: julien.boibessot at free.fr @ 2014-02-05 18:17 UTC (permalink / raw)
  To: buildroot

From: Julien Boibessot <julien.boibessot@armadeus.com>


Signed-off-by: Julien Boibessot <julien.boibessot@armadeus.com>
---
 Comments are welcome on why DOWNLOAD macro fails to get data and if it's
 the good way to do !!

 package/Config.in                |    1 +
 package/opentyrian/Config.in     |   25 +++++++++++++++++
 package/opentyrian/opentyrian.mk |   55 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 81 insertions(+), 0 deletions(-)
 create mode 100644 package/opentyrian/Config.in
 create mode 100644 package/opentyrian/opentyrian.mk

diff --git a/package/Config.in b/package/Config.in
index 631d8b2..b8a67f3 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -159,6 +159,7 @@ source "package/doom-wad/Config.in"
 source "package/gnuchess/Config.in"
 source "package/lbreakout2/Config.in"
 source "package/ltris/Config.in"
+source "package/opentyrian/Config.in"
 source "package/prboom/Config.in"
 source "package/rubix/Config.in"
 endmenu
diff --git a/package/opentyrian/Config.in b/package/opentyrian/Config.in
new file mode 100644
index 0000000..81050bd
--- /dev/null
+++ b/package/opentyrian/Config.in
@@ -0,0 +1,25 @@
+config BR2_PACKAGE_OPENTYRIAN
+	bool "OpenTyrian"
+	select BR2_PACKAGE_SDL
+	select BR2_PACKAGE_SDL_NET
+	help
+	  OpenTyrian is a port of the DOS shoot-em-up Tyrian. It uses SDL,
+	  making it easily cross-platform.
+	  The original Tyrian data files, that have since been released as
+	  Freeware, will be installed.
+	  A display with minimum 640x480 resolution and a keyboard are needed
+	  to play the game.
+	  If you want some sound, activate ALSA with OSS emulation.
+
+	  http://code.google.com/p/opentyrian/
+
+if BR2_PACKAGE_OPENTYRIAN
+
+config BR2_PACKAGE_OPENTYRIAN_NET
+	bool "network support"
+	default y
+	select BR2_PACKAGE_SDL_NET
+	help
+	  Activates network support in OpenTyrian. Will add SDL_net.
+
+endif
diff --git a/package/opentyrian/opentyrian.mk b/package/opentyrian/opentyrian.mk
new file mode 100644
index 0000000..f0a635d
--- /dev/null
+++ b/package/opentyrian/opentyrian.mk
@@ -0,0 +1,55 @@
+###############################################################################
+#
+# OpenTyrian
+#
+###############################################################################
+
+OPENTYRIAN_VERSION = 2.1.20130907
+OPENTYRIAN_SITE = http://www.camanis.net/opentyrian/releases/
+OPENTYRIAN_SOURCE = opentyrian-$(OPENTYRIAN_VERSION)-src.tar.gz
+OPENTYRIAN_LICENSE = GPLv2+ Freeware
+OPENTYRIAN_LICENSE_FILES = COPYING README
+
+OPENTYRIAN_DEPENDENCIES = sdl
+
+ifeq ($(BR2_PACKAGE_OPENTYRIAN_NET),y)
+OPENTYRIAN_DEPENDENCIES += sdl_net
+OPENTYRIAN_NETWORK = true
+else
+OPENTYRIAN_NETWORK = false
+endif
+
+OPENTYRIAN_DATA = tyrian21.zip
+OPENTYRIAN_DATA_SITE = http://sites.google.com/a/camanis.net/opentyrian/tyrian/
+
+define OPENTYRIAN_DOWNLOAD_DATA
+	@$(call MESSAGE,Downloading data)
+#	@$(call DOWNLOAD,$(OPENTYRIAN_DATA_SITE),$(OPENTYRIAN_DATA)) << doesn't work !!
+	cd $(DL_DIR); $(WGET) -nc $(OPENTYRIAN_DATA_SITE)/$(OPENTYRIAN_DATA)
+endef
+OPENTYRIAN_POST_DOWNLOAD_HOOKS += OPENTYRIAN_DOWNLOAD_DATA
+
+define OPENTYRIAN_EXTRACT_DATA
+	unzip $(DL_DIR)/$(OPENTYRIAN_DATA) -d $(@D)
+endef
+OPENTYRIAN_POST_EXTRACT_HOOKS += OPENTYRIAN_EXTRACT_DATA
+
+define OPENTYRIAN_BUILD_CMDS
+        $(MAKE) PLATFORM=UNIX \
+		CC="$(TARGET_CC)" \
+		STRIP="$(STRIPCMD) $(STRIP_STRIP_UNNEEDED)" \
+		SDL_CONFIG="$(STAGING_DIR)/usr/bin/sdl-config" \
+		LDFLAGS="-lm" \
+		WITH_NETWORK="$(OPENTYRIAN_NETWORK)" \
+		-C $(@D) release
+endef
+
+define OPENTYRIAN_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/opentyrian $(TARGET_DIR)/usr/games/opentyrian
+	mkdir -p $(TARGET_DIR)/usr/share/opentyrian/data/
+	cp $(@D)/tyrian21/* $(TARGET_DIR)/usr/share/opentyrian/data/
+	rm -f $(TARGET_DIR)/usr/share/opentyrian/data/*.doc
+	rm -f $(TARGET_DIR)/usr/share/opentyrian/data/*.exe
+endef
+
+$(eval $(generic-package))
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [RFC PATCH] Add OpenTyrian package (SDL game)
  2014-02-05 18:17 [Buildroot] [RFC PATCH] Add OpenTyrian package (SDL game) julien.boibessot at free.fr
@ 2014-02-05 20:41 ` Thomas Petazzoni
  2014-02-05 22:42 ` Arnout Vandecappelle
  1 sibling, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2014-02-05 20:41 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed,  5 Feb 2014 19:17:23 +0100, julien.boibessot at free.fr wrote:

> diff --git a/package/opentyrian/Config.in b/package/opentyrian/Config.in
> new file mode 100644
> index 0000000..81050bd
> --- /dev/null
> +++ b/package/opentyrian/Config.in
> @@ -0,0 +1,25 @@
> +config BR2_PACKAGE_OPENTYRIAN
> +	bool "OpenTyrian"
> +	select BR2_PACKAGE_SDL
> +	select BR2_PACKAGE_SDL_NET

Why are you selecting SDL_NET here, and then provide an option for the
network support below? This looks odd.

> +	help
> +	  OpenTyrian is a port of the DOS shoot-em-up Tyrian. It uses SDL,
> +	  making it easily cross-platform.
> +	  The original Tyrian data files, that have since been released as
> +	  Freeware, will be installed.
> +	  A display with minimum 640x480 resolution and a keyboard are needed
> +	  to play the game.
> +	  If you want some sound, activate ALSA with OSS emulation.
> +
> +	  http://code.google.com/p/opentyrian/
> +
> +if BR2_PACKAGE_OPENTYRIAN
> +
> +config BR2_PACKAGE_OPENTYRIAN_NET
> +	bool "network support"
> +	default y
> +	select BR2_PACKAGE_SDL_NET
> +	help
> +	  Activates network support in OpenTyrian. Will add SDL_net.
> +
> +endif
> diff --git a/package/opentyrian/opentyrian.mk b/package/opentyrian/opentyrian.mk
> new file mode 100644
> index 0000000..f0a635d
> --- /dev/null
> +++ b/package/opentyrian/opentyrian.mk
> @@ -0,0 +1,55 @@
> +###############################################################################
> +#
> +# OpenTyrian

All lower-case.

> +#
> +###############################################################################
> +
> +OPENTYRIAN_VERSION = 2.1.20130907
> +OPENTYRIAN_SITE = http://www.camanis.net/opentyrian/releases/
> +OPENTYRIAN_SOURCE = opentyrian-$(OPENTYRIAN_VERSION)-src.tar.gz
> +OPENTYRIAN_LICENSE = GPLv2+ Freeware

What is under GPLv2+ and what is under a Freeware license?

> +OPENTYRIAN_LICENSE_FILES = COPYING README
> +
> +OPENTYRIAN_DEPENDENCIES = sdl
> +
> +ifeq ($(BR2_PACKAGE_OPENTYRIAN_NET),y)
> +OPENTYRIAN_DEPENDENCIES += sdl_net
> +OPENTYRIAN_NETWORK = true
> +else
> +OPENTYRIAN_NETWORK = false
> +endif
> +
> +OPENTYRIAN_DATA = tyrian21.zip
> +OPENTYRIAN_DATA_SITE = http://sites.google.com/a/camanis.net/opentyrian/tyrian/
> +
> +define OPENTYRIAN_DOWNLOAD_DATA
> +	@$(call MESSAGE,Downloading data)
> +#	@$(call DOWNLOAD,$(OPENTYRIAN_DATA_SITE),$(OPENTYRIAN_DATA)) << doesn't work !!

Even if it was working, it is not a good solution, because it does not
integrate properly with the download and licensing infrastructure.

We have the <pkg>_EXTRA_DOWNLOADS, but it works only if the file has to
be downloaded from the same site.

So my recommendation would be to create a separate package called
opentyrian-data, that installs this. And unless the data is needed at
build time, this package can be a runtime dependency, i.e selected from
Config.in, but not mentioned in OPENTYRIAN_DEPENDENCIES.

> +	cd $(DL_DIR); $(WGET) -nc $(OPENTYRIAN_DATA_SITE)/$(OPENTYRIAN_DATA)
> +endef
> +OPENTYRIAN_POST_DOWNLOAD_HOOKS += OPENTYRIAN_DOWNLOAD_DATA
> +
> +define OPENTYRIAN_EXTRACT_DATA
> +	unzip $(DL_DIR)/$(OPENTYRIAN_DATA) -d $(@D)
> +endef
> +OPENTYRIAN_POST_EXTRACT_HOOKS += OPENTYRIAN_EXTRACT_DATA
> +
> +define OPENTYRIAN_BUILD_CMDS
> +        $(MAKE) PLATFORM=UNIX \
> +		CC="$(TARGET_CC)" \
> +		STRIP="$(STRIPCMD) $(STRIP_STRIP_UNNEEDED)" \
> +		SDL_CONFIG="$(STAGING_DIR)/usr/bin/sdl-config" \
> +		LDFLAGS="-lm" \
> +		WITH_NETWORK="$(OPENTYRIAN_NETWORK)" \
> +		-C $(@D) release
> +endef
> +
> +define OPENTYRIAN_INSTALL_TARGET_CMDS
> +	$(INSTALL) -D -m 0755 $(@D)/opentyrian $(TARGET_DIR)/usr/games/opentyrian
> +	mkdir -p $(TARGET_DIR)/usr/share/opentyrian/data/
> +	cp $(@D)/tyrian21/* $(TARGET_DIR)/usr/share/opentyrian/data/
> +	rm -f $(TARGET_DIR)/usr/share/opentyrian/data/*.doc
> +	rm -f $(TARGET_DIR)/usr/share/opentyrian/data/*.exe
> +endef
> +
> +$(eval $(generic-package))

Other than that, it looks good.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [RFC PATCH] Add OpenTyrian package (SDL game)
  2014-02-05 18:17 [Buildroot] [RFC PATCH] Add OpenTyrian package (SDL game) julien.boibessot at free.fr
  2014-02-05 20:41 ` Thomas Petazzoni
@ 2014-02-05 22:42 ` Arnout Vandecappelle
  2014-02-06  9:08   ` Thomas Petazzoni
  2014-02-07 17:17   ` Julien Boibessot
  1 sibling, 2 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2014-02-05 22:42 UTC (permalink / raw)
  To: buildroot

On 05/02/14 19:17, julien.boibessot at free.fr wrote:
> From: Julien Boibessot <julien.boibessot@armadeus.com>
> 
> 
> Signed-off-by: Julien Boibessot <julien.boibessot@armadeus.com>
> ---
>  Comments are welcome on why DOWNLOAD macro fails to get data and if it's
>  the good way to do !!
> 
>  package/Config.in                |    1 +
>  package/opentyrian/Config.in     |   25 +++++++++++++++++
>  package/opentyrian/opentyrian.mk |   55 ++++++++++++++++++++++++++++++++++++++
>  3 files changed, 81 insertions(+), 0 deletions(-)
>  create mode 100644 package/opentyrian/Config.in
>  create mode 100644 package/opentyrian/opentyrian.mk
> 
> diff --git a/package/Config.in b/package/Config.in
> index 631d8b2..b8a67f3 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -159,6 +159,7 @@ source "package/doom-wad/Config.in"
>  source "package/gnuchess/Config.in"
>  source "package/lbreakout2/Config.in"
>  source "package/ltris/Config.in"
> +source "package/opentyrian/Config.in"
>  source "package/prboom/Config.in"
>  source "package/rubix/Config.in"
>  endmenu
> diff --git a/package/opentyrian/Config.in b/package/opentyrian/Config.in
> new file mode 100644
> index 0000000..81050bd
> --- /dev/null
> +++ b/package/opentyrian/Config.in
> @@ -0,0 +1,25 @@
> +config BR2_PACKAGE_OPENTYRIAN
> +	bool "OpenTyrian"
> +	select BR2_PACKAGE_SDL
> +	select BR2_PACKAGE_SDL_NET
> +	help
> +	  OpenTyrian is a port of the DOS shoot-em-up Tyrian. It uses SDL,
> +	  making it easily cross-platform.
> +	  The original Tyrian data files, that have since been released as
> +	  Freeware, will be installed.
> +	  A display with minimum 640x480 resolution and a keyboard are needed
> +	  to play the game.
> +	  If you want some sound, activate ALSA with OSS emulation.
> +
> +	  http://code.google.com/p/opentyrian/
> +
> +if BR2_PACKAGE_OPENTYRIAN
> +
> +config BR2_PACKAGE_OPENTYRIAN_NET
> +	bool "network support"
> +	default y
> +	select BR2_PACKAGE_SDL_NET
> +	help
> +	  Activates network support in OpenTyrian. Will add SDL_net.
> +
> +endif
> diff --git a/package/opentyrian/opentyrian.mk b/package/opentyrian/opentyrian.mk
> new file mode 100644
> index 0000000..f0a635d
> --- /dev/null
> +++ b/package/opentyrian/opentyrian.mk
> @@ -0,0 +1,55 @@
> +###############################################################################
> +#
> +# OpenTyrian
> +#
> +###############################################################################
> +
> +OPENTYRIAN_VERSION = 2.1.20130907
> +OPENTYRIAN_SITE = http://www.camanis.net/opentyrian/releases/
> +OPENTYRIAN_SOURCE = opentyrian-$(OPENTYRIAN_VERSION)-src.tar.gz
> +OPENTYRIAN_LICENSE = GPLv2+ Freeware
> +OPENTYRIAN_LICENSE_FILES = COPYING README
> +
> +OPENTYRIAN_DEPENDENCIES = sdl
> +
> +ifeq ($(BR2_PACKAGE_OPENTYRIAN_NET),y)
> +OPENTYRIAN_DEPENDENCIES += sdl_net
> +OPENTYRIAN_NETWORK = true
> +else
> +OPENTYRIAN_NETWORK = false
> +endif
> +
> +OPENTYRIAN_DATA = tyrian21.zip
> +OPENTYRIAN_DATA_SITE = http://sites.google.com/a/camanis.net/opentyrian/tyrian/

 Why not simply http://www.camanis.net/opentyrian/tyrian21.zip ?

> +
> +define OPENTYRIAN_DOWNLOAD_DATA
> +	@$(call MESSAGE,Downloading data)
> +#	@$(call DOWNLOAD,$(OPENTYRIAN_DATA_SITE),$(OPENTYRIAN_DATA)) << doesn't work !!

 DOWNLOAD expects the full URL as the first argument. The optional second
argument exists for cases where the local file should be different than
the base of the URL (e.g. if it contains question marks or other madness).

> +	cd $(DL_DIR); $(WGET) -nc $(OPENTYRIAN_DATA_SITE)/$(OPENTYRIAN_DATA)
> +endef
> +OPENTYRIAN_POST_DOWNLOAD_HOOKS += OPENTYRIAN_DOWNLOAD_DATA
> +
> +define OPENTYRIAN_EXTRACT_DATA
> +	unzip $(DL_DIR)/$(OPENTYRIAN_DATA) -d $(@D)
> +endef
> +OPENTYRIAN_POST_EXTRACT_HOOKS += OPENTYRIAN_EXTRACT_DATA
> +
> +define OPENTYRIAN_BUILD_CMDS
> +        $(MAKE) PLATFORM=UNIX \
> +		CC="$(TARGET_CC)" \
> +		STRIP="$(STRIPCMD) $(STRIP_STRIP_UNNEEDED)" \

 Everything in target is already stripped automatically at the end, so
it's usually not needed to pass this.

> +		SDL_CONFIG="$(STAGING_DIR)/usr/bin/sdl-config" \
> +		LDFLAGS="-lm" \
> +		WITH_NETWORK="$(OPENTYRIAN_NETWORK)" \
> +		-C $(@D) release
> +endef
> +
> +define OPENTYRIAN_INSTALL_TARGET_CMDS
> +	$(INSTALL) -D -m 0755 $(@D)/opentyrian $(TARGET_DIR)/usr/games/opentyrian

 We prefer to install everything in /usr/bin.

 Regards,
 Arnout


> +	mkdir -p $(TARGET_DIR)/usr/share/opentyrian/data/
> +	cp $(@D)/tyrian21/* $(TARGET_DIR)/usr/share/opentyrian/data/
> +	rm -f $(TARGET_DIR)/usr/share/opentyrian/data/*.doc
> +	rm -f $(TARGET_DIR)/usr/share/opentyrian/data/*.exe
> +endef
> +
> +$(eval $(generic-package))
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [RFC PATCH] Add OpenTyrian package (SDL game)
  2014-02-05 22:42 ` Arnout Vandecappelle
@ 2014-02-06  9:08   ` Thomas Petazzoni
  2014-02-07 17:17   ` Julien Boibessot
  1 sibling, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2014-02-06  9:08 UTC (permalink / raw)
  To: buildroot

Dear Arnout Vandecappelle,

On Wed, 05 Feb 2014 23:42:23 +0100, Arnout Vandecappelle wrote:

> > +OPENTYRIAN_DATA = tyrian21.zip
> > +OPENTYRIAN_DATA_SITE = http://sites.google.com/a/camanis.net/opentyrian/tyrian/
> 
>  Why not simply http://www.camanis.net/opentyrian/tyrian21.zip ?
> 
> > +
> > +define OPENTYRIAN_DOWNLOAD_DATA
> > +	@$(call MESSAGE,Downloading data)
> > +#	@$(call DOWNLOAD,$(OPENTYRIAN_DATA_SITE),$(OPENTYRIAN_DATA)) << doesn't work !!
> 
>  DOWNLOAD expects the full URL as the first argument. The optional second
> argument exists for cases where the local file should be different than
> the base of the URL (e.g. if it contains question marks or other madness).

As I've replied separately, packages should not directly use the
DOWNLOAD macro, I believe.

> > +define OPENTYRIAN_BUILD_CMDS
> > +        $(MAKE) PLATFORM=UNIX \
> > +		CC="$(TARGET_CC)" \
> > +		STRIP="$(STRIPCMD) $(STRIP_STRIP_UNNEEDED)" \
> 
>  Everything in target is already stripped automatically at the end, so
> it's usually not needed to pass this.

Except if the package does its own stripping, and defaults to the host
strip to do this. In this case, we can either pass STRIP=/bin/true, or
pass the real STRIP value.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [RFC PATCH] Add OpenTyrian package (SDL game)
  2014-02-05 22:42 ` Arnout Vandecappelle
  2014-02-06  9:08   ` Thomas Petazzoni
@ 2014-02-07 17:17   ` Julien Boibessot
  2014-02-07 18:09     ` Yann E. MORIN
  1 sibling, 1 reply; 6+ messages in thread
From: Julien Boibessot @ 2014-02-07 17:17 UTC (permalink / raw)
  To: buildroot

Hello,

Arnout, Thomas,
thanks for the reviews !

On 02/05/2014 11:42 PM, Arnout Vandecappelle wrote:
> On 05/02/14 19:17, julien.boibessot at free.fr wrote:
>> From: Julien Boibessot <julien.boibessot@armadeus.com>
>>
>>
>> Signed-off-by: Julien Boibessot <julien.boibessot@armadeus.com>
>> ---
>>  Comments are welcome on why DOWNLOAD macro fails to get data and if it's
>>  the good way to do !!
>>
>>  package/Config.in                |    1 +
>>  package/opentyrian/Config.in     |   25 +++++++++++++++++
>>  package/opentyrian/opentyrian.mk |   55 ++++++++++++++++++++++++++++++++++++++
>>  3 files changed, 81 insertions(+), 0 deletions(-)
>>  create mode 100644 package/opentyrian/Config.in
>>  create mode 100644 package/opentyrian/opentyrian.mk
>>
>> diff --git a/package/Config.in b/package/Config.in
>> index 631d8b2..b8a67f3 100644
>> --- a/package/Config.in
>> +++ b/package/Config.in
>> @@ -159,6 +159,7 @@ source "package/doom-wad/Config.in"
>>  source "package/gnuchess/Config.in"
>>  source "package/lbreakout2/Config.in"
>>  source "package/ltris/Config.in"
>> +source "package/opentyrian/Config.in"
>>  source "package/prboom/Config.in"
>>  source "package/rubix/Config.in"
>>  endmenu
>> diff --git a/package/opentyrian/Config.in b/package/opentyrian/Config.in
>> new file mode 100644
>> index 0000000..81050bd
>> --- /dev/null
>> +++ b/package/opentyrian/Config.in
>> @@ -0,0 +1,25 @@
>> +config BR2_PACKAGE_OPENTYRIAN
>> +	bool "OpenTyrian"
>> +	select BR2_PACKAGE_SDL
>> +	select BR2_PACKAGE_SDL_NET
>> +	help
>> +	  OpenTyrian is a port of the DOS shoot-em-up Tyrian. It uses SDL,
>> +	  making it easily cross-platform.
>> +	  The original Tyrian data files, that have since been released as
>> +	  Freeware, will be installed.
>> +	  A display with minimum 640x480 resolution and a keyboard are needed
>> +	  to play the game.
>> +	  If you want some sound, activate ALSA with OSS emulation.
>> +
>> +	  http://code.google.com/p/opentyrian/
>> +
>> +if BR2_PACKAGE_OPENTYRIAN
>> +
>> +config BR2_PACKAGE_OPENTYRIAN_NET
>> +	bool "network support"
>> +	default y
>> +	select BR2_PACKAGE_SDL_NET
>> +	help
>> +	  Activates network support in OpenTyrian. Will add SDL_net.
>> +
>> +endif
>> diff --git a/package/opentyrian/opentyrian.mk b/package/opentyrian/opentyrian.mk
>> new file mode 100644
>> index 0000000..f0a635d
>> --- /dev/null
>> +++ b/package/opentyrian/opentyrian.mk
>> @@ -0,0 +1,55 @@
>> +###############################################################################
>> +#
>> +# OpenTyrian
>> +#
>> +###############################################################################
>> +
>> +OPENTYRIAN_VERSION = 2.1.20130907
>> +OPENTYRIAN_SITE = http://www.camanis.net/opentyrian/releases/
>> +OPENTYRIAN_SOURCE = opentyrian-$(OPENTYRIAN_VERSION)-src.tar.gz
>> +OPENTYRIAN_LICENSE = GPLv2+ Freeware
>> +OPENTYRIAN_LICENSE_FILES = COPYING README
>> +
>> +OPENTYRIAN_DEPENDENCIES = sdl
>> +
>> +ifeq ($(BR2_PACKAGE_OPENTYRIAN_NET),y)
>> +OPENTYRIAN_DEPENDENCIES += sdl_net
>> +OPENTYRIAN_NETWORK = true
>> +else
>> +OPENTYRIAN_NETWORK = false
>> +endif
>> +
>> +OPENTYRIAN_DATA = tyrian21.zip
>> +OPENTYRIAN_DATA_SITE = http://sites.google.com/a/camanis.net/opentyrian/tyrian/
>  Why not simply http://www.camanis.net/opentyrian/tyrian21.zip ?

it also works :-)

>
>> +
>> +define OPENTYRIAN_DOWNLOAD_DATA
>> +	@$(call MESSAGE,Downloading data)
>> +#	@$(call DOWNLOAD,$(OPENTYRIAN_DATA_SITE),$(OPENTYRIAN_DATA)) << doesn't work !!
>  DOWNLOAD expects the full URL as the first argument. The optional second
> argument exists for cases where the local file should be different than
> the base of the URL (e.g. if it contains question marks or other madness).

I think I will create an opentyrian-data package to solve my problem, as
Thomas advised.
(sources and data aren't in the same server directories)

>
>> +	cd $(DL_DIR); $(WGET) -nc $(OPENTYRIAN_DATA_SITE)/$(OPENTYRIAN_DATA)
>> +endef
>> +OPENTYRIAN_POST_DOWNLOAD_HOOKS += OPENTYRIAN_DOWNLOAD_DATA
>> +
>> +define OPENTYRIAN_EXTRACT_DATA
>> +	unzip $(DL_DIR)/$(OPENTYRIAN_DATA) -d $(@D)
>> +endef
>> +OPENTYRIAN_POST_EXTRACT_HOOKS += OPENTYRIAN_EXTRACT_DATA
>> +
>> +define OPENTYRIAN_BUILD_CMDS
>> +        $(MAKE) PLATFORM=UNIX \
>> +		CC="$(TARGET_CC)" \
>> +		STRIP="$(STRIPCMD) $(STRIP_STRIP_UNNEEDED)" \
>  Everything in target is already stripped automatically at the end, so
> it's usually not needed to pass this.

yes but OpenTyrian Makefile otherwise uses host strip and fails to build.
So I will use Thomas method (STRIP=/bin/true).

>
>> +		SDL_CONFIG="$(STAGING_DIR)/usr/bin/sdl-config" \
>> +		LDFLAGS="-lm" \
>> +		WITH_NETWORK="$(OPENTYRIAN_NETWORK)" \
>> +		-C $(@D) release
>> +endef
>> +
>> +define OPENTYRIAN_INSTALL_TARGET_CMDS
>> +	$(INSTALL) -D -m 0755 $(@D)/opentyrian $(TARGET_DIR)/usr/games/opentyrian
>  We prefer to install everything in /usr/bin.

prboom & rubix packages already explicitly install everything in
/usr/games/... What should I do ?

Best regards,

Julien


>
>  Regards,
>  Arnout
>
>
>> +	mkdir -p $(TARGET_DIR)/usr/share/opentyrian/data/
>> +	cp $(@D)/tyrian21/* $(TARGET_DIR)/usr/share/opentyrian/data/
>> +	rm -f $(TARGET_DIR)/usr/share/opentyrian/data/*.doc
>> +	rm -f $(TARGET_DIR)/usr/share/opentyrian/data/*.exe
>> +endef
>> +
>> +$(eval $(generic-package))
>>
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [RFC PATCH] Add OpenTyrian package (SDL game)
  2014-02-07 17:17   ` Julien Boibessot
@ 2014-02-07 18:09     ` Yann E. MORIN
  0 siblings, 0 replies; 6+ messages in thread
From: Yann E. MORIN @ 2014-02-07 18:09 UTC (permalink / raw)
  To: buildroot

Beno?t, All,

On 2014-02-07 18:17 +0100, Julien Boibessot spake thusly:
[--SNIP--]
> >> +		SDL_CONFIG="$(STAGING_DIR)/usr/bin/sdl-config" \
> >> +		LDFLAGS="-lm" \
> >> +		WITH_NETWORK="$(OPENTYRIAN_NETWORK)" \
> >> +		-C $(@D) release
> >> +endef
> >> +
> >> +define OPENTYRIAN_INSTALL_TARGET_CMDS
> >> +	$(INSTALL) -D -m 0755 $(@D)/opentyrian $(TARGET_DIR)/usr/games/opentyrian
> >  We prefer to install everything in /usr/bin.
> 
> prboom & rubix packages already explicitly install everything in
> /usr/games/... What should I do ?

Send a patch so they install in /usr instead? ;-)

Those are packages that went in a loooong time ago, even before Peter
took over maintainership, so they might not follow the current
conventions.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-02-07 18:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-05 18:17 [Buildroot] [RFC PATCH] Add OpenTyrian package (SDL game) julien.boibessot at free.fr
2014-02-05 20:41 ` Thomas Petazzoni
2014-02-05 22:42 ` Arnout Vandecappelle
2014-02-06  9:08   ` Thomas Petazzoni
2014-02-07 17:17   ` Julien Boibessot
2014-02-07 18:09     ` Yann E. MORIN

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.