77b876da47efd977caff04f4648cade74e4da512
[openwrt/svn-archive/archive.git] / net / weechat / 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:=weechat
12 PKG_VERSION:=0.2.5
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://weechat.flashtux.org/download/
17 PKG_MD5SUM:=42f96620c3b2fd3dca9768d9ce16dd06
18
19 PKG_FIXUP = libtool
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/weechat/Default
24 SUBMENU:=Instant Messaging
25 SECTION:=net
26 CATEGORY:=Network
27 TITLE:=Lightweight IRC client
28 URL:=http://weechat.flashtux.org/
29 endef
30
31 define Package/weechat/Default/description
32 Weechat is fast, light & extensible IRC client.
33 endef
34
35
36 define Package/weechat
37 $(call Package/weechat/Default)
38 MENU=1
39 DEPENDS:=+libiconv +libgnutls +libncurses
40 endef
41
42 define Package/weechat/description
43 $(call Package/weechat/Default/description)
44 endef
45
46
47 define Package/weechat-mod-charset
48 $(call Package/weechat/Default)
49 TITLE+= (charset plugin)
50 DEPENDS:=weechat
51 endef
52
53 define Package/weechat-mod-charset/description
54 $(call Package/weechat/Default/description)
55 This packages contains a charset plugin for Weechat.
56 endef
57
58
59 define Package/weechat-mod-lua
60 $(call Package/weechat/Default)
61 TITLE+= (LUA plugin)
62 DEPENDS:=weechat +liblua
63 endef
64
65 define Package/weechat-mod-lua/description
66 $(call Package/weechat/Default/description)
67 This packages contains an LUA scripting plugin for Weechat.
68 endef
69
70
71 CONFIGURE_ARGS+= \
72 --with-debug=0 \
73 --with-libgnutls-prefix=$(STAGING_DIR)/usr \
74 --without-doc-xsl-prefix \
75 --with-libiconv-prefix="$(STAGING_DIR)/usr/lib/libiconv" \
76 --without-libintl-prefix \
77 --disable-aspell \
78 --disable-perl \
79 --disable-python \
80 --disable-ruby \
81
82 CONFIGURE_VARS+= \
83 LDFLAGS="$$$$LDFLAGS -L$(STAGING_DIR)/usr/lib/libiconv/lib" \
84
85 ifndef ($(SDK)$(CONFIG_PACKAGE_weechat-mod-lua),)
86 CONFIGURE_ARGS+= \
87 --enable-lua \
88 --with-lua-inc="$(STAGING_DIR)/usr/include" \
89 --with-lua-lib="$(STAGING_DIR)/usr/lib"
90 CONFIGURE_VARS+= \
91 LIBS="-ldl -lm"
92 else
93 CONFIGURE_ARGS+= \
94 --disable-lua
95 endif
96
97 define Build/Compile
98 $(MAKE) -C $(PKG_BUILD_DIR) DESTDIR="$(PKG_INSTALL_DIR)" all install
99 endef
100
101 define Package/weechat/install
102 $(INSTALL_DIR) $(1)/usr/bin
103 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/weechat-curses $(1)/usr/bin/
104 $(INSTALL_DIR) $(1)/usr/lib/weechat/plugins
105 endef
106
107 define BuildPlugin
108
109 define Package/weechat-mod-$(1)/install
110 $(INSTALL_DIR) $$(1)/usr/lib/weechat/plugins
111 $(CP) $(PKG_INSTALL_DIR)/usr/lib/weechat/plugins/$(1).so* $$(1)/usr/lib/weechat/plugins/
112 endef
113
114 $$(eval $$(call BuildPackage,weechat-mod-$(1)))
115 endef
116
117 $(eval $(call BuildPackage,weechat))
118 $(eval $(call BuildPlugin,charset))
119 $(eval $(call BuildPlugin,lua))