OpenWrt packages
Sign in or create your account | Project List | Help
OpenWrt packages Git Source Tree
Root/
| 1 | # |
| 2 | # This is free software, licensed under the GNU General Public License v2. |
| 3 | # |
| 4 | |
| 5 | include $(TOPDIR)/rules.mk |
| 6 | |
| 7 | PKG_NAME:=supertux |
| 8 | PKG_VERSION:=0.1.3 |
| 9 | PKG_RELEASE:=1 |
| 10 | |
| 11 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 |
| 12 | PKG_SOURCE_URL:=http://download.berlios.de/$(PKG_NAME)/ |
| 13 | PKG_MD5SUM:=f2fc288459f33d5cd8f645fbca737a63 |
| 14 | |
| 15 | include $(INCLUDE_DIR)/package.mk |
| 16 | |
| 17 | define Package/supertux |
| 18 | TITLE:=supertux |
| 19 | SECTION:=games |
| 20 | CATEGORY:=Games |
| 21 | URL:=http://supertux.lethargik.org |
| 22 | DEPENDS:=+libsdl +libsdl-image +libmikmod +libsdl-ttf +libsdl-mixer +libstdcpp +libsdl-gfx |
| 23 | endef |
| 24 | |
| 25 | define 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. |
| 27 | endef |
| 28 | |
| 29 | CONFIGURE_ARGS+=--disable-opengl \ |
| 30 | --disable-sdltest \ |
| 31 | --with-sdl-prefix=$(STAGING_DIR)/usr \ |
| 32 | --enable-320x240 |
| 33 | |
| 34 | TARGET_LDFLAGS+=-Wl,-rpath-link=$(STAGING_DIR)/usr/lib |
| 35 | |
| 36 | define Build/Configure |
| 37 | ( cd $(PKG_BUILD_DIR) ; ./autogen.sh ) |
| 38 | $(call Build/Configure/Default) |
| 39 | endef |
| 40 | |
| 41 | define 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); \ |
| 46 | cd $(PKG_BUILD_DIR); \ |
| 47 | for 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; \ |
| 51 | done; \ |
| 52 | bzip2 -dc $(PKG_BUILD_DIR)/supertux-smallsize-data.tar.bz2 | $(TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xf -; \ |
| 53 | ) |
| 54 | endef |
| 55 | |
| 56 | define 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 |
| 79 | endef |
| 80 | |
| 81 | $(eval $(call RequireCommand,pngcrush,Please install pngcrush.)) |
| 82 | $(eval $(call RequireCommand,convert,Please install imagemagick.)) |
| 83 | $(eval $(call BuildPackage,supertux)) |
| 84 |
