[packages] massive change: replace occurences of -I$(STAGING_DIR)/{include,usr/includ...
[openwrt/svn-archive/archive.git] / net / bitchx / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=bitchx
11 PKG_VERSION:=1.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=ircii-pana-$(PKG_VERSION)-final.tar.gz
15 PKG_SOURCE_URL:=http://bitchx.org/files/source/
16 PKG_MD5SUM:=611d2dda222f00c10140236f4c331572
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/BitchX
19
20 PKG_BUILD_DEPENDS:=libncurses
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/bitchx
25 SUBMENU:=Instant Messaging
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+libncurses
29 TITLE:=popular IRC client
30 URL:=http://www.bitchx.org
31 endef
32
33 define Build/Compile
34 rm -rf $(PKG_INSTALL_DIR)
35 mkdir -p $(PKG_INSTALL_DIR)
36 $(MAKE) -C $(PKG_BUILD_DIR) \
37 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
38 DESTDIR="$(PKG_INSTALL_DIR)" \
39 all
40 mkdir -p $(PKG_INSTALL_DIR)/tmp
41 mkdir -p $(PKG_INSTALL_DIR)/etc/init.d
42 mkdir -p $(PKG_INSTALL_DIR)/usr/bin
43 mkdir -p $(PKG_INSTALL_DIR)/usr/lib/bx
44 mkdir -p $(PKG_INSTALL_DIR)/usr/share/man/man1
45 mkdir -p $(PKG_INSTALL_DIR)/usr/lib/bx/translation
46 mkdir -p $(PKG_INSTALL_DIR)/usr/lib/bx/plugins
47 mkdir -p $(PKG_INSTALL_DIR)/usr/lib/bx/help
48 $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/BitchX $(PKG_INSTALL_DIR)/usr/bin/BitchX-1.1-final
49 rm -f $(PKG_INSTALL_DIR)/usr/bin/BitchX
50 ln -s /usr/bin/BitchX-1.1-final $(PKG_INSTALL_DIR)/usr/bin/BitchX
51 $(INSTALL_DATA) $(PKG_BUILD_DIR)/BitchX.help $(PKG_INSTALL_DIR)/usr/lib/bx/BitchX.help
52 $(INSTALL_DATA) $(PKG_BUILD_DIR)/BitchX.ircnames $(PKG_INSTALL_DIR)/usr/lib/bx/BitchX.ircnames
53 $(INSTALL_DATA) $(PKG_BUILD_DIR)/BitchX.quit $(PKG_INSTALL_DIR)/usr/lib/bx/BitchX.quit
54 $(INSTALL_DATA) $(PKG_BUILD_DIR)/BitchX.reasons $(PKG_INSTALL_DIR)/usr/lib/bx/BitchX.kick
55 $(INSTALL_DATA) $(PKG_BUILD_DIR)/source/wserv $(PKG_INSTALL_DIR)/usr/lib/bx/wserv
56 $(INSTALL_BIN) $(PKG_BUILD_DIR)/source/scr-bx $(PKG_INSTALL_DIR)/usr/bin/scr-bx
57 $(CP) $(PKG_BUILD_DIR)/script $(PKG_INSTALL_DIR)/usr/lib/bx/
58 $(CP) $(PKG_BUILD_DIR)/translation $(PKG_INSTALL_DIR)/usr/lib/bx/
59 bzip2 $(PKG_INSTALL_DIR)/usr/lib/bx/translation/*
60 $(CP) ./files/bitchxrc $(PKG_INSTALL_DIR)/tmp/.bitchxrc
61 $(CP) ./files/bitchxrc.init $(PKG_INSTALL_DIR)/etc/init.d/bitchxrc
62 endef
63
64 define Package/bitchx/install
65 $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib $(1)/etc/init.d $(1)/tmp
66 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
67 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib
68 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/etc/init.d/bitchxrc $(1)/etc/init.d/
69 $(CP) $(PKG_INSTALL_DIR)/tmp/.bitchxrc $(1)/tmp
70 endef
71
72 $(eval $(call BuildPackage,bitchx))