packages: Use $(CP) instead of $(INSTALL_BIN) for binaries.
[packages.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:=2.24
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:=5f5488ff3d31bdb9cd36b7991fe68408
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
28   TITLE:=Bluetooth utilities
29   URL:=http://www.bluez.org/
30 endef
31
32 define Package/bluez-utils/conffiles
33 /etc/bluetooth/givepin
34 /etc/bluetooth/hcid.conf
35 /etc/bluetooth/rfcomm.conf
36 /etc/config/bluetooth
37 endef
38
39 define Build/Configure
40         $(call Build/Configure/Default, \
41                 --disable-dbus \
42                 --disable-fuse \
43                 --disable-obex \
44                 --disable-alsa \
45                 --disable-cups \
46                 --disable-pcmcia \
47                 --disable-initscripts \
48                 --disable-bccmd \
49                 --disable-avctrl \
50                 --disable-hid2hci \
51                 --disable-dfutool \
52                 --disable-bcm203x \
53                 --disable-bluepin \
54                 --with-bluez="$(STAGING_DIR)/usr/include" \
55                 --with-usb=no \
56         )
57 endef
58
59 define Build/Compile
60         $(MAKE) -C $(PKG_BUILD_DIR) \
61                 DESTDIR="$(PKG_INSTALL_DIR)" \
62                 all install
63 endef
64
65 define Package/bluez-utils/install
66         $(INSTALL_DIR) $(1)/usr/bin
67         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
68         $(INSTALL_DIR) $(1)/usr/sbin
69         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
70         $(INSTALL_DIR) $(1)/etc/bluetooth
71         $(CP) $(PKG_INSTALL_DIR)/../hcid/hcid.conf $(1)/etc/bluetooth/
72         $(CP) $(PKG_INSTALL_DIR)/../rfcomm/rfcomm.conf $(1)/etc/bluetooth/
73         install -m0700 ./files/givepin $(1)/etc/bluetooth/
74         $(INSTALL_DIR) $(1)/etc/config
75         $(INSTALL_DATA) ./files/bluetooth.conf $(1)/etc/config/bluetooth
76         $(INSTALL_DIR) $(1)/etc/init.d
77         $(INSTALL_BIN) ./files/bluez-utils.init $(1)/etc/init.d/bluez-utils
78 endef
79
80 $(eval $(call BuildPackage,bluez-utils))