[Release] wrt_0.8.175
[platform/framework/web/wrt.git] / packaging / wrt.spec
index ff2b953..a40b0e5 100644 (file)
@@ -1,20 +1,21 @@
-#sbs-git:slp/pkgs/w/wrt wrt 0.8.107
+#git:framework/web/wrt wrt_0.8.175
 Name:       wrt
 Summary:    web runtime
-Version:    0.8.107
+Version:    0.8.175
 Release:    1
 Group:      Development/Libraries
 License:    Apache License, Version 2.0
 URL:        N/A
 Source0:    %{name}-%{version}.tar.gz
+## wrt-launchpad-daemon #######################################################
+Source101:  wrt_launchpad_daemon@.service
+###############################################################################
+
 BuildRequires:  cmake
 BuildRequires:  gettext
 BuildRequires:  edje-tools
 BuildRequires:  pkgconfig(glib-2.0)
-BuildRequires:  pkgconfig(sqlite3)
 BuildRequires:  pkgconfig(ewebkit2)
-BuildRequires:  pkgconfig(dbus-1)
-BuildRequires:  pkgconfig(efreet)
 BuildRequires:  pkgconfig(appcore-efl)
 BuildRequires:  pkgconfig(openssl)
 BuildRequires:  pkgconfig(cert-svc)
@@ -26,8 +27,6 @@ BuildRequires:  pkgconfig(ui-gadget-1)
 BuildRequires:  pkgconfig(utilX)
 BuildRequires:  pkgconfig(secure-storage)
 BuildRequires:  pkgconfig(pkgmgr)
-BuildRequires:  pkgconfig(xmlsec1)
-BuildRequires:  pkgconfig(libidn)
 BuildRequires:  pkgconfig(libiri)
 BuildRequires:  pkgconfig(appsvc)
 BuildRequires:  pkgconfig(cert-svc-vcore)
@@ -37,12 +36,28 @@ BuildRequires:  pkgconfig(security-client)
 BuildRequires:  pkgconfig(notification)
 BuildRequires:  pkgconfig(libprivilege-control)
 BuildRequires:  pkgconfig(capi-appfw-app-manager)
-BuildRequires:  pkgconfig(capi-system-haptic)
+BuildRequires:  pkgconfig(haptic)
 BuildRequires:  pkgconfig(capi-web-url-download)
 BuildRequires:  pkgconfig(wrt-plugin-loading)
 BuildRequires:  pkgconfig(wrt-plugin-js-overlay)
 BuildRequires:  pkgconfig(dpl-encryption)
-BuildRequires:  pkgconfig(wrt-popup-runner)
+BuildRequires:  pkgconfig(wrt-popup-wrt-runner)
+BuildRequires:  pkgconfig(wrt-popup-ace-runner)
+BuildRequires:  pkgconfig(sysman)
+BuildRequires:  pkgconfig(osp-appfw)
+BuildRequires:  osp-appfw-internal-devel
+Requires: osp-appfw
+
+## wrt-launchpad-daemon #######################################################
+BuildRequires:  pkgconfig(app-checker)
+BuildRequires:  pkgconfig(bundle)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(dbus-glib-1)
+BuildRequires:  pkgconfig(libsmack)
+BuildRequires:  pkgconfig(sqlite3)
+BuildRequires:  pkgconfig(x11)
+BuildRequires:  pkgconfig(aul)
+###############################################################################
 
 %description
 web runtime
@@ -58,13 +73,19 @@ wrt library development headers
 %prep
 %setup -q
 
+%define with_tests 0
+%if "%{WITH_TESTS}" == "ON" || "%{WITH_TESTS}" == "Y" || "%{WITH_TESTS}" == "YES" || "%{WITH_TESTS}" == "TRUE" || "%{WITH_TESTS}" == "1"
+    %define with_tests 1
+%endif
+
 %build
 export LDFLAGS+="-Wl,--rpath=/usr/lib"
 
 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
         -DDPL_LOG="ON"                    \
         -DPROJECT_VERSION=%{version} \
