OpenWrt packages
Sign in or create your account | Project List | Help
OpenWrt packages Git Source Tree
Root/
| Source at commit 3883523a1866972c357c1f11b57ae84b286398ef created 1 year 9 months ago. By kyak, kbd: install dumpkeys; bsd-games: change tetris keymap, fix primes | |
|---|---|
| 1 | # |
| 2 | # kyak@freenode/#qi-hardware |
| 3 | # |
| 4 | # This is free software, licensed under the GNU General Public License v2. |
| 5 | # |
| 6 | |
| 7 | include $(TOPDIR)/rules.mk |
| 8 | |
| 9 | PKG_NAME:=bsd-games |
| 10 | PKG_VERSION:=2.17 |
| 11 | PKG_RELEASE:=1 |
| 12 | |
| 13 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
| 14 | PKG_SOURCE_URL:=ftp://metalab.unc.edu/pub/Linux/games/ |
| 15 | PKG_MD5SUM:=238a38a3a017ca9b216fc42bde405639 |
| 16 | |
| 17 | include $(INCLUDE_DIR)/package.mk |
| 18 | |
| 19 | define Package/bsd-games |
| 20 | SUBMENU:=bsd-games |
| 21 | SECTION:=games |
| 22 | CATEGORY:=Games |
| 23 | URL:=ftp://metalab.unc.edu/pub/Linux/games/ |
| 24 | endef |
| 25 | |
| 26 | define Build/Configure |
| 27 | endef |
| 28 | CFLAGS:= |
| 29 | define Build/Compile |
| 30 | #Building tetris |
| 31 | cd $(PKG_BUILD_DIR)/tetris; \ |
| 32 | cp pathnames.h.in pathnames.h; \ |
| 33 | $(TARGET_CC) -c -O2 -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings -I$(STAGING_DIR)/usr/include input.c screen.c shapes.c scores.c tetris.c; \ |
| 34 | $(TARGET_CC) -lncurses -L$(STAGING_DIR)/usr/lib -o tetris input.o screen.o shapes.o scores.o tetris.o |
| 35 | |
| 36 | #Building primes |
| 37 | cd $(PKG_BUILD_DIR)/primes; \ |
| 38 | $(TARGET_CC) -c -O2 -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings pattern.c pr_tbl.c primes.c; \ |
| 39 | $(TARGET_CC) -lm -o primes pattern.o pr_tbl.o primes.o |
| 40 | |
| 41 | #Building worm |
| 42 | cd $(PKG_BUILD_DIR)/worm; \ |
| 43 | $(TARGET_CC) -lncurses -L$(STAGING_DIR)/usr/lib -I$(STAGING_DIR)/usr/include -O2 -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings -o worm worm.c |
| 44 | |
| 45 | #Building backgammon |
| 46 | cd $(PKG_BUILD_DIR)/backgammon; \ |
| 47 | cd common_source; \ |
| 48 | $(TARGET_CC) -c -O2 -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings -I$(STAGING_DIR)/usr/include -DEXEC_PATH=\"/usr/bin/backgammon\" -DTEACH_PATH=\"/usr/bin/teachgammon\" allow.c board.c check.c fancy.c init.c odds.c one.c save.c subs.c table.c; \ |
| 49 | cd ../backgammon; \ |
| 50 | $(TARGET_CC) -c -O2 -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings -I$(STAGING_DIR)/usr/include -I$(PKG_BUILD_DIR)/backgammon/common_source extra.c main.c move.c text.c version.c; \ |
| 51 | $(TARGET_CC) -lncurses -L$(STAGING_DIR)/usr/lib -o backgammon $(ECHO) ../common_source/*.o ../backgammon/*.o; \ |
| 52 | cd ../teachgammon; \ |
| 53 | $(TARGET_CC) -c -O2 -Wall -W -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-align -Wcast-qual -Wwrite-strings -I$(STAGING_DIR)/usr/include -I$(PKG_BUILD_DIR)/backgammon/common_source data.c teach.c ttext1.c ttext2.c tutor.c; \ |
| 54 | $(TARGET_CC) -lncurses -L$(STAGING_DIR)/usr/lib -o teachgammon $(ECHO) ../common_source/*.o ../teachgammon/*.o |
| 55 | endef |
| 56 | |
| 57 | define Package/tetris |
| 58 | $(call Package/bsd-games) |
| 59 | TITLE:=the game of tetris |
| 60 | DEPENDS:=+libncurses |
| 61 | endef |
| 62 | |
| 63 | define Package/tetris/install |
| 64 | $(INSTALL_DIR) \ |
| 65 | $(1)/usr/bin \ |
| 66 | $(1)/usr/share/games |
| 67 | |
| 68 | $(INSTALL_BIN) \ |
| 69 | $(PKG_BUILD_DIR)/tetris/tetris \ |
| 70 | $(1)/usr/bin/tetris |
| 71 | endef |
| 72 | |
| 73 | define Package/primes |
| 74 | $(call Package/bsd-games) |
| 75 | TITLE:=generate primes |
| 76 | endef |
| 77 | |
| 78 | define Package/primes/install |
| 79 | $(INSTALL_DIR) \ |
| 80 | $(1)/usr/bin |
| 81 | |
| 82 | $(INSTALL_BIN) \ |
| 83 | $(PKG_BUILD_DIR)/primes/primes \ |
| 84 | $(1)/usr/bin/primes |
| 85 | endef |
| 86 | |
| 87 | define Package/worm |
| 88 | $(call Package/bsd-games) |
| 89 | TITLE:=The growing worm game |
| 90 | DEPENDS:=+libncurses |
| 91 | endef |
| 92 | |
| 93 | define Package/worm/install |
| 94 | $(INSTALL_DIR) \ |
| 95 | $(1)/usr/bin |
| 96 | |
| 97 | $(INSTALL_BIN) \ |
| 98 | $(PKG_BUILD_DIR)/worm/worm \ |
| 99 | $(1)/usr/bin/worm |
| 100 | endef |
| 101 | |
| 102 | define Package/backgammon |
| 103 | $(call Package/bsd-games) |
| 104 | TITLE:=the game of backgammon |
| 105 | DEPENDS:=+libncurses |
| 106 | endef |
| 107 | |
| 108 | define Package/backgammon/install |
| 109 | $(INSTALL_DIR) \ |
| 110 | $(1)/usr/bin |
| 111 | |
| 112 | $(INSTALL_BIN) \ |
| 113 | $(PKG_BUILD_DIR)/backgammon/backgammon/backgammon \ |
| 114 | $(1)/usr/bin/backgammon |
| 115 | |
| 116 | $(INSTALL_BIN) \ |
| 117 | $(PKG_BUILD_DIR)/backgammon/teachgammon/teachgammon \ |
| 118 | $(1)/usr/bin/teachgammon |
| 119 | endef |
| 120 | |
| 121 | $(eval $(call BuildPackage,tetris)) |
| 122 | $(eval $(call BuildPackage,primes)) |
| 123 | $(eval $(call BuildPackage,worm)) |
| 124 | $(eval $(call BuildPackage,backgammon)) |
| 125 | |
