09e1f67f274b47b975fb45be217bcea1821b062a
[openwrt/svn-archive/archive.git] / utils / bluez-utils / 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:=bluez-utils
12 PKG_VERSION:=3.36
13 PKG_RELEASE:=3
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://bluez.sourceforge.net/download
17 PKG_MD5SUM:=4fc292b635ba7b442c7aaf5680199012
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/bluez-utils
22 SECTION:=utils
23 CATEGORY:=Utilities
24 DEPENDS:=+bluez-libs +libpthread +dbus +libintl +libiconv
25 TITLE:=Bluetooth utilities
26 URL:=http://www.bluez.org/
27 endef
28
29 define Package/bluez-utils/conffiles
30 /etc/bluetooth/hcid.conf
31 /etc/bluetooth/rfcomm.conf
32 /etc/config/bluetooth
33 endef
34
35 CONFIGURE_ARGS += \
36 --disable-glib \
37 --enable-pand \
38 --enable-rfcomm \
39 --enable-dund \
40 --enable-serial \
41 --enable-network \
42 --enable-usb \
43 --enable-input \
44 --disable-audio \
45 --with-bluez="$(STAGING_DIR)/usr/include" \
46 --with-usb=yes \
47
48 define Build/Compile
49 $(MAKE) -C $(PKG_BUILD_DIR) \
50 LDFLAGS="-L$(STAGING_DIR)/usr/lib \
51 -L$(STAGING_DIR)/usr/lib/libintl/lib \
52 -L$(STAGING_DIR)/usr/lib/libiconv/lib" \
53 DESTDIR="$(PKG_INSTALL_DIR)" \
54 all install
55 endef
56
57 #copy bluetooth.conf nach /etc/dbus-1/system.d/
58
59 define Package/bluez-utils/install
60 $(INSTALL_DIR) $(1)/usr/bin
61 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
62 $(INSTALL_DIR) $(1)/usr/sbin
63 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
64 $(INSTALL_DIR) $(1)/etc/bluetooth
65 $(CP) $(PKG_INSTALL_DIR)/../hcid/hcid.conf $(1)/etc/bluetooth/
66 $(CP) $(PKG_INSTALL_DIR)/../rfcomm/rfcomm.conf $(1)/etc/bluetooth/
67 $(INSTALL_DIR) $(1)/etc/config
68 $(INSTALL_DATA) ./files/bluetooth.conf $(1)/etc/config/bluetooth
69 $(INSTALL_DIR) $(1)/etc/dbus-1/system.d/
70 $(INSTALL_DATA) ./files/bluetooth.dbus $(1)/etc/dbus-1/system.d/bluetooth.conf
71 $(INSTALL_DIR) $(1)/etc/init.d
72 $(INSTALL_BIN) ./files/bluez-utils.init $(1)/etc/init.d/bluez-utils
73 endef
74
75 $(eval $(call BuildPackage,bluez-utils))