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