Requires(postun): /sbin/ldconfig
BuildRequires: pkgconfig(libtzplatform-config)
-# There are not ready for .so files of tv/wearable aarch64 and x86_64
+
+# There are not ready for .so files of wearable aarch64 and x86_64
%if "%{?profile}" == "wearable"
ExcludeArch: aarch64 x86_64
%endif
+# There are not ready for .so files of tv aarch64
%if "%{?profile}" == "tv"
ExcludeArch: aarch64
%endif
+
%if %{_support_weblog}
BuildRequires: pkgconfig(zlib)
BuildRequires: pkgconfig(json-glib-1.0)
Push service tool for wearable
%endif
+
%define _upgrade_script_path /usr/share/upgrade/scripts/
%define _upgrade_script 500.sppc.sh
+
%prep
%setup -q
+
%build
+
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_unitdir}/multi-user.target.wants
install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/pushd.service
# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
-# if mobile || ivi || common || "undefined"
-%if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
+# if mobile //Lazy mount is for mobile only
+%if "%{?profile}" == "mobile"
install -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/pushd.path
%endif
%ifarch %{ix86} || %{arm}
# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if not mobile //Lazy mount is for mobile only
+%if "%{?profile}" != "mobile"
+%install_service multi-user.target.wants pushd.service
+%endif
+%endif //%ifarch %{ix86} || %{arm}
+
+%ifarch x86_64
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
# if wearable || tv || "undefined"
%if "%{?profile}" != "mobile" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+#install -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/multi-user.target.wants/pushd.service
%install_service multi-user.target.wants pushd.service
%endif
+%endif //%ifarch x86_64
-%endif //%ifarch %{ix86} || %{arm}
mkdir -p %{buildroot}/usr/share/licenses/%{name}
cp -f LICENSE %{buildroot}/usr/share/licenses/%{name}
mkdir -p %{buildroot}/usr/share/push
+
%ifarch %{arm}
# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
%endif //%ifarch %{arm}
+
%ifarch aarch64
pushd aarch64/lib64/
pushd aarch64/share/push/
for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE"; done
popd
-
%if %{_support_weblog}
aarch64/bin/pushlog_tool
%endif
+
%endif
+
%ifarch %{ix86}
# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
%ifarch x86_64
-pushd x86_64/lib64/
+
# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
# if mobile || ivi || common || "undefined"
%if "%{?profile}" != "wearable" && "%{?profile}" != "tv"
+pushd x86_64/lib64/
for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE"; done
popd
pushd x86_64/bin/
%endif
%endif
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if tv || "undefined"
+%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+pushd x86_64_tv/lib64/
+for FILE in libpush.so*; do cp -a "$FILE" "%{buildroot}%{_libdir}/$FILE.tv"; done
+popd
+pushd x86_64_tv/bin/
+for FILE in push*; do cp -a "$FILE" "%{buildroot}%{_bindir}/$FILE.tv"; done
+popd
+pushd x86_64_tv/share/push/
+for FILE in *.cer; do cp -a "$FILE" "%{buildroot}/usr/share/push/$FILE.tv"; done
+popd
+%if %{_support_weblog}
+ x86_64_tv/bin/pushlog_tool
+%endif
+%endif
%endif //%ifarch %{x86_64}
-
-
-
%post bin
mkdir -p %{TZ_SYS_GLOBALUSER_DB}
sqlite3 %{TZ_SYS_GLOBALUSER_DB}/.push.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null
chsmack -a "*" %{TZ_SYS_GLOBALUSER_DB}/.push.db
chsmack -a "*" %{TZ_SYS_GLOBALUSER_DB}/.push.db-journal
+
# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
-# if mobile || ivi || common || "undefined"
-%if "%{?profile}" != "wearable" || "%{?profile}" != "tv"
+# if mobile //Lazy mount is for mobile only
+%if "%{?profile}" == "mobile"
ln -sf ../pushd.path %{_unitdir}/multi-user.target.wants/
%endif
%ifarch %{ix86} || %{arm}
+
# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
# if tv || "undefined"
%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+
%post bin-profile_tv
pushd %{_bindir}
for FILE in push*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
for FILE in libpush.so*.tv; do ln -sf "$FILE" "${FILE%.tv}"; done
popd
/sbin/ldconfig
-
%endif
+
# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
# if wearable || "undefined"
%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+
%post bin-profile_wearable
pushd %{_bindir}
for FILE in push*.wearable; do ln -sf "$FILE" "${FILE%.wearable}"; done
%endif
+
%ifarch %{ix86} || %{arm}
+
# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
# if tv || "undefined"
%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
%endif
+
# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
# if wearable || "undefined"
%if "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
%endif //%ifarch %{ix86} || %{arm}
+
+%ifarch x86_64
+
+# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
+# if tv || "undefined"
+%if "%{?profile}" != "mobile" && "%{?profile}" != "wearable" && "%{?profile}" != "ivi" && "%{?profile}" != "common"
+
+%files -n libpush-profile_tv
+%manifest libpush.manifest
+%attr(755,root,root) %{_libdir}/libpush.so*.tv
+
+%files bin-profile_tv
+%{_bindir}/pushd.tv
+%attr(600,service_fw,service_fw) /usr/share/push/PushServerTrust.cer.tv
+%{_unitdir}/multi-user.target.wants/pushd.service
+
+%files tool-profile_tv
+%{_bindir}/push_tool.tv
+
+%endif
+
+%endif //x86_64
+
+
%changelog
* Sat Nov 3 2012 Jooseok Park <jooseok.park@samsung.com> - 0.2.26
- Prevent bug fixed(out-of bounds read, dead code,..)