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