0458913829bc6d80670cef1d1a50c39538d90ee6
[openwrt/svn-archive/archive.git] / net / irssi / 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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=irssi
11 PKG_VERSION:=0.8.13
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://irssi.org/files/
16 PKG_MD5SUM:=0d6fc2203832b514eff014fffd574664
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/irssi/Default
23 SUBMENU:=Instant Messaging
24 SECTION:=net
25 CATEGORY:=Network
26 DEPENDS:=+glib2 +libncurses
27 TITLE:=console irc client
28 URL:=http://irssi.org/
29 endef
30
31 define Package/irssi/Default/description
32 Irssi is a terminal based IRC client for UNIX systems.
33 endef
34
35 define Package/irssi
36 $(call Package/irssi/Default)
37 TITLE+= (without OpenSSL support)
38 endef
39
40 define Package/irssi/description
41 $(call Package/irssi/Default/description)
42 This package is built without OpenSSL support.
43 endef
44
45 define Package/irssi-openssl
46 $(call Package/irssi/Default)
47 TITLE+= (with OpenSSL support)
48 DEPENDS+= +libopenssl
49 endef
50
51 define Package/irssi-openssl/description
52 $(call Package/irssi/Default/description)
53 This package is built with OpenSSL support.
54 endef
55
56 define Build/Template
57
58 $(STAMP_BUILT)-$(2): $(STAMP_PREPARED)
59 -$(MAKE) -C $(PKG_BUILD_DIR) clean
60 $(call Build/Configure/Default, \
61 --with-perl=no \
62 --with-glib-prefix="$(STAGING_DIR)/usr" \
63 --with-textui \
64 --without-terminfo \
65 --without-bot \
66 --without-file-offset-size \
67 --disable-ipv6 \
68 --disable-proxy \
69 $(3))
70 $(MAKE) -C $(PKG_BUILD_DIR)
71 ( cd $(PKG_BUILD_DIR); mv -f src/fe-text/irssi $(PKG_NAME)-$(2) )
72 touch $$@
73
74 $(STAMP_BUILT): $(STAMP_BUILT)-$(2)
75
76 define Package/$(1)/install
77 $(INSTALL_DIR) $$(1)/usr/bin
78 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME)-$(2) $$(1)/usr/bin/$(PKG_NAME)
79 endef
80 endef
81
82 EXTRA_CFLAGS+=-I$(STAGING_DIR)/include -I$(STAGING_DIR)/usr/lib/libiconv/include -I$(STAGING_DIR)/usr/lib/libintl/include
83 EXTRA_LDFLAGS+=-L$(STAGING_DIR)/usr/lib/libiconv/lib -L$(STAGING_DIR)/usr/lib/libintl/lib
84
85 ifneq ($(SDK)$(CONFIG_PACKAGE_irssi),)
86 define Build/without-ssl
87 $(call Build/Template,irssi,without-ssl, \
88 --without-ssl \
89 --disable-ssl \
90 )
91 endef
92 endif
93 $(eval $(Build/without-ssl))
94
95 ifneq ($(SDK)$(CONFIG_PACKAGE_irssi-openssl),)
96 define Build/with-openssl
97 $(call Build/Template,irssi-openssl,with-openssl, \
98 --with-ssl="$(STAGING_DIR)/usr" \
99 )
100 endef
101 endif
102 $(eval $(Build/with-openssl))
103
104 $(eval $(call BuildPackage,irssi))
105 $(eval $(call BuildPackage,irssi-openssl))
106