Root/supertux/Makefile

1#
2# This is free software, licensed under the GNU General Public License v2.
3#
4
5include $(TOPDIR)/rules.mk
6
7PKG_NAME:=supertux
8PKG_VERSION:=0.1.3
9PKG_RELEASE:=1
10
11PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
12PKG_SOURCE_URL:=http://download.berlios.de/$(PKG_NAME)/
13PKG_MD5SUM:=f2fc288459f33d5cd8f645fbca737a63
14
15include $(INCLUDE_DIR)/package.mk
16
17define Package/supertux
18  TITLE:=supertux
19  SECTION:=games
20  CATEGORY:=Games
21  URL:=http://supertux.lethargik.org
22  DEPENDS:=+libsdl +libsdl-image +libmikmod
23endef
24
25define Package/supertux/description
26  SuperTux is a classic 2D jump'n run sidescroller game in a style similar to the original Super Mario games covered under the GPL.
27endef
28
29CONFIGURE_ARGS+=--disable-opengl \
30        --disable-sdltest \
31        --with-sdl-prefix=$(STAGING_DIR)/usr \
32        --enable-320x240
33
34TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib
35
36define Build/Configure
37    ( cd $(PKG_BUILD_DIR) ; ./autogen.sh )
38    $(call Build/Configure/Default)
39endef
40
41define Build/Prepare
42    $(call Build/Prepare/Default)
43    (\
44$(CP) $(FILES_DIR)/img-resize.sh $(PKG_BUILD_DIR); \
45$(CP) $(FILES_DIR)/supertux-smallsize-data.tar.bz2 $(PKG_BUILD_DIR); \
46cd $(PKG_BUILD_DIR); \
47for i in background shared tilesets title worldmap; do \
48    echo "Converting images in $(PKG_BUILD_DIR)/data/images/$$$$i..."; \
49    cd $(PKG_BUILD_DIR)/data/images/$$$$i; \
50    sh $(PKG_BUILD_DIR)/img-resize.sh; \
51done; \
52bzip2 -dc $(PKG_BUILD_DIR)/supertux-smallsize-data.tar.bz2 | $(TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xf -; \
53)
54endef
55
56define Package/supertux/install
57    $(INSTALL_DIR) \
58        $(1)/usr/bin/ \
59        $(1)/usr/share/supertux/{images,levels,music,sounds} \
60
61    $(INSTALL_BIN) \
62        $(PKG_BUILD_DIR)/src/supertux \
63        $(1)/usr/bin/
64
65    $(CP) \
66        $(PKG_BUILD_DIR)/data/{images,levels,music,sounds,supertux.strf,*.txt} \
67        $(1)/usr/share/supertux
68
69    rm -rf \
70        $(1)/usr/share/supertux/images/{background,shared,tilesets,title,worldmap}/org
71
72    ln -s \
73        SALCON.MOD \
74        $(1)/usr/share/supertux/music/salcon.mod
75
76    ln -s \
77        SALCON-fast.MOD \
78        $(1)/usr/share/supertux/music/salcon-fast.mod
79endef
80
81$(eval $(call RequireCommand,pngcrush,Please install pngcrush.))
82$(eval $(call RequireCommand,convert,Please install imagemagick.))
83$(eval $(call BuildPackage,supertux))
84

Archive Download this file



interactive