2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://bluez.sourceforge.net/download
17 PKG_MD5SUM:=d0ba50e251ae1e7f2c09024facde8e40
20 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23 include $(INCLUDE_DIR)/package.mk
25 define Package/bluez-libs
28 TITLE:=Bluetooth library
29 URL:=http://www.bluez.org/
32 define Build/Configure
33 $(call Build/Configure/Default, \
40 $(MAKE) -C $(PKG_BUILD_DIR) \
41 DESTDIR="$(PKG_INSTALL_DIR)" \
45 define Build/InstallDev
46 mkdir -p $(STAGING_DIR)/usr/include/bluetooth
47 $(CP) $(PKG_INSTALL_DIR)/usr/include/bluetooth/*.h $(STAGING_DIR)/usr/include/bluetooth
48 mkdir -p $(STAGING_DIR)/usr/lib
49 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.{a,so*} $(STAGING_DIR)/usr/lib/
50 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
51 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/bluez.pc $(STAGING_DIR)/usr/lib/pkgconfig/
52 $(SED) 's,-I$$$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/bluez.pc
53 $(SED) 's,-L$$$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/bluez.pc
56 define Build/UninstallDev
58 $(STAGING_DIR)/usr/include/bluetooth \
59 $(STAGING_DIR)/usr/lib/libbluetooth.{a,so*} \
60 $(STAGING_DIR)/usr/lib/pkgconfig/bluez.pc
63 define Package/bluez-libs/install
64 $(INSTALL_DIR) $(1)/usr/lib
65 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libbluetooth.so.* $(1)/usr/lib/
68 $(eval $(call BuildPackage,bluez-libs))