#
#
-# Makefile for sdb
+# Makefile for sdbd
#
-#
-HOST_OS := $(shell uname -s | tr A-Z a-z)
-
-# sdb host tool
-# =========================================================
-
-# Default to a virtual (sockets) usb interface
-USB_SRCS :=
-EXTRA_SRCS :=
-
-ifeq ($(HOST_OS),linux)
- USB_SRCS := usb_linux.c
- EXTRA_SRCS := get_my_path_linux.c
- LOCAL_LDLIBS += -lrt -lncurses -lpthread
-endif
-
-ifeq ($(HOST_OS),darwin)
- USB_SRCS := usb_osx.c
- EXTRA_SRCS := get_my_path_darwin.c
- LOCAL_LDLIBS += -lpthread -framework CoreFoundation -framework IOKit -framework Carbon
- SDB_EXTRA_CFLAGS := -mmacosx-version-min=10.4
-endif
-
-ifeq ($(HOST_OS),freebsd)
- USB_SRCS := usb_libusb.c
- EXTRA_SRCS := get_my_path_freebsd.c
- LOCAL_LDLIBS += -lpthread -lusb
-endif
-
-
-
-SDB_SRC_FILES := \
- src/sdb.c \
- src/console.c \
- src/transport.c \
- src/transport_local.c \
- src/transport_usb.c \
- src/commandline.c \
- src/sdb_client.c \
- src/sockets.c \
- src/services.c \
- src/file_sync_client.c \
- src/$(EXTRA_SRCS) \
- src/$(USB_SRCS) \
- src/utils.c \
- src/usb_vendors.c \
- src/fdevent.c \
- src/socket_inaddr_any_server.c \
- src/socket_local_client.c \
- src/socket_local_server.c \
- src/socket_loopback_client.c \
- src/socket_loopback_server.c \
- src/socket_network_client.c
-
-SDB_CFLAGS := -O2 -g -DSDB_HOST=1 -DSDB_HOST_ON_TARGET=1 -Wall -Wno-unused-parameter
-SDB_CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE
-SDB_CFLAGS += -DHAVE_FORKEXEC -DHAVE_TERMIO_H -DHAVE_SYMLINKS
-SDB_LFLAGS := $(LOCAL_LDLIBS)
-
SDBD_SRC_FILES := \
src/sdb.c \
src/fdevent.c \
OBJDIR := bin
INSTALLDIR := usr/sbin
INITSCRIPTDIR := etc/init.d
-RCSCRIPTDIR := etc/rc.d/rc3.d
-LAUNCH_SCRIPT := sdk_launch
-
-UNAME := $(shell uname -sm)
-ifneq (,$(findstring 86,$(UNAME)))
- HOST_ARCH := x86
-endif
-TARGET_ARCH = $(HOST_ARCH)
-ifeq ($(TARGET_ARCH),)
- TARGET_ARCH := arm
-endif
-
-ifeq ($(TARGET_ARCH),arm)
- MODULE := sdbd
- SDBD_CFLAGS += -DANDROID_GADGET=1
-else
-ifeq ($(TARGET_HOST),true)
- MODULE := sdb
-else
- MODULE := sdbd
-endif
-endif
+MODULE := sdbd
all : $(MODULE)
-sdb : $(SDB_SRC_FILES)
- mkdir -p $(OBJDIR)
- $(CC) -pthread -o $(OBJDIR)/$(MODULE) $(SDB_CFLAGS) $(SDB_EXTRA_CFLAGS) $(SDB_LFLAGS) $(IFLAGS) $(SDB_SRC_FILES)
-
sdbd : $(SDBD_SRC_FILES)
mkdir -p $(OBJDIR)
$(CC) -pthread -o $(OBJDIR)/$(MODULE) $(SDBD_CFLAGS) $(IFLAGS) $(SDBD_SRC_FILES) $(SDBD_LFLAGS)
install :
mkdir -p $(DESTDIR)/$(INSTALLDIR)
install $(OBJDIR)/$(MODULE) $(DESTDIR)/$(INSTALLDIR)/$(MODULE)
- install $(LAUNCH_SCRIPT) $(DESTDIR)/$(INSTALLDIR)/$(LAUNCH_SCRIPT)
-ifeq ($(MODULE),sdbd)
mkdir -p $(DESTDIR)/$(INITSCRIPTDIR)
install script/sdbd $(DESTDIR)/$(INITSCRIPTDIR)/sdbd
-endif
-ifeq ($(TARGET_ARCH),x86)
- mkdir -p $(DESTDIR)/$(RCSCRIPTDIR)
- install script/S06sdbd $(DESTDIR)/$(RCSCRIPTDIR)/S06sdbd
-endif
clean :
rm -rf $(OBJDIR)/*
--- /dev/null
+* Wed Apr 04 2013 Ho Namkoong <ho.namkoong@samsung.com>
+ - supports platform gdbserver
+* Mon Dec 02 2012 Yoonki Park <yoonki.park@samsung.com>
+ - supports cs report service using inotify
+* Mon Dec 02 2012 Yoonki Park <yoonki.park@samsung.com>
+ - sdb code dropped from adb (Ice Cream Samdwich 4.1.1)
+* Wed Apr 18 2012 Yoonki Park <yoonki.park@samsung.com>
+ - set dir permission to 777
+* Sat Mar 31 2012 Yoonki Park <yoonki.park@samsung.com>
+ - let sshd be daemon and create sshd.pid file
\ No newline at end of file
Name: sdbd
Summary: SDB daemon
-Version: 2.2.8
-Release: 1
-Group: TO_BE/FILLED_IN
-License: TO BE FILLED IN
+Version: 2.2.13
+Release: 0
+License: Apache-2.0
+Summary: SDB daemon
+Group: System/Utilities
Source0: %{name}-%{version}.tar.gz
+Source1001: sdbd_device.service
+Source1002: sdbd_emulator.service
BuildRequires: capi-system-info-devel
Requires(post): pkgmgr
Requires: dbus
%description
-Description: SDB daemon
+Description: SDB daemon.
%prep
mkdir -p %{buildroot}/usr/share/license
cp LICENSE %{buildroot}/usr/share/license/%{name}
+
%make_install
+mkdir -p %{buildroot}%{_libdir}/systemd/system
+%if 0%{?simulator}
+install -m 0644 %SOURCE1001 %{buildroot}%{_libdir}/systemd/system/sdbd.service
+%else
+install -m 0644 %SOURCE1002 %{buildroot}%{_libdir}/systemd/system/sdbd.service
+%endif
+
+mkdir -p %{buildroot}%{_prefix}/sbin
+install -m 755 script/sdk_launch %{buildroot}%{_prefix}/sbin/
%post
chsmack -a sdbd::home /home/developer
%{_prefix}/sbin/sdk_launch
%{_sysconfdir}/init.d/sdbd
/usr/share/license/%{name}
-
-%ifarch %{ix86}
- %{_sysconfdir}/rc.d/rc3.d
-%endif
+%{_libdir}/systemd/system/sdbd.service
%changelog
-* Wed Apr 04 2013 Ho Namkoong <ho.namkoong@samsung.com>
- - supports platform gdbserver
-* Mon Dec 02 2012 Yoonki Park <yoonki.park@samsung.com>
- - supports cs report service using inotify
-* Mon Dec 02 2012 Yoonki Park <yoonki.park@samsung.com>
- - sdb code dropped from adb (Ice Cream Samdwich 4.1.1)
-* Wed Apr 18 2012 Yoonki Park <yoonki.park@samsung.com>
- - set dir permission to 777
-* Sat Mar 31 2012 Yoonki Park <yoonki.park@samsung.com>
- - let sshd be daemon and create sshd.pid file