Merge "Fixed to check condition of decryption file"
[platform/framework/web/wrt.git] / packaging / wrt.spec
1 #git:framework/web/wrt wrt_0.8.163
2 Name:       wrt
3 Summary:    web runtime
4 Version:    0.8.163
5 Release:    1
6 Group:      Development/Libraries
7 License:    Apache License, Version 2.0
8 URL:        N/A
9 Source0:    %{name}-%{version}.tar.gz
10 ## wrt-launchpad-daemon #######################################################
11 Source101:  wrt_launchpad_daemon@.service
12 ###############################################################################
13
14 BuildRequires:  cmake
15 BuildRequires:  gettext
16 BuildRequires:  edje-tools
17 BuildRequires:  pkgconfig(glib-2.0)
18 BuildRequires:  pkgconfig(ewebkit2)
19 BuildRequires:  pkgconfig(appcore-efl)
20 BuildRequires:  pkgconfig(openssl)
21 BuildRequires:  pkgconfig(cert-svc)
22 BuildRequires:  pkgconfig(dpl-efl)
23 BuildRequires:  pkgconfig(libpcrecpp)
24 BuildRequires:  pkgconfig(ecore)
25 BuildRequires:  pkgconfig(eina)
26 BuildRequires:  pkgconfig(ui-gadget-1)
27 BuildRequires:  pkgconfig(utilX)
28 BuildRequires:  pkgconfig(secure-storage)
29 BuildRequires:  pkgconfig(pkgmgr)
30 BuildRequires:  pkgconfig(libiri)
31 BuildRequires:  pkgconfig(appsvc)
32 BuildRequires:  pkgconfig(cert-svc-vcore)
33 BuildRequires:  pkgconfig(libsoup-2.4)
34 BuildRequires:  pkgconfig(security-core)
35 BuildRequires:  pkgconfig(security-client)
36 BuildRequires:  pkgconfig(notification)
37 BuildRequires:  pkgconfig(libprivilege-control)
38 BuildRequires:  pkgconfig(capi-appfw-app-manager)
39 BuildRequires:  pkgconfig(haptic)
40 BuildRequires:  pkgconfig(capi-web-url-download)
41 BuildRequires:  pkgconfig(wrt-plugin-loading)
42 BuildRequires:  pkgconfig(wrt-plugin-js-overlay)
43 BuildRequires:  pkgconfig(dpl-encryption)
44 BuildRequires:  pkgconfig(wrt-popup-wrt-runner)
45 BuildRequires:  pkgconfig(wrt-popup-ace-runner)
46 BuildRequires:  pkgconfig(sysman)
47 BuildRequires:  pkgconfig(osp-appfw)
48 BuildRequires:  osp-appfw-internal-devel
49 Requires: osp-appfw
50
51 ## wrt-launchpad-daemon #######################################################
52 BuildRequires:  pkgconfig(app-checker)
53 BuildRequires:  pkgconfig(bundle)
54 BuildRequires:  pkgconfig(dlog)
55 BuildRequires:  pkgconfig(dbus-glib-1)
56 BuildRequires:  pkgconfig(libsmack)
57 BuildRequires:  pkgconfig(sqlite3)
58 BuildRequires:  pkgconfig(x11)
59 BuildRequires:  pkgconfig(aul)
60 ###############################################################################
61
62 %description
63 web runtime
64
65 %package devel
66 Summary:    Wrt header files for external modules
67 Group:      Development/Libraries
68 Requires:   %{name} = %{version}
69
70 %description devel
71 wrt library development headers
72
73 %prep
74 %setup -q
75
76 %define with_tests 0
77 %if "%{WITH_TESTS}" == "ON" || "%{WITH_TESTS}" == "Y" || "%{WITH_TESTS}" == "YES" || "%{WITH_TESTS}" == "TRUE" || "%{WITH_TESTS}" == "1"
78     %define with_tests 1
79 %endif
80
81 %build
82 export LDFLAGS+="-Wl,--rpath=/usr/lib"
83
84 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
85         -DDPL_LOG="ON"                    \
86         -DPROJECT_VERSION=%{version} \
87         -DCMAKE_BUILD_TYPE=%{?build_type:%build_type} \
88         %{?WITH_TESTS:-DWITH_TESTS=%WITH_TESTS}
89 make %{?jobs:-j%jobs}
90
91 %install
92 mkdir -p %{buildroot}/usr/share/license
93 cp LICENSE %{buildroot}/usr/share/license/%{name}
94 %make_install
95
96 ## wrt-launchpad-daemon #######################################################
97 mkdir -p %{buildroot}/etc/init.d
98 install -m 755 src/wrt-launchpad-daemon/wrt_launchpad_run.sh %{buildroot}/%{_sysconfdir}/init.d
99
100 mkdir -p %{buildroot}/etc/rc.d/rc3.d
101 mkdir -p %{buildroot}/etc/rc.d/rc4.d
102 ln -sf ../../init.d/wrt_launchpad_run.sh %{buildroot}/%{_sysconfdir}/rc.d/rc3.d/S15wrt_launchpad_run
103 ln -sf ../../init.d/wrt_launchpad_run.sh %{buildroot}/%{_sysconfdir}/rc.d/rc4.d/S80wrt_launchpad_run
104
105 #systemd
106 mkdir -p %{buildroot}%{_libdir}/systemd/system/graphical.target.wants
107 install -m 0644 %SOURCE101 %{buildroot}%{_libdir}/systemd/system/wrt_launchpad_daemon@.service
108 ln -s ../wrt_launchpad_daemon@.service %{buildroot}%{_libdir}/systemd/system/graphical.target.wants/wrt_launchpad_daemon@app.service
109
110 %preun
111 if [ $1 == 0 ]; then
112     systemctl stop wrt_launchpad_daemon@app.service
113 fi
114 ###############################################################################
115
116 %clean
117 rm -rf %{buildroot}
118
119 %post
120 #vconf --- register WRT
121 #naming rule : file/private/[pkg name]/[key name]
122 /usr/bin/vconftool set -t string file/private/wrt/vendor "Samsung" -f
123 /usr/bin/vconftool set -t string file/private/wrt/name "WebRuntime" -f
124 /usr/bin/vconftool set -t string file/private/wrt/version "1.0.0.0" -f
125 /usr/bin/vconftool set -t string file/private/wrt/api "W3C WAC1.0 WAC2.0" -f
126
127 chmod +s /usr/bin/wrt-launcher
128
129 ## wrt-launchpad-daemon #######################################################
130 #systemd
131 /sbin/ldconfig
132 systemctl daemon-reload
133 if [ $1 == 1 ]; then
134     systemctl restart wrt_launchpad_daemon@app.service
135 fi
136 ###############################################################################
137
138 echo "[WRT] wrt postinst done ..."
139
140 ## wrt-launchpad-daemon #######################################################
141 #systemd
142 %postun -p /sbin/ldconfig
143 systemctl daemon-reload
144 ###############################################################################
145
146 %files
147 %manifest wrt.manifest
148 %{_libdir}/*.so
149 %{_libdir}/*.so.*
150 %{_libdir}/wrt-wk2-bundles/*.so
151 %{_libdir}/wrt-wk2-bundles/*.so.*
152 %attr(755,root,root) %{_bindir}/wrt-client
153 %attr(755,root,root) %{_bindir}/wrt-launcher
154 %attr(755,root,root) %{_bindir}/wrt_reset_all.sh
155 %attr(755,root,root) %{_bindir}/wrt_reset_db.sh
156 %{_datadir}/locale/*
157 %{_datadir}/wrt-engine/*
158 %{_datadir}/license/%{name}
159 %attr(644,root,root) %{_datadir}/edje/wrt/*
160 %attr(644,root,root) %{_datadir}/edje/ace/*
161 %attr(644,root,root) /usr/etc/wrt/*
162 %if %{with_tests}
163     %attr(755,root,root) %{_bindir}/wrt-tests-general
164     /opt/share/widget/tests/general/*
165 %endif
166
167 ## wrt-launchpad-daemon #######################################################
168 %attr(755,root,root) %{_bindir}/wrt_launchpad_daemon
169 /usr/share/aul/preload_list_wrt.txt
170 %{_sysconfdir}/init.d/wrt_launchpad_run.sh
171 %attr(0755,root,root) %{_sysconfdir}/rc.d/rc3.d/S15wrt_launchpad_run
172 %attr(0755,root,root) %{_sysconfdir}/rc.d/rc4.d/S80wrt_launchpad_run
173 #systemd
174 %{_libdir}/systemd/system/graphical.target.wants/wrt_launchpad_daemon@app.service
175 %{_libdir}/systemd/system/wrt_launchpad_daemon@.service
176 ###############################################################################
177
178 %files devel
179 %{_includedir}/*
180 %{_libdir}/pkgconfig/*
181