-        -DCMAKE_BUILD_TYPE=%{?build_type:%build_type}
+        -DCMAKE_BUILD_TYPE=%{?build_type:%build_type} \
+        %{?WITH_TESTS:-DWITH_TESTS=%WITH_TESTS}
 make %{?jobs:-j%jobs}
 
 %install
@@ -72,21 +93,49 @@ mkdir -p %{buildroot}/usr/share/license
 cp LICENSE %{buildroot}/usr/share/license/%{name}
 %make_install
 
+## wrt-launchpad-daemon #######################################################
+mkdir -p %{buildroot}/etc/init.d
+install -m 755 src/wrt-launchpad-daemon/wrt_launchpad_run.sh %{buildroot}/%{_sysconfdir}/init.d
+
+mkdir -p %{buildroot}/etc/rc.d/rc3.d
+mkdir -p %{buildroot}/etc/rc.d/rc4.d
+ln -sf ../../init.d/wrt_launchpad_run.sh %{buildroot}/%{_sysconfdir}/rc.d/rc3.d/S15wrt_launchpad_run
+ln -sf ../../init.d/wrt_launchpad_run.sh %{buildroot}/%{_sysconfdir}/rc.d/rc4.d/S80wrt_launchpad_run
+
+#systemd
+mkdir -p %{buildroot}%{_libdir}/systemd/system/graphical.target.wants
+install -m 0644 %SOURCE101 %{buildroot}%{_libdir}/systemd/system/wrt_launchpad_daemon@.service
+ln -s ../wrt_launchpad_daemon@.service %{buildroot}%{_libdir}/systemd/system/graphical.target.wants/wrt_launchpad_daemon@app.service
+
+%preun
+if [ $1 == 0 ]; then
+    systemctl stop wrt_launchpad_daemon@app.service
+fi
+###############################################################################
+
 %clean
 rm -rf %{buildroot}
 
 %post
-#vconf --- register WRT
-#naming rule : file/private/[pkg name]/[key name]
-/usr/bin/vconftool set -t string file/private/wrt/vendor "Samsung" -f
-/usr/bin/vconftool set -t string file/private/wrt/name "WebRuntime" -f
-/usr/bin/vconftool set -t string file/private/wrt/version "1.0.0.0" -f
-/usr/bin/vconftool set -t string file/private/wrt/api "W3C WAC1.0 WAC2.0" -f
-
 chmod +s /usr/bin/wrt-launcher
 
+## wrt-launchpad-daemon #######################################################
+#systemd
+/sbin/ldconfig
+systemctl daemon-reload
+if [ $1 == 1 ]; then
+    systemctl restart wrt_launchpad_daemon@app.service
+fi
+###############################################################################
+
 echo "[WRT] wrt postinst done ..."
 
+## wrt-launchpad-daemon #######################################################
+#systemd
+%postun -p /sbin/ldconfig
+systemctl daemon-reload
+###############################################################################
+
 %files
 %manifest wrt.manifest
 %{_libdir}/*.so
@@ -103,6 +152,22 @@ echo "[WRT] wrt postinst done ..."
 %attr(644,root,root) %{_datadir}/edje/wrt/*
 %attr(644,root,root) %{_datadir}/edje/ace/*
 %attr(644,root,root) /usr/etc/wrt/*
+%if %{with_tests}
+    %attr(755,root,root) %{_bindir}/wrt-tests-general
+    /opt/share/widget/tests/general/*
+%endif
+%attr(755,root,root) %{_sysconfdir}/profile.d/wrt_env.sh
+
+## wrt-launchpad-daemon #######################################################
+%attr(755,root,root) %{_bindir}/wrt_launchpad_daemon
+/usr/share/aul/preload_list_wrt.txt
+%{_sysconfdir}/init.d/wrt_launchpad_run.sh
+%attr(0755,root,root) %{_sysconfdir}/rc.d/rc3.d/S15wrt_launchpad_run
+%attr(0755,root,root) %{_sysconfdir}/rc.d/rc4.d/S80wrt_launchpad_run
+#systemd
+%{_libdir}/systemd/system/graphical.target.wants/wrt_launchpad_daemon@app.service
+%{_libdir}/systemd/system/wrt_launchpad_daemon@.service
+###############################################################################
 
 %files devel
 %{_includedir}/*