[Release] wrt_0.8.169
[platform/framework/web/wrt.git] / packaging / wrt.spec
1 #git:framework/web/wrt wrt_0.8.169
2 Name:       wrt
3 Summary:    web runtime
4 Version:    0.8.169
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 chmod +s /usr/bin/wrt-launcher
121
122 ## wrt-launchpad-daemon #######################################################
123 #systemd
124 /sbin/ldconfig
125 systemctl daemon-reload
126 if [ $1 == 1 ]; then
127     systemctl restart wrt_launchpad_daemon@app.service
128 fi
129 ###############################################################################
130
131 echo "[WRT] wrt postinst done ..."
132
133 ## wrt-launchpad-daemon #######################################################
134 #systemd
135 %postun -p /sbin/ldconfig
136 systemctl daemon-reload
137 ###############################################################################
138
139 %files
140 %manifest wrt.manifest
141 %{_libdir}/*.so
142 %{_libdir}/*.so.*
143 %{_libdir}/wrt-wk2-bundles/*.so
144 %{_libdir}/wrt-wk2-bundles/*.so.*
145 %attr(755,root,root) %{_bindir}/wrt-client
146 %attr(755,root,root) %{_bindir}/wrt-launcher
147 %attr(755,root,root) %{_bindir}/wrt_reset_all.sh
148 %attr(755,root,root) %{_bindir}/wrt_reset_db.sh
149 %{_datadir}/locale/*
150 %{_datadir}/wrt-engine/*
151 %{_datadir}/license/%{name}
152 %attr(644,root,root) %{_datadir}/edje/wrt/*
153 %attr(644,root,root) %{_datadir}/edje/ace/*
154 %attr(644,root,root) /usr/etc/wrt/*
155 %if %{with_tests}
156     %attr(755,root,root) %{_bindir}/wrt-tests-general
157     /opt/share/widget/tests/general/*
158 %endif
159 %attr(755,root,root) %{_sysconfdir}/profile.d/wrt_env.sh
160
161 ## wrt-launchpad-daemon #######################################################
162 %attr(755,root,root) %{_bindir}/wrt_launchpad_daemon
163 /usr/share/aul/preload_list_wrt.txt
164 %{_sysconfdir}/init.d/wrt_launchpad_run.sh
165 %attr(0755,root,root) %{_sysconfdir}/rc.d/rc3.d/S15wrt_launchpad_run
166 %attr(0755,root,root) %{_sysconfdir}/rc.d/rc4.d/S80wrt_launchpad_run
167 #systemd
168 %{_libdir}/systemd/system/graphical.target.wants/wrt_launchpad_daemon@app.service
169 %{_libdir}/systemd/system/wrt_launchpad_daemon@.service
170 ###############################################################################
171
172 %files devel
173 %{_includedir}/*
174 %{_libdir}/pkgconfig/*
175