Port osiris to -ng
[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:=2.24
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://bluez.sourceforge.net/download
18 PKG_MD5SUM:=
19 PKG_CAT:=zcat
20
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/bluez-utils
26 SECTION:=utils
27 CATEGORY:=Utilities
28 DEPENDS:=+bluez-libs +libpthread
29 TITLE:=Bluetooth utilities
30 DESCRIPTION:=Bluetooth utilities.
31 URL:=http://www.bluez.org/
32 endef
33
34 define Package/bluez-utils/conffiles
35 /etc/bluetooth/givepin
36 /etc/bluetooth/hcid.conf
37 /etc/bluetooth/rfcomm.conf
38 endef
39
40 define Build/Configure
41 (cd $(PKG_BUILD_DIR); rm -f config.cache; \
42 $(TARGET_CONFIGURE_OPTS) \
43 CFLAGS="$(TARGET_CFLAGS)" \
44 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
45 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
46 ./configure \
47 --target=$(GNU_TARGET_NAME) \
48 --host=$(GNU_TARGET_NAME) \
49 --build=$(GNU_HOST_NAME) \
50 --program-prefix="" \
51 --program-suffix="" \
52 --prefix=/usr \
53 --exec-prefix=/usr \
54 --bindir=/usr/bin \
55 --datadir=/usr/share \
56 --includedir=/usr/include \
57 --infodir=/usr/share/info \
58 --libdir=/usr/lib \
59 --libexecdir=/usr/lib \
60 --localstatedir=/var \
61 --mandir=/usr/share/man \
62 --sbindir=/usr/sbin \
63 --sysconfdir=/etc \
64 $(DISABLE_LARGEFILE) \
65 $(DISABLE_NLS) \
66 --enable-shared \
67 --enable-static \
68 --disable-rpath \
69 --disable-dbus \
70 --disable-fuse \
71 --disable-obex \
72 --disable-alsa \
73 --disable-cups \
74 --disable-pcmcia \
75 --disable-initscripts \
76 --disable-bccmd \
77 --disable-avctrl \
78 --disable-hid2hci \
79 --disable-dfutool \
80 --disable-bcm203x \
81 --disable-bluepin \
82 --with-bluez=$(STAGING_DIR)/usr/include \
83 --with-usb=$(STAGING_DIR)/usr/include \
84 );
85 endef
86
87 define Build/Compile
88 rm -rf $(PKG_INSTALL_DIR)
89 mkdir -p $(PKG_INSTALL_DIR)
90 $(MAKE) -C $(PKG_BUILD_DIR) \
91 DESTDIR="$(PKG_INSTALL_DIR)" \
92 all install
93 endef
94
95 define Package/bluez-utils/install
96 install -d -m0755 $(1)/usr/bin
97 $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
98 install -d -m0755 $(1)/usr/sbin
99 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/* $(1)/usr/sbin/
100 install -d -m0755 $(1)/etc/bluetooth
101 $(CP) $(PKG_INSTALL_DIR)/../hcid/hcid.conf $(1)/etc/bluetooth/
102 $(CP) $(PKG_INSTALL_DIR)/../rfcomm/rfcomm.conf $(1)/etc/bluetooth/
103 install -m0700 ./files/givepin $(1)/etc/bluetooth/
104 endef
105
106 $(eval $(call BuildPackage,bluez-utils))