replace lots of manual install commands with INSTALL_* variables
[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.0
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://weechat.flashtux.org/download/
17 PKG_MD5SUM:=69c292237bebd4b7a1ff29c0f9c76380
18 PKG_CAT:=bzcat
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/weechat
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+libncurses +liblua +libgnutls
29 TITLE:=Lightweight IRC client
30 DESCRIPTION:=\
31 Weechat is fast, light & extensible IRC client.
32 URL:=http://weechat.flashtux.org/
33 endef
34
35 define Build/Configure
36 $(call Build/Configure/Default, \
37 --with-debug=0 \
38 --with-libgnutls-prefix=$(STAGING_DIR)/usr \
39 --without-doc-xsl-prefix \
40 --without-libiconv-prefix \
41 --without-libintl-prefix \
42 --disable-aspell \
43 --enable-lua \
44 --with-lua-inc="$(STAGING_DIR)/usr/include" \
45 --with-lua-lib="$(STAGING_DIR)/usr/lib" \
46 --disable-perl \
47 --disable-python \
48 --disable-ruby \
49 )
50 endef
51
52 define Build/Compile
53 $(MAKE) -C $(PKG_BUILD_DIR) \
54 DESTDIR="$(PKG_INSTALL_DIR)" \
55 all install
56 endef
57
58 define Package/weechat/install
59 $(INSTALL_DIR) $(1)/usr/bin
60 $(CP) $(PKG_INSTALL_DIR)/usr/bin/weechat-curses $(1)/usr/bin/
61 $(INSTALL_DIR) $(1)/usr/lib/weechat/plugins
62 $(CP) $(PKG_INSTALL_DIR)/usr/lib/weechat/plugins/lua.so* $(1)/usr/lib/weechat/plugins/
63 endef
64
65 $(eval $(call BuildPackage,weechat))