irssi Makefile style ++ :)
[openwrt/svn-archive/archive.git] / net / irssi / Makefile
1 #
2 # Copyright (C) 2006-2010 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:=irssi
11 PKG_VERSION:=0.8.14
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://irssi.org/files/
16 PKG_MD5SUM:=00efe7638dd596d5930dfa2aeae87b3a
17
18 PKG_FIXUP:=libtool
19
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/irssi/Default
25 SUBMENU:=Instant Messaging
26 SECTION:=net
27 CATEGORY:=Network
28 DEPENDS:=+glib2 +libncurses
29 TITLE:=Console IRC client
30 URL:=http://irssi.org/
31 endef
32
33 define Package/irssi/Default/description
34 Irssi is a terminal based IRC client for UNIX systems.
35 endef
36
37 define Package/irssi
38 $(call Package/irssi/Default)
39 TITLE+= (with OpenSSL support)
40 DEPENDS+= +libopenssl
41 VARIANT:=ssl
42 endef
43
44 define Package/irssi/description
45 $(call Package/irssi/Default/description)
46 This package is built with OpenSSL support.
47 endef
48
49 define Package/irssi-nossl
50 $(call Package/irssi/Default)
51 TITLE+= (without OpenSSL support)
52 VARIANT:=nossl
53 endef
54
55 define Package/irssi-nossl/description
56 $(call Package/irssi/Default/description)
57 This package is built without OpenSSL support.
58 endef
59
60 CONFIGURE_ARGS += \
61 --with-perl=no \
62 --with-glib-prefix="$(STAGING_DIR)/usr" \
63 --with-textui \
64 --without-terminfo \
65 --without-bot \
66 --disable-proxy
67
68 EXTRA_CFLAGS+= \
69 $(TARGET_CPPFLAGS) \
70 -I$(STAGING_DIR)/usr/lib/libiconv/include \
71 -I$(STAGING_DIR)/usr/lib/libintl/include
72
73 EXTRA_LDFLAGS+= \
74 -L$(STAGING_DIR)/usr/lib/libiconv/lib \
75 -L$(STAGING_DIR)/usr/lib/libintl/lib \
76 -lncurses
77
78 ifeq ($(BUILD_VARIANT),ssl)
79 CONFIGURE_ARGS += \
80 --with-ssl="$(STAGING_DIR)/usr"
81 endif
82
83 ifeq ($(BUILD_VARIANT),nossl)
84 CONFIGURE_ARGS += \
85 --without-ssl \
86 --disable-ssl
87 endif
88
89 define Package/irssi/install
90 $(INSTALL_DIR) $(1)/usr/bin
91 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/fe-text/$(PKG_NAME) $(1)/usr/bin/$(PKG_NAME)
92 endef
93
94 Package/irssi-nossl/install = $(Package/irssi/install)
95
96 $(eval $(call BuildPackage,irssi))
97 $(eval $(call BuildPackage,irssi-nossl))