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