95b25a97035f3cbbda24f679c821be49335df810
[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.24
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://bluez.sourceforge.net/download
17 PKG_MD5SUM:=cc3582da827bc4c468147af1afaa5aff
18
19 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
20 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/bluez-utils
25 SECTION:=utils
26 CATEGORY:=Utilities
27 DEPENDS:=+bluez-libs +libpthread +dbus
28 TITLE:=Bluetooth utilities
29 URL:=http://www.bluez.org/
30 endef
31
32 define Package/bluez-utils/conffiles
33 /etc/bluetooth/hcid.conf
34 /etc/bluetooth/rfcomm.conf
35 /etc/config/bluetooth
36 endef
37
38
39 define Build/Configure
40 $(call Build/Configure/Default, \
41 --enable-debug \
42 --enable-usb \
43 --enable-input \
44 --enable-serial \
45 --enable-network \
46 --with-bluez="$(STAGING_DIR)/usr/include" \
47 --with-usb=yes \
48 )
49 endef
50
51 define Build/Compile
52 $(MAKE) -C $(PKG_BUILD_DIR) \
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_BIN) $(PKG_INSTALL_DIR)/../daemon/passkey-agent $(1)/usr/sbin/
65 $(INSTALL_DIR) $(1)/etc/bluetooth
66 $(CP) $(PKG_INSTALL_DIR)/../hcid/hcid.conf $(1)/etc/bluetooth/
67 $(CP) $(PKG_INSTALL_DIR)/../rfcomm/rfcomm.conf $(1)/etc/bluetooth/
68 $(INSTALL_DIR) $(1)/etc/config
69 $(INSTALL_DATA) ./files/bluetooth.conf $(1)/etc/config/bluetooth
70 $(INSTALL_DIR) $(1)/etc/dbus-1/system.d/
71 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/../daemon/bluetooth.conf $(1)/etc/dbus-1/system.d/
72 $(INSTALL_DIR) $(1)/etc/init.d
73 $(INSTALL_BIN) ./files/bluez-utils.init $(1)/etc/init.d/bluez-utils
74 endef
75
76 $(eval $(call BuildPackage,bluez-utils))