From 9aaeb4623d3ff5746e665bc17914eefd292b7dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20K=C3=BChling?= Date: Sun, 2 Jan 2011 15:19:00 +0100 Subject: New OpenWrt package for GNU Octave. Experimental/probably still broken. Work in progress. Committing it as compilation seems to take forever. Not sure whether I can finish this within a few days. --- nethack/Makefile | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 nethack/Makefile (limited to 'nethack/Makefile') diff --git a/nethack/Makefile b/nethack/Makefile new file mode 100644 index 0000000..e843bd4 --- /dev/null +++ b/nethack/Makefile @@ -0,0 +1,73 @@ +# +# Copyright (C) 2009 Qi Hardware Inc. +# Author: Xiangfu Liu +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=nethack +PKG_VERSION:=343 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tgz +PKG_SOURCE_URL:=http://downloads.sourceforge.net/project/nethack/nethack/3.4.3/ +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-3.4.3 + +include $(INCLUDE_DIR)/package.mk + +define Package/nethack + SECTION:=games + CATEGORY:=Games + DEPENDS:=nethack + TITLE:=single player dungeon exploration game + DEPENDS:=+libncurses +endef + +define Package/nethack/description + NetHack is a single player dungeon exploration game +endef + +TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include +TARGET_LDFLAGS+= -Wl,-rpath-link=$(STAGING_DIR)/usr/lib + +define Build/Prepare + $(call Build/Prepare/Default) + (mkdir -p $(PKG_BUILD_DIR)/jemarch-bin; \ + cd $(PKG_BUILD_DIR)/; \ + wget http://www.jemarch.net/downloads/nanonote/nethack-3.4.3-nanonote-bin.tar.gz; \ + tar xf nethack-3.4.3-nanonote-bin.tar.gz -C jemarch-bin/; \ + ) +endef + +define Build/Compile + (cd $(PKG_BUILD_DIR)/sys/unix; \ + sh setup.sh; \ + cd ../../; \ + export CFLAGS="${TARGET_CFLAGS}";\ + export LDFLAGS="${TARGET_LDFLAGS}";\ + export PREFIX="${PKG_INSTALL_DIR}";\ + make;\ + ) +endef + +define Package/nethack/install + $(INSTALL_DIR) \ + $(1)/usr/bin \ + $(1)/usr/lib/nethackdir + + $(INSTALL_BIN) \ + $(PKG_BUILD_DIR)/src/nethack \ + $(1)/usr/lib/nethackdir/ + + $(CP) \ + $(PKG_BUILD_DIR)/jemarch-bin/nethack-3.4.3-nanonote-bin/lib/nethackdir/* + $(1)/usr/lib/nethackdir/ + + $(CP) \ + $(PKG_BUILD_DIR)/src/nethack \ + $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,nethack)) -- cgit v1.2.3