summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu zheng <wu.zheng@intel.com>2013-10-23 11:21:09 +0800
committerWu Zheng <wu.zheng@intel.com>2013-12-12 04:51:35 -0500
commitcf0fb6c148c3d4de2ab4fc2ef57e07d76a28dc43 (patch)
tree47043079eb2324bdb3ab003d4f4c067fcb5d0773
parenteb0a5bb382f1ac4ceacdf4acf813e5485af98661 (diff)
downloadbluez-cf0fb6c148c3d4de2ab4fc2ef57e07d76a28dc43.tar.gz
bluez-cf0fb6c148c3d4de2ab4fc2ef57e07d76a28dc43.tar.bz2
bluez-cf0fb6c148c3d4de2ab4fc2ef57e07d76a28dc43.zip
Add TIZEN obexd config packaging files
Change-Id: I728cba544250f713c1b45968cc4a5732b14d35c2
-rw-r--r--packaging/bluez.spec7
-rwxr-xr-xpackaging/create-symlinks12
-rwxr-xr-xpackaging/obex-root-setup15
3 files changed, 34 insertions, 0 deletions
diff --git a/packaging/bluez.spec b/packaging/bluez.spec
index ca6ceef5..bdd753c7 100644
--- a/packaging/bluez.spec
+++ b/packaging/bluez.spec
@@ -31,6 +31,8 @@ Source3: bluetooth.sysconfig
Source4: bluetooth.sh
Source5: baselibs.conf
Source7: bluetooth.modprobe
+Source101: obex-root-setup
+Source102: create-symlinks
Source1001: bluez.manifest
%define cups_lib_dir %{_prefix}/lib/cups
@@ -122,6 +124,9 @@ fi
install --mode 0755 -d $RPM_BUILD_ROOT/var/lib/bluetooth
+install -D -m 0755 %SOURCE101 %{buildroot}%{_bindir}/obex-root-setup
+install -D -m 0755 %SOURCE102 %{buildroot}%{_sysconfdir}/obex/root-setup.d/000_create-symlinks
+
%post -n libbluetooth -p /sbin/ldconfig
%postun -n libbluetooth -p /sbin/ldconfig
@@ -175,6 +180,8 @@ install --mode 0755 -d $RPM_BUILD_ROOT/var/lib/bluetooth
/lib/bluetooth/obexd
%{_libdir}/systemd/user/obex.service
%{_datadir}/dbus-1/services/org.bluez.obex.service
+%{_sysconfdir}/obex/root-setup.d/000_create-symlinks
+%{_bindir}/obex-root-setup
%files test
%manifest %{name}.manifest
diff --git a/packaging/create-symlinks b/packaging/create-symlinks
new file mode 100755
index 00000000..31aa6ab3
--- /dev/null
+++ b/packaging/create-symlinks
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+OBEX_ROOT="$1"
+
+cd "$OBEX_ROOT"
+
+ln -sf ../MyDocs/.documents Documents
+ln -sf ../MyDocs/.images Images
+ln -sf ../MyDocs/.sounds "Audio clips"
+ln -sf ../MyDocs/.camera Camera
+ln -sf ../MyDocs/.videos "Video clips"
+ln -sf ../MyDocs Data
diff --git a/packaging/obex-root-setup b/packaging/obex-root-setup
new file mode 100755
index 00000000..fc0864f7
--- /dev/null
+++ b/packaging/obex-root-setup
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+
+ROOT_SETUP=/etc/obex/root-setup.d
+
+OBEX_ROOT="$1"
+
+mkdir -p "$OBEX_ROOT"
+
+if [ -d "$ROOT_SETUP" ]; then
+ run-parts -a "$OBEX_ROOT" "$ROOT_SETUP"
+fi
+
+chmod 0550 "$OBEX_ROOT"