5d2ff8a61c9accf99e13229faa0410f078be5b16
[openwrt/svn-archive/archive.git] / net / bitlbee / 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:=bitlbee
12 PKG_VERSION:=1.0.1
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://get.bitlbee.org/src \
17 http://get.bitlbee.be/src \
18 http://get.us.bitlbee.org/src \
19 http://ftp.snt.utwente.nl/pub/software/bitlbee/src
20 PKG_MD5SUM:=a4d7daa9b64898dd41a3a6d104692d9a
21 PKG_CAT:=zcat
22
23 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
24
25 PKG_BUILDDEP:=libopenssl glib1 libiconv
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/bitlbee
30 SECTION:=net
31 CATEGORY:=Network
32 DEPENDS:=+libopenssl +glib1 +libiconv
33 TITLE:=IRC gateway to IM chat networks
34 URL:=http://www.bitlbee.org/
35 endef
36
37 define Package/bitlbee/conffiles
38 /etc/bitlbee/motd.txt
39 /etc/bitlbee/bitlbee.conf
40 endef
41
42 define Build/Configure
43 # it's not GNU autoconf stuff
44 (cd $(PKG_BUILD_DIR); \
45 $(TARGET_CONFIGURE_OPTS) \
46 CFLAGS="$(TARGET_CFLAGS)" \
47 CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
48 LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
49 STAGING_DIR="$(STAGING_DIR)" \
50 STRIP="$(STRIP)" \
51 ./configure \
52 --prefix=/usr/ \
53 --bindir=/usr/sbin/ \
54 --etcdir=/etc/bitlbee/ \
55 --datadir=/usr/share/bitlbee/ \
56 --config=/var/lib/bitlbee/ \
57 --arch=OpenWrt \
58 --cpu="$(ARCH)" \
59 --debug=0 \
60 --strip=1 \
61 --sizeopt=1 \
62 --ipv6=1 \
63 --ssl=openssl \
64 --glib1=1 \
65 --glib1prefix="$(STAGING_DIR)/usr" \
66 );
67 endef
68
69 define Build/Compile
70 @echo 'CFLAGS+="-I$(STAGING_DIR)/usr/lib/libiconv/include"' >> \
71 $(PKG_BUILD_DIR)/Makefile.settings
72 @echo 'LFLAGS+="-L$(STAGING_DIR)/usr/lib/libiconv/lib"' >> \
73 $(PKG_BUILD_DIR)/Makefile.settings
74 $(MAKE) -C $(PKG_BUILD_DIR)
75 endef
76
77 define Package/bitlbee/install
78 $(MAKE) -C $(PKG_BUILD_DIR) \
79 DESTDIR="$(1)" install-etc install-bin
80 $(MAKE) -C $(PKG_BUILD_DIR)/doc/user-guide \
81 DESTDIR="$(1)" install
82 install -d -m0755 $(1)/etc/init.d
83 install -m0755 ./files/bitlbee.init $(1)/etc/init.d/bitlbee
84 endef
85
86 $(eval $(call BuildPackage,bitlbee))