upload tizen1.0 source
authorKim Kibum <kb0929.kim@samsung.com>
Sun, 29 Apr 2012 07:59:49 +0000 (16:59 +0900)
committerKim Kibum <kb0929.kim@samsung.com>
Sun, 29 Apr 2012 07:59:49 +0000 (16:59 +0900)
.gitignore [deleted file]
debian/changelog
packaging/bluez-ncurses.patch [new file with mode: 0644]
packaging/bluez.spec
src/adapter.c
src/agent.c
src/device.h
src/main.c
tools/hciconfig.c

diff --git a/.gitignore b/.gitignore
deleted file mode 100644 (file)
index 78aa43e..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-*.o
-*.a
-*.lo
-*.la
-*.so
-.deps
-.libs
-.dirstamp
-Makefile
-Makefile.in
-aclocal.m4
-config.guess
-config.h
-config.h.in
-config.log
-config.status
-config.sub
-configure
-depcomp
-compile
-install-sh
-libtool
-ltmain.sh
-missing
-stamp-h1
-autom4te.cache
-
-ylwrap
-lexer.c
-parser.h
-parser.c
-
-bluez.pc
-lib/bluetooth
-src/builtin.h
-src/bluetoothd
-audio/telephony.c
-scripts/bluetooth.rules
-scripts/97-bluetooth.rules
-scripts/97-bluetooth-hid2hci.rules
-
-sbc/sbcdec
-sbc/sbcenc
-sbc/sbcinfo
-sbc/sbctester
-
-attrib/gatttool
-tracer/hcitrace
-tools/avctrl
-tools/avinfo
-tools/bccmd
-tools/ciptool
-tools/dfubabel
-tools/dfutool
-tools/hciattach
-tools/hciconfig
-tools/hcieventmask
-tools/hcisecfilter
-tools/hcitool
-tools/hid2hci
-tools/rfcomm
-tools/l2ping
-tools/ppporc
-tools/sdptool
-cups/bluetooth
-test/agent
-test/bdaddr
-test/hciemu
-test/attest
-test/hstest
-test/avtest
-test/l2test
-test/rctest
-test/scotest
-test/gaptest
-test/sdptest
-test/lmptest
-test/ipctest
-test/btiotest
-test/test-textfile
-compat/dund
-compat/hidd
-compat/pand
-
-doc/*.bak
-doc/*.stamp
-doc/bluez.*
-doc/bluez-*.txt
-doc/*.sgml
-doc/version.xml
-doc/xml
-doc/html
-src/bluetoothd.8
-
-debian/*.debhelper.log
-debian/*.substvars
-debian/bluez-dbg/
-debian/*.install
-debian/bluez-gstreamer/
-debian/bluez/
-debian/files
-debian/libbluetooth-dev/
-debian/*.debhelper
-debian/libbluetooth3/
-debian/tmp/
\ No newline at end of file
index be2f7cd..2d2b31e 100644 (file)
@@ -1,3 +1,11 @@
+bluez (4.98-slp2+1-3) unstable; urgency=low
+
+  * Release Tizen 1.0
+  * Git: pkgs/b/bluez
+  * Tag: bluez_4.98-slp2+1-3
+
+ -- DoHyun Pyun <dh79.pyun@samsung.com>  Tue, 20 Mar 2012 17:32:01 +0900
+
 bluez (4.98-slp2+1-2) unstable; urgency=low
 
   * Change "SAMSUNG_PATCH" -> "TIZEN_PATCH"
diff --git a/packaging/bluez-ncurses.patch b/packaging/bluez-ncurses.patch
new file mode 100644 (file)
index 0000000..bce2dd9
--- /dev/null
@@ -0,0 +1,13 @@
+Index: bluez-4.98/Makefile.tools
+===================================================================
+--- bluez-4.98.orig/Makefile.tools     2012-03-14 18:30:05.595203885 +0900
++++ bluez-4.98/Makefile.tools  2012-03-14 19:39:16.815200856 +0900
+@@ -60,7 +60,7 @@
+                               attrib/gattrib.c btio/btio.c \
+                               attrib/gatttool.h attrib/interactive.c \
+                               attrib/utils.c
+-attrib_gatttool_LDADD = lib/libbluetooth-private.la @GLIB_LIBS@ @READLINE_LIBS@
++attrib_gatttool_LDADD = lib/libbluetooth-private.la @GLIB_LIBS@ @READLINE_LIBS@ -lncurses
+ endif
+ dist_man_MANS += tools/rfcomm.1 tools/l2ping.8 \
index 6299917..8ed1234 100644 (file)
@@ -1,13 +1,12 @@
-
 Name:       bluez
 Summary:    Bluetooth utilities
-Version:    4.98
+Version: 4.98
 Release:    1
 Group:      Applications/System
 License:    GPLv2+
 URL:        http://www.bluez.org/
 Source0:    http://www.kernel.org/pub/linux/bluetooth/%{name}-%{version}.tar.gz
-Requires:   bluez-libs = %{version}
+Patch1 :    bluez-ncurses.patch
 Requires:   dbus >= 0.60
 Requires:   usbutils
 Requires:   pciutils
@@ -16,11 +15,9 @@ BuildRequires:  pkgconfig(alsa)
 BuildRequires:  pkgconfig(udev)
 BuildRequires:  pkgconfig(sndfile)
 BuildRequires:  pkgconfig(glib-2.0)
-BuildRequires:  pkgconfig(gstreamer-plugins-base-0.10)
-BuildRequires:  pkgconfig(gstreamer-0.10)
 BuildRequires:  flex
 BuildRequires:  bison
-
+BuildRequires:  readline-devel
 
 %description
 Utilities for use in Bluetooth applications:
@@ -38,75 +35,39 @@ The BLUETOOTH trademarks are owned by Bluetooth SIG, Inc., U.S.A.
 
 
 
-%package libs
+%package -n libbluetooth3
 Summary:    Libraries for use in Bluetooth applications
 Group:      System/Libraries
 Requires:   %{name} = %{version}-%{release}
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
 
-%description libs
+%description -n libbluetooth3
 Libraries for use in Bluetooth applications.
 
-%package libs-devel
+%package -n libbluetooth-devel
 Summary:    Development libraries for Bluetooth applications
 Group:      Development/Libraries
 Requires:   %{name} = %{version}-%{release}
-Requires:   bluez-libs = %{version}
+Requires:   libbluetooth3 = %{version}
 
-%description libs-devel
+%description -n libbluetooth-devel
 bluez-libs-devel contains development libraries and headers for
 use in Bluetooth applications.
 
-
-%package cups
-Summary:    CUPS printer backend for Bluetooth printers
-Group:      System/Daemons
-Requires:   %{name} = %{version}-%{release}
-Requires:   bluez-libs = %{version}
-Requires:   cups
-
-%description cups
-This package contains the CUPS backend
-
-%package alsa
-Summary:    ALSA support for Bluetooth audio devices
-Group:      System/Daemons
-Requires:   %{name} = %{version}-%{release}
-Requires:   bluez-libs = %{version}
-
-%description alsa
-This package contains ALSA support for Bluetooth audio devices
-
-%package gstreamer
-Summary:    GStreamer support for SBC audio format
-Group:      System/Daemons
-Requires:   %{name} = %{version}-%{release}
-Requires:   bluez-libs = %{version}
-
-%description gstreamer
-This package contains gstreamer plugins for the Bluetooth SBC audio format
-
-%package test
-Summary:    Test Programs for BlueZ
-Group:      Development/Tools
-Requires:   %{name} = %{version}-%{release}
-Requires:   bluez-libs = %{version}
-Requires:   dbus-python
-Requires:   pygobject2
-
-%description test
-Scripts for testing BlueZ and its functionality
-
-
 %prep
-%setup -q -n %{name}-%{version}
+%setup -q
+%patch1 -p1
 
 
 %build
 
-export CFLAGS="${CFLAGS} -D__TIZEN_PATCH__ -D__BROADCOM_PATCH__"
+export CFLAGS="${CFLAGS} -D__TIZEN_PATCH__ -D__BROADCOM_PATCH__ "
+%ifnarch %{arm}
+export LDFLAGS="${LDFLAGS} -lncurses -Wl,--as-needed "
+%endif
 %reconfigure --disable-static \
+                       --sysconfdir=%{_prefix}/etc \
                        --localstatedir=/opt/var \
                         --enable-pie \
                         --enable-network \
@@ -124,57 +85,54 @@ export CFLAGS="${CFLAGS} -D__TIZEN_PATCH__ -D__BROADCOM_PATCH__"
                         --disable-tests \
                         --disable-udevrules \
                        --enable-dbusoob \
-                        --with-telephony=tizen
+                       --with-telephony=tizen
 
-make %{?jobs:-j%jobs}
+make
 
 %install
 rm -rf %{buildroot}
 %make_install
 
+install -D -m 0644 audio/audio.conf %{buildroot}%{_prefix}/etc/bluetooth/audio.conf
+install -D -m 0644 network/network.conf %{buildroot}%{_prefix}/etc/bluetooth/network.conf
 
-%post libs -p /sbin/ldconfig
 
-%postun libs -p /sbin/ldconfig
+%post -n libbluetooth3 -p /sbin/ldconfig
 
-
-%docs_package
+%postun -n libbluetooth3 -p /sbin/ldconfig
 
 
 %files
 %defattr(-,root,root,-)
+%{_prefix}/etc/bluetooth/audio.conf
+%{_prefix}/etc/bluetooth/main.conf
+%{_prefix}/etc/bluetooth/network.conf
+%{_prefix}/etc/bluetooth/rfcomm.conf
+%{_prefix}/etc/dbus-1/system.d/bluetooth.conf
+%{_datadir}/man/*/*
+%{_sbindir}/bluetoothd
+%{_sbindir}/hciconfig
+%{_sbindir}/hciattach
 %{_bindir}/ciptool
