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