Code sync: merged tizen 2.4 base source code
[platform/core/connectivity/bluetooth-tools.git] / packaging / bluetooth-tools.spec
index 20439de..f5c7e73 100644 (file)
@@ -28,11 +28,31 @@ On/Off bluetooth device
 %setup -q
 
 %build
-export CFLAGS="${CFLAGS} -fpie -fvisibility=hidden"
-export LDFLAGS="${LDFLAGS} -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
+export CFLAGS+=" -fpie -fvisibility=hidden"
+export LDFLAGS+=" -Wl,--rpath=/usr/lib -Wl,--as-needed -Wl,--unresolved-symbols=ignore-in-shared-libs -pie"
+
+%if "%{profile}" == "mobile"
+export CFLAGS="$CFLAGS -DTIZEN_MOBILE"
+%elseif "%{profile}" == "wearable"
+export CFLAGS="$CFLAGS -DTIZEN_WEARABLE"
+%endif
+
+%cmake \
+%if "%{profile}" == "mobile"
+       -DTIZEN_MOBILE=YES \
+       -DTIZEN_WEARABLE=NO \
+%elseif "%{profile}" == "wearable"
+       -DTIZEN_MOBILE=NO \
+        -DTIZEN_WEARABLE=YES \
+%else
+        -DTIZEN_MOBILE=NO \
+        -DTIZEN_WEARABLE=NO \
+%endif
 
 %cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
 %__make %{?_smp_mflags}
+#cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+#make %{?jobs:-j%jobs}
 
 %install
 rm -rf %{buildroot}
@@ -50,6 +70,7 @@ ln -s ../bluetooth-address.service %{buildroot}%{_unitdir}/multi-user.target.wan
 mkdir -p %{buildroot}%{_prefix}/etc/bluetooth/
 install -m 0755 scripts/bt-dev-start.sh %{buildroot}%{_prefix}/etc/bluetooth/bt-dev-start.sh
 install -m 0755 scripts/bt-dev-end.sh %{buildroot}%{_prefix}/etc/bluetooth/bt-dev-end.sh
+install -D -m 0644 LICENSE.APLv2 %{buildroot}%{_datadir}/license/bluetooth-tools
 
 %files
 %manifest %{name}.manifest
@@ -64,7 +85,9 @@ install -m 0755 scripts/bt-dev-end.sh %{buildroot}%{_prefix}/etc/bluetooth/bt-de
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-dev-up.sh
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-mode-on.sh
 %attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-edutm-off.sh
-
+%attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-hci-logdump.sh
+%attr(0755,-,-) %{_prefix}/etc/bluetooth/bt-run-hcidump.sh
+%{_datadir}/license/bluetooth-tools
 %{_unitdir}/multi-user.target.wants/bluetooth-address.service
 %{_unitdir}/bluetooth-address.service