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 | SECTION:=games |
| 22 | CATEGORY:=Games |
| 23 | DEPENDS:=nethack |
| 24 | TITLE:=single player dungeon exploration game |
| 25 | DEPENDS:=+libncurses |
| 26 | endef |
| 27 | |
| 28 | define Package/nethack/description |
| 29 | NetHack is a single player dungeon exploration game |
| 30 | endef |
| 31 | |
| 32 | TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include |
| 33 | TARGET_LDFLAGS+= -Wl,-rpath-link=$(STAGING_DIR)/usr/lib |
| 34 | |
| 35 | define Build/Compile |
| 36 | (cd $(PKG_BUILD_DIR)/sys/unix; \ |
| 37 | sh setup.sh; \ |
| 38 | cd ../../; \ |
| 39 | export CFLAGS="${TARGET_CFLAGS}";\ |
| 40 | export LDFLAGS="${TARGET_LDFLAGS}";\ |
| 41 | export PREFIX="${PKG_INSTALL_DIR}";\ |
| 42 | make;\ |
| 43 | ) |
| 44 | endef |
| 45 | |
| 46 | define Package/nethack/install |
| 47 | $(INSTALL_DIR) \ |
| 48 | $(1)/usr/bin \ |
| 49 | |
| 50 | $(INSTALL_BIN) \ |
| 51 | $(PKG_BUILD_DIR)/src/nethack \ |
| 52 | $(1)/usr/bin/ |
| 53 | endef |
| 54 | |
| 55 | $(eval $(call BuildPackage,nethack)) |
| 56 |
