-#git:framework/web/wrt-installer wrt-installer 0.0.77
+#git:framework/web/wrt-installer wrt-installer 0.1.37
Name: wrt-installer
Summary: Installer for tizen Webruntime
-Version: 0.0.77
+Version: 0.1.37
Release: 1
Group: Development/Libraries
License: Apache License, Version 2.0
URL: N/A
Source0: %{name}-%{version}.tar.gz
+Source100: wrt-preinstall-widgets.service
BuildRequires: cmake
BuildRequires: edje-tools
+BuildRequires: pkgconfig(appsvc)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(dpl-efl)
BuildRequires: pkgconfig(pkgmgr-installer)
BuildRequires: pkgconfig(pkgmgr-parser)
BuildRequires: pkgconfig(pkgmgr-types)
+BuildRequires: pkgconfig(pkgmgr)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(cert-svc)
BuildRequires: pkgconfig(utilX)
BuildRequires: pkgconfig(shortcut)
BuildRequires: pkgconfig(dpl-encryption)
BuildRequires: pkgconfig(capi-appfw-app-manager)
-BuildRequires: pkgconfig(drm-client)
+BuildRequires: pkgconfig(app2sd)
+BuildRequires: pkgconfig(web-provider)
+BuildRequires: pkgconfig(libprivilege-control)
+BuildRequires: pkgconfig(osp-appfw)
+BuildRequires: osp-appfw-internal-devel
+Requires: osp-appfw
Requires: xmlsec1
-Provides: libdrm-service-core-intel.so.0
-
%description
Description: Wrt Installer for Tizen apps and Wac apps
%prep
%setup -q
-%build
-# for drm temporary code
-%ifarch %{ix86}
-BUILD_ARCH_=x86
-%else
-BUILD_ARCH_=arm
+%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 -Wl,--hash-style=both -Wl,--as-needed"
LDFLAGS="$LDFLAGS"
cmake . -DCMAKE_INSTALL_PREFIX=/usr \
-DDPL_LOG=ON \
- -DCMAKE_PACKAGE_VERSION=%{version} \
- -DARCH="$BUILD_ARCH_" \
- -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
cp LICENSE %{buildroot}/usr/share/license/%{name}
%make_install
+mkdir -p %{buildroot}%{_libdir}/systemd/user
+install -m 644 %{SOURCE100} %{buildroot}%{_libdir}/systemd/user
+mkdir -p %{buildroot}%{_libdir}/systemd/user/tizen-mobile-session.target.wants
+ln -s ../wrt-preinstall-widgets.service %{buildroot}%{_libdir}/systemd/user/tizen-mobile-session.target.wants
+
+mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc3.d/
+mkdir -p %{buildroot}%{_sysconfdir}/rc.d/rc5.d/
+ln -s ../init.d/wrt_preinstall_widgets.sh %{buildroot}%{_sysconfdir}/rc.d/rc3.d/S48lwrt_preinstall_widgets.sh
+ln -s ../init.d/wrt_preinstall_widgets.sh %{buildroot}%{_sysconfdir}/rc.d/rc5.d/S48lwrt_preinstall_widgets.sh
+
%clean
rm -rf %{buildroot}
%post
+/sbin/ldconfig
chmod +s /usr/bin/wrt-installer
#symlink for package manager
#for booting recovery
mkdir -p /opt/share/widget/temp_info
-[ -h /etc/rc.d/rc3.d/S46lwrt_preinstall_widgets.sh ] && rm /etc/rc.d/rc3.d/S46lwrt_preinstall_widgets.sh
-[ -h /etc/rc.d/rc5.d/S46lwrt_preinstall_widgets.sh ] && rm /etc/rc.d/rc5.d/S46lwrt_preinstall_widgets.sh
-ln -s /etc/rc.d/init.d/wrt_preinstall_widgets.sh /etc/rc.d/rc3.d/S46lwrt_preinstall_widgets.sh
-ln -s /etc/rc.d/init.d/wrt_preinstall_widgets.sh /etc/rc.d/rc5.d/S46lwrt_preinstall_widgets.sh
-
-# for drm temporary code
-mkdir -p /opt/var/drm/inteldrm
-mkdir -p own 0:5000 /opt/var/drm/inteldrm
-chmod 755 /opt/var/drm/inteldrm
-
-[ -h /usr/lib/libdrm-service-core-intel.so.0 ] && rm /usr/lib/libdrm-service-core-intel.so.0
-[ -h /usr/lib/libdrm-service-core-intel.so ] && rm /usr/lib/libdrm-service-core-intel.so
-
-ln -s /usr/lib/libdrm-service-core-intel.so.0.0.3 /usr/lib/libdrm-service-core-intel.so.0
-ln -s /usr/lib/libdrm-service-core-intel.so.0 /usr/lib/libdrm-service-core-intel.so
+[ -h /etc/rc.d/rc3.d/S48lwrt_preinstall_widgets.sh ] && rm /etc/rc.d/rc3.d/S48lwrt_preinstall_widgets.sh
+[ -h /etc/rc.d/rc5.d/S48lwrt_preinstall_widgets.sh ] && rm /etc/rc.d/rc5.d/S48lwrt_preinstall_widgets.sh
+ln -s /etc/rc.d/init.d/wrt_preinstall_widgets.sh /etc/rc.d/rc3.d/S48lwrt_preinstall_widgets.sh
+ln -s /etc/rc.d/init.d/wrt_preinstall_widgets.sh /etc/rc.d/rc5.d/S48lwrt_preinstall_widgets.sh
# for downloadable Application icons path
mkdir -p /opt/share/icons/default/small
+%postun -p /sbin/ldconfig
+
%files
%manifest wrt-installer.manifest
%attr(755,root,root) %{_bindir}/wrt-installer
-%attr(775,root,root) %{_initrddir}/wrt_preinstall_widgets.sh
-%attr(644,root,root) %{_datadir}/edje/wrt/*
+%attr(775,root,root) %{_initddir}/wrt_preinstall_widgets.sh
+%{_sysconfdir}/rc.d/rc3.d/S48lwrt_preinstall_widgets.sh
+%{_sysconfdir}/rc.d/rc5.d/S48lwrt_preinstall_widgets.sh
/usr/etc/package-manager/backendlib/libwgt.so
%{_datadir}/license/%{name}
-# for drm temporary code
-/usr/lib/*.so*
+%{_libdir}/systemd/user/tizen-mobile-session.target.wants/wrt-preinstall-widgets.service
+%{_libdir}/systemd/user/wrt-preinstall-widgets.service
+%if %{with_tests}
+ %attr(755,root,root) %{_bindir}/wrt-installer-tests-*
+ /opt/share/widget/tests/installer/widgets/*
+%endif