Root/nethack/Makefile

Source at commit 1b3135c created 12 years 5 months ago.
By Xiangfu Liu, new package: SDL-widgets: a GUI toolkit on top of the SDL libraries
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
9include $(TOPDIR)/rules.mk
10
11PKG_NAME:=nethack
12PKG_VERSION:=343
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tgz
15PKG_SOURCE_URL:=http://downloads.sourceforge.net/project/nethack/nethack/3.4.3/
16PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-3.4.3
17
18include $(INCLUDE_DIR)/package.mk
19
20define 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
27endef
28
29define Package/nethack/description
30    NetHack is a single player dungeon exploration game
31endef
32
33TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include
34TARGET_LDFLAGS+= -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
35
36define 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    # )
43endef
44
45define 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    )
54endef
55
56define 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
68endef
69
70$(eval $(call BuildPackage,nethack))
71

Archive Download this file



interactive