[Release] wrt_0.8.175
[platform/framework/web/wrt.git] / packaging / wrt.spec
index ca37801..a40b0e5 100644 (file)
@@ -1,24 +1,21 @@
-#git:framework/web/wrt wrt_0.8.118
+#git:framework/web/wrt wrt_0.8.175
 Name:       wrt
 Summary:    web runtime
-Version:    0.8.118
+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
+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)
@@ -39,12 +36,17 @@ 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)
@@ -71,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
@@ -95,44 +103,37 @@ ln -sf ../../init.d/wrt_launchpad_run.sh %{buildroot}/%{_sysconfdir}/rc.d/rc3.d/
 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 ../launchpad-preload@.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
+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
+/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
+%postun -p /sbin/ldconfig
+systemctl daemon-reload
 ###############################################################################
 
 %files
@@ -151,6 +152,11 @@ 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
@@ -159,8 +165,8 @@ echo "[WRT] wrt postinst done ..."
 %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
+%{_libdir}/systemd/system/graphical.target.wants/wrt_launchpad_daemon@app.service
+%{_libdir}/systemd/system/wrt_launchpad_daemon@.service
 ###############################################################################
 
 %files devel