-%{_bindir}/hcitool
 %{_bindir}/l2ping
-%{_bindir}/rfcomm
 %{_bindir}/sdptool
-%{_sbindir}/*
-%config(noreplace) %{_sysconfdir}/bluetooth/*
-%config %{_sysconfdir}/dbus-1/system.d/bluetooth.conf
-/usr/lib/udev/rules.d/97-bluetooth.rules
-#%{_localstatedir}/lib/bluetooth
-#/lib/udev/*
+%{_bindir}/gatttool
+%{_bindir}/rfcomm
+%{_bindir}/hcitool
+%dir %{_libdir}/bluetooth/plugins
+%dir /opt/var/lib/bluetooth
+%exclude /lib/udev/rules.d/97-bluetooth.rules
 
 
-%files libs
+%files -n libbluetooth3
 %defattr(-,root,root,-)
 %{_libdir}/libbluetooth.so.*
-%doc COPYING
 
-%files libs-devel
+
+%files -n libbluetooth-devel
 %defattr(-, root, root)
-%{_libdir}/libbluetooth.so
-%dir %{_includedir}/bluetooth
 %{_includedir}/bluetooth/*
+%{_libdir}/libbluetooth.so
 %{_libdir}/pkgconfig/bluez.pc
 
 
-%files alsa
-%defattr(-,root,root,-)
-#%{_libdir}/alsa-lib/*.so
-#%{_datadir}/alsa/bluetooth.conf
-
-%files gstreamer
-%defattr(-,root,root,-)
-%{_libdir}/gstreamer-*/*.so
-
index c101932..7e4bbb6 100644 (file)
@@ -417,9 +417,7 @@ static DBusMessage *set_powered(DBusConnection *conn, DBusMessage *msg,
        struct btd_adapter *adapter = data;
        uint8_t mode;
        int err;
-#ifdef __TIZEN_PATCH__
-       mode = powered ? get_mode(&adapter->bdaddr, "on") : MODE_OFF;
-#else
+
        if (powered) {
                mode = get_mode(&adapter->bdaddr, "on");
                return set_discoverable(conn, msg, mode == MODE_DISCOVERABLE,
@@ -427,7 +425,7 @@ static DBusMessage *set_powered(DBusConnection *conn, DBusMessage *msg,
        }
 
        mode = MODE_OFF;
-#endif
+
        if (mode == adapter->mode) {
                adapter->global_mode = mode;
                return dbus_message_new_method_return(msg);
index b80fd74..19dccb5 100644 (file)
@@ -469,7 +469,11 @@ int agent_request_pincode(struct agent *agent, struct btd_device *device,
        return 0;
 
 failed:
+#ifdef __TIZEN_PATCH__
+       agent_request_free(req, FALSE);
+#else
        g_free(req);
+#endif
        return err;
 }
 
@@ -711,8 +715,10 @@ int agent_display_passkey(struct agent *agent, struct btd_device *device,
                                DBUS_TYPE_INVALID);
 
        if (!g_dbus_send_message(connection, message)) {
-               error("D-Bus send failed");
+#ifndef __TIZEN_PATCH__
                dbus_message_unref(message);
+#endif
+               error("D-Bus send failed");
                return -1;
        }
 
index 13005ae..e75a06d 100644 (file)
@@ -73,6 +73,9 @@ void device_set_temporary(struct btd_device *device, gboolean temporary);
 void device_set_bonded(struct btd_device *device, gboolean bonded);
 void device_set_auto_connect(struct btd_device *device, gboolean enable);
 gboolean device_is_connected(struct btd_device *device);
+#ifdef __TIZEN_PATCH__
+void set_cancel_from_authentication_req(void *user_data);
+#endif
 DBusMessage *device_create_bonding(struct btd_device *device,
                                DBusConnection *conn, DBusMessage *msg,
                                const char *agent_path, uint8_t capability);
index ec71c6d..74ec3fa 100644 (file)
@@ -239,11 +239,7 @@ static void init_defaults(void)
 {
        /* Default HCId settings */
        memset(&main_opts, 0, sizeof(main_opts));
-#ifdef __TIZEN_PATCH__
-       main_opts.mode  = MODE_DISCOVERABLE;
-#else
        main_opts.mode  = MODE_CONNECTABLE;
-#endif
        main_opts.name  = g_strdup("BlueZ");
        main_opts.discovto      = DEFAULT_DISCOVERABLE_TIMEOUT;
        main_opts.autoto = DEFAULT_AUTO_CONNECT_TIMEOUT;
index a7249db..ce65809 100644 (file)
@@ -622,9 +622,9 @@ static void cmd_name(int ctl, int hdev, char *opt)
                        if ((unsigned char) name[i] < 32 || name[i] == 127)
                                name[i] = '.';
                }
-
+#ifndef __TIZEN_PATCH__
                name[248] = '\0';
-
+#endif
                print_dev_hdr(&di);
                printf("\tName: '%s'\n", name);
        }