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