Tizen 2.4.0 rev3 SDK Public Release
[framework/web/wrt-installer.git] / packaging / wrt-installer.spec
1 #git:framework/web/wrt-installer
2 Name:       wrt-installer
3 Summary:    Installer for tizen Webruntime
4 Version:    1.0.21
5 Release:    1
6 Group:      Development/Libraries
7 License:    Apache-2.0
8 URL:        N/A
9 Source0:    %{name}-%{version}.tar.gz
10 BuildRequires:  cmake
11 BuildRequires:  boost
12 BuildRequires:  edje-tools
13 BuildRequires:  pkgconfig(appsvc)
14 BuildRequires:  pkgconfig(libxml-2.0)
15 BuildRequires:  pkgconfig(openssl)
16 BuildRequires:  pkgconfig(dpl-efl)
17 BuildRequires:  pkgconfig(cert-svc-vcore)
18 BuildRequires:  pkgconfig(dpl-event-efl)
19 BuildRequires:  pkgconfig(dpl-utils-efl)
20 BuildRequires:  pkgconfig(dpl-wrt-dao-ro)
21 BuildRequires:  pkgconfig(dpl-wrt-dao-rw)
22 BuildRequires:  pkgconfig(wrt-commons-i18n-dao-ro)
23 BuildRequires:  pkgconfig(wrt-commons-widget-interface-dao)
24 BuildRequires:  pkgconfig(capi-security-privilege-manager)
25 BuildRequires:  pkgconfig(ecore-x)
26 BuildRequires:  pkgconfig(xmlsec1)
27 BuildRequires:  pkgconfig(libidn)
28 BuildRequires:  pkgconfig(libiri)
29 BuildRequires:  pkgconfig(libpcrecpp)
30 BuildRequires:  pkgconfig(pkgmgr-installer)
31 BuildRequires:  pkgconfig(pkgmgr-parser)
32 BuildRequires:  pkgconfig(pkgmgr-types)
33 BuildRequires:  pkgconfig(pkgmgr-info)
34 BuildRequires:  pkgconfig(pkgmgr)
35 BuildRequires:  pkgconfig(dlog)
36 BuildRequires:  pkgconfig(cert-svc)
37 BuildRequires:  pkgconfig(utilX)
38 BuildRequires:  pkgconfig(wrt-plugins-types)
39 BuildRequires:  pkgconfig(shortcut)
40 BuildRequires:  pkgconfig(capi-appfw-app-manager)
41 BuildRequires:  pkgconfig(capi-appfw-package-manager)
42 BuildRequires:  pkgconfig(capi-appfw-application)
43 BuildRequires:  pkgconfig(capi-system-device)
44 BuildRequires:  pkgconfig(app2sd)
45 BuildRequires:  pkgconfig(libprivilege-control)
46 BuildRequires:  pkgconfig(libsmack)
47 BuildRequires:  pkgconfig(security-server)
48 BuildRequires:  pkgconfig(storage)
49 BuildRequires:  pkgconfig(uuid)
50 BuildRequires:  pkgconfig(drm-service-core-tizen)
51 BuildRequires:  libss-client-devel
52 Requires: libss-client
53 Requires: boost-filesystem
54 Requires: boost-system
55 Requires: xmlsec1
56
57 %if "%{tizen_profile_name}" == "wearable" || "%{tizen_profile_name}" == "mobile"
58 #BuildRequires:  pkgconfig(web-provider)
59 %endif
60
61 %description
62 Description: Wrt Installer for Tizen apps and Wac apps
63
64 %prep
65 %setup -q
66
67 %define with_tests 0
68 %if "%{WITH_TESTS}" == "ON" || "%{WITH_TESTS}" == "Y" || "%{WITH_TESTS}" == "YES" || "%{WITH_TESTS}" == "TRUE" || "%{WITH_TESTS}" == "1"
69     %define with_tests 1
70 %endif
71
72 %build
73 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
74 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
75 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
76
77 %if "%{tizen_profile_name}" == "wearable"
78     %define device_profile WEARABLE
79 %endif
80 %if "%{tizen_profile_name}" == "mobile"
81     %define device_profile MOBILE
82 %endif
83 %if "%{tizen_profile_name}" == "tv"
84     %define device_profile TV
85 %endif
86
87 export LDFLAGS+="-Wl,--rpath=/usr/lib -Wl,--hash-style=both -Wl,--as-needed"
88 LDFLAGS="$LDFLAGS"
89
90 %if "%{tizen_profile_name}" == "wearable"
91     ln -sf configuration_mobile configuration
92 %else
93     ln -sf configuration_wearable configuration
94 %endif
95
96 cmake . -DCMAKE_INSTALL_PREFIX=/usr \
97         -DTIZEN_VERSION=%{tizen_version} \
98         -DDPL_LOG=ON \
99         -DLB_SUPPORT=ON \
100         -DCMAKE_BUILD_TYPE=%{?build_type:%build_type} \
101         -DDEVICE_PROFILE=%{?device_profile:%device_profile} \
102         %{?WITH_TESTS:-DWITH_TESTS=%WITH_TESTS}
103 make %{?jobs:-j%jobs}
104
105 %install
106 rm -rf %{buildroot}
107 mkdir -p %{buildroot}/usr/share/license
108 cp LICENSE %{buildroot}/usr/share/license/%{name}
109 %make_install
110
111 %clean
112 rm -rf %{buildroot}
113
114 %post
115 /sbin/ldconfig
116
117 #symlink for package manager
118 %define pkg_manager_backend_path "/usr/etc/package-manager/backend"
119 ln -sf /usr/bin/wrt-installer %{pkg_manager_backend_path}/wgt
120 ln -sf %{pkg_manager_backend_path}/wgt %{pkg_manager_backend_path}/Wgt
121 ln -sf %{pkg_manager_backend_path}/wgt %{pkg_manager_backend_path}/wGt
122 ln -sf %{pkg_manager_backend_path}/wgt %{pkg_manager_backend_path}/wgT
123 ln -sf %{pkg_manager_backend_path}/wgt %{pkg_manager_backend_path}/WGt
124 ln -sf %{pkg_manager_backend_path}/wgt %{pkg_manager_backend_path}/wGT
125 ln -sf %{pkg_manager_backend_path}/wgt %{pkg_manager_backend_path}/WgT
126 ln -sf %{pkg_manager_backend_path}/wgt %{pkg_manager_backend_path}/WGT
127
128 #for booting recovery
129 mkdir -p /opt/share/widget/temp_info
130
131 # for downloadable Application icons path
132 mkdir -p /opt/share/icons/default/small
133
134 %postun -p /sbin/ldconfig
135
136 %files
137 %manifest wrt-installer.manifest
138 %attr(755,root,root) %{_bindir}/wrt-installer
139 /usr/etc/package-manager/backendlib/libwgt.so
140 %attr(644,root,root) /usr/etc/wrt-installer/*.xsd
141 %{_datadir}/license/%{name}
142 %if %{with_tests}
143     %attr(755,root,root) %{_bindir}/wrt-installer-tests-*
144     /opt/share/widget/tests/installer/widgets/*
145     /opt/share/widget/tests/installer/configs/*
146 %endif