Update background-support app's memory policy and reorganize some code
[platform/framework/web/wrt.git] / packaging / wrt.spec
1 #git:framework/web/wrt wrt_0.8.148
2 Name:       wrt
3 Summary:    web runtime
4 Version:    0.8.148
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
48 ## wrt-launchpad-daemon #######################################################
49 BuildRequires:  pkgconfig(app-checker)
50 BuildRequires:  pkgconfig(bundle)
51 BuildRequires:  pkgconfig(dlog)
52 BuildRequires:  pkgconfig(dbus-glib-1)
53 BuildRequires:  pkgconfig(libsmack)
54 BuildRequires:  pkgconfig(sqlite3)
55 BuildRequires:  pkgconfig(x11)
56 BuildRequires:  pkgconfig(aul)
57 ###############################################################################
58
59 %description
60 web runtime
61
62 %package devel
63 Summary:    Wrt header files for external modules
64 Group:      Development/Libraries
65 Requires:   %{name} = %{version}
66
67 %description devel
68 wrt library development headers
69
70 %prep
71 %setup -q
72
73 %build
74 export LDFLAGS+="-Wl,--rpath=/usr/lib"
75
76 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
77         -DDPL_LOG="ON"                    \
78         -DPROJECT_VERSION=%{version} \
79         -DCMAKE_BUILD_TYPE=%{?build_type:%build_type}
80 make %{?jobs:-j%jobs}
81
82 %install
83 mkdir -p %{buildroot}/usr/share/license
84 cp LICENSE %{buildroot}/usr/share/license/%{name}
85 %make_install
86
87 ## wrt-launchpad-daemon #######################################################
88 mkdir -p %{buildroot}/etc/init.d
89 install -m 755 src/wrt-launchpad-daemon/wrt_launchpad_run.sh %{buildroot}/%{_sysconfdir}/init.d
90
91 mkdir -p %{buildroot}/etc/rc.d/rc3.d
92 mkdir -p %{buildroot}/etc/rc.d/rc4.d
93 ln -sf ../../init.d/wrt_launchpad_run.sh %{buildroot}/%{_sysconfdir}/rc.d/rc3.d/S15wrt_launchpad_run
94 ln -sf ../../init.d/wrt_launchpad_run.sh %{buildroot}/%{_sysconfdir}/rc.d/rc4.d/S80wrt_launchpad_run
95
96 #systemd
97 mkdir -p %{buildroot}%{_libdir}/systemd/system/graphical.target.wants
98 install -m 0644 %SOURCE101 %{buildroot}%{_libdir}/systemd/system/wrt_launchpad_daemon@.service
99 ln -s ../wrt_launchpad_daemon@.service %{buildroot}%{_libdir}/systemd/system/graphical.target.wants/wrt_launchpad_daemon@app.service
100
101 %preun
102 if [ $1 == 0 ]; then
103     systemctl stop wrt_launchpad_daemon@app.service
104 fi
105 ###############################################################################
106
107 %clean
108 rm -rf %{buildroot}
109
110 %post
111 #vconf --- register WRT
112 #naming rule : file/private/[pkg name]/[key name]
113 /usr/bin/vconftool set -t string file/private/wrt/vendor "Samsung" -f
114 /usr/bin/vconftool set -t string file/private/wrt/name "WebRuntime" -f
115 /usr/bin/vconftool set -t string file/private/wrt/version "1.0.0.0" -f
116 /usr/bin/vconftool set -t string file/private/wrt/api "W3C WAC1.0 WAC2.0" -f
117
118 chmod +s /usr/bin/wrt-launcher
119
120 ## wrt-launchpad-daemon #######################################################
121 #systemd
122 /sbin/ldconfig
123 systemctl daemon-reload
124 if [ $1 == 1 ]; then
125     systemctl restart wrt_launchpad_daemon@app.service
126 fi
127 ###############################################################################
128
129 echo "[WRT] wrt postinst done ..."
130
131 ## wrt-launchpad-daemon #######################################################
132 #systemd
133 %postun -p /sbin/ldconfig
134 systemctl daemon-reload
135 ###############################################################################
136
137 %files
138 %manifest wrt.manifest
139 %{_libdir}/*.so
140 %{_libdir}/*.so.*
141 %{_libdir}/wrt-wk2-bundles/*.so
142 %{_libdir}/wrt-wk2-bundles/*.so.*
143 %attr(755,root,root) %{_bindir}/wrt-client
144 %attr(755,root,root) %{_bindir}/wrt-launcher
145 %attr(755,root,root) %{_bindir}/wrt_reset_all.sh
146 %attr(755,root,root) %{_bindir}/wrt_reset_db.sh
147 %{_datadir}/locale/*
148 %{_datadir}/wrt-engine/*
149 %{_datadir}/license/%{name}
150 %attr(644,root,root) %{_datadir}/edje/wrt/*
151 %attr(644,root,root) %{_datadir}/edje/ace/*
152 %attr(644,root,root) /usr/etc/wrt/*
153
154 ## wrt-launchpad-daemon #######################################################
155 %attr(755,root,root) %{_bindir}/wrt_launchpad_daemon
156 /usr/share/aul/preload_list_wrt.txt
157 %{_sysconfdir}/init.d/wrt_launchpad_run.sh
158 %attr(0755,root,root) %{_sysconfdir}/rc.d/rc3.d/S15wrt_launchpad_run
159 %attr(0755,root,root) %{_sysconfdir}/rc.d/rc4.d/S80wrt_launchpad_run
160 #systemd
161 %{_libdir}/systemd/system/graphical.target.wants/wrt_launchpad_daemon@app.service
162 %{_libdir}/systemd/system/wrt_launchpad_daemon@.service
163 ###############################################################################
164
165 %files devel
166 %{_includedir}/*
167 %{_libdir}/pkgconfig/*
168