OpenWrt packages
Sign in or create your account | Project List | Help
OpenWrt packages Git Source Tree
Root/
| 1 | # |
| 2 | # Copyright (C) 2009 Qi Hardware Inc. |
| 3 | # Author: Xiangfu Liu <xiangfu@sharism.cc> |
| 4 | # |
| 5 | # This is free software, licensed under the GNU General Public License v2. |
| 6 | # See /LICENSE for more information. |
| 7 | # |
| 8 | |
| 9 | include $(TOPDIR)/rules.mk |
| 10 | |
| 11 | PKG_NAME:=nethack |
| 12 | PKG_VERSION:=343 |
| 13 | |
| 14 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tgz |
| 15 | PKG_SOURCE_URL:=http://downloads.sourceforge.net/project/nethack/nethack/3.4.3/ |
| 16 | PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-3.4.3 |
| 17 | |
| 18 | include $(INCLUDE_DIR)/package.mk |
| 19 | |
| 20 | define Package/nethack |
| 21 | MAINTAINER:="Xiangfu Liu" <xiangfu@sharism.cc> |
| 22 | SECTION:=games |
| 23 | CATEGORY:=Games |
| 24 | DEPENDS:=nethack |
| 25 | TITLE:=single player dungeon exploration game |
| 26 | DEPENDS:=+libncurses |
| 27 | endef |
| 28 | |
| 29 | define Package/nethack/description |
| 30 | NetHack is a single player dungeon exploration game |
| 31 | endef |
| 32 | |
| 33 | TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include |
| 34 | TARGET_LDFLAGS+= -Wl,-rpath-link=$(STAGING_DIR)/usr/lib |
| 35 | |
| 36 | define Build/Prepare |
| 37 | $(call Build/Prepare/Default) |
| 38 | # (mkdir -p $(PKG_BUILD_DIR)/jemarch-bin; \ |
| 39 | # cd $(PKG_BUILD_DIR)/; \ |
| 40 | # wget http://www.jemarch.net/downloads/nanonote/nethack-3.4.3-nanonote-bin.tar.gz; \ |
| 41 | # tar xf nethack-3.4.3-nanonote-bin.tar.gz -C jemarch-bin/; \ |
| 42 | # ) |
| 43 | endef |
| 44 | |
| 45 | define Build/Compile |
| 46 | (cd $(PKG_BUILD_DIR)/sys/unix; \ |
| 47 | sh setup.sh; \ |
| 48 | cd ../../; \ |
| 49 | export CFLAGS="${TARGET_CFLAGS}";\ |
| 50 | export LDFLAGS="${TARGET_LDFLAGS}";\ |
| 51 | export PREFIX="${PKG_INSTALL_DIR}";\ |
| 52 | make;\ |
| 53 | ) |
| 54 | endef |
| 55 | |
| 56 | define Package/nethack/install |
| 57 | $(INSTALL_DIR) \ |
| 58 | $(1)/usr/bin \ |
| 59 | $(1)/usr/games/lib/nethackdir |
| 60 | |
| 61 | $(INSTALL_BIN) \ |
| 62 | $(PKG_BUILD_DIR)/src/nethack \ |
| 63 | $(1)/usr/bin/ |
| 64 | |
| 65 | # $(CP) \ |
| 66 | # $(PKG_BUILD_DIR)/jemarch-bin/nethack-3.4.3-nanonote-bin/lib/nethackdir/* \ |
| 67 | # $(1)/usr/games/lib/nethackdir |
| 68 | endef |
| 69 | |
| 70 | $(eval $(call BuildPackage,nethack)) |
| 71 |
