Support background launch
[platform/core/appfw/app-core.git] / packaging / app-core.spec
1 %bcond_with x
2 %bcond_with wayland
3
4 Name:           app-core
5 Summary:        Application basic
6 Version:        1.2
7 Release:        0
8 Group:          Application Framework/Libraries
9 License:        Apache-2.0
10 Source0:        app-core-%{version}.tar.gz
11 %if %{with x}
12 BuildRequires:  pkgconfig(x11)
13 BuildRequires:  pkgconfig(ecore-x)
14 BuildRequires:  pkgconfig(eina)
15 %else
16 %if %{with wayland}
17 BuildRequires:  pkgconfig(ecore-wayland)
18 BuildRequires:  pkgconfig(wayland-client)
19 BuildRequires:  pkgconfig(tizen-extension-client)
20 BuildRequires:  pkgconfig(wayland-tbm-client)
21 %endif
22 %endif
23 Source1001:     app-core.manifest
24 BuildRequires:  pkgconfig(gio-2.0)
25 BuildRequires:  pkgconfig(sensor)
26 BuildRequires:  pkgconfig(vconf)
27 BuildRequires:  pkgconfig(aul)
28 BuildRequires:  pkgconfig(rua)
29 BuildRequires:  pkgconfig(dlog)
30 BuildRequires:  pkgconfig(elementary)
31 BuildRequires:  pkgconfig(ecore)
32 BuildRequires:  pkgconfig(gobject-2.0)
33 BuildRequires:  pkgconfig(glib-2.0)
34 BuildRequires:  pkgconfig(libtzplatform-config)
35 BuildRequires:  pkgconfig(pkgmgr-info)
36 BuildRequires:  pkgconfig(ttrace)
37 BuildRequires:  cmake
38
39 %description
40 SLP common application basic
41
42
43 %package efl
44 Summary:    App basic EFL
45 Group:      Development/Libraries
46 Requires(post): /sbin/ldconfig
47 Requires(postun): /sbin/ldconfig
48
49 %description efl
50 Application basic EFL
51
52
53 %package efl-devel
54 Summary:    App basic EFL (devel)
55 Group:      Development/Libraries
56 Requires:   %{name}-efl = %{version}-%{release}
57 Requires:   %{name}-common-devel = %{version}-%{release}
58
59 %description efl-devel
60 Application basic EFL (devel)
61
62
63 %package common
64 Summary:    App basics common
65 Group:      Development/Libraries
66 Requires(post): /sbin/ldconfig
67 Requires(postun): /sbin/ldconfig
68
69 %description common
70 Application basics common
71
72
73 %package common-devel
74 Summary:    App basics common (devel)
75 Group:      Development/Libraries
76 Requires:   %{name}-common = %{version}-%{release}
77 Requires:   pkgconfig(sensor)
78 Requires:   pkgconfig(vconf)
79 Requires:   pkgconfig(elementary)
80 Requires:   pkgconfig(aul)
81 %if %{with x}
82 Requires:   pkgconfig(x11)
83 %endif
84
85 %description common-devel
86 Application basics common (devel)
87
88
89 %package template
90 Summary:    App basics template
91 Group:      Development/Libraries
92
93 %description template
94 Application basics template
95
96 %if "%{?profile}" == "wearable"
97 %define appfw_feature_background_management 1
98 %else
99 %if "%{?profile}" == "mobile"
100 %define appfw_feature_background_management 1
101 %else
102 %if "%{?profile}" == "tv"
103 %define appfw_feature_background_management 0
104 %endif
105 %endif
106 %endif
107
108 %prep
109 %setup -q
110 cp %{SOURCE1001} .
111
112 %build
113 %if %{with wayland}
114 _WITH_WAYLAND=ON
115 %endif
116 %if %{with x}
117 _WITH_X11=ON
118 %endif
119 %if 0%{?appfw_feature_background_management}
120 _APPFW_FEATURE_BACKGROUND_MANAGEMENT=ON
121 %endif
122
123 %cmake . \
124         -D_WITH_WAYLAND:BOOL=${_WITH_WAYLAND} \
125         -D_WITH_X11:BOOL=${_WITH_X11} \
126         -D_APPFW_FEATURE_BACKGROUND_MANAGEMENT:BOOL=${_APPFW_FEATURE_BACKGROUND_MANAGEMENT} \
127         -DENABLE_GTK=OFF
128
129 make %{?_smp_mflags}
130
131
132 %install
133 rm -rf %{buildroot}
134 %make_install
135
136
137 %post -n app-core-efl -p /sbin/ldconfig
138
139 %postun -n app-core-efl -p /sbin/ldconfig
140
141 %post -n app-core-common -p /sbin/ldconfig
142
143 %postun -n app-core-common -p /sbin/ldconfig
144
145
146 %files efl
147 %manifest %{name}.manifest
148 %{_libdir}/libappcore-efl.so.*
149 %license LICENSE
150
151 %files efl-devel
152 %manifest %{name}.manifest
153 %{_includedir}/appcore/appcore-efl.h
154 %{_libdir}/libappcore-efl.so
155 %{_libdir}/pkgconfig/appcore-efl.pc
156
157 %files common
158 %manifest %{name}.manifest
159 %{_libdir}/libappcore-common.so.*
160 %license LICENSE
161
162 %files common-devel
163 %manifest %{name}.manifest
164 %{_libdir}/libappcore-common.so
165 %{_libdir}/pkgconfig/appcore-common.pc
166 %{_includedir}/appcore/appcore-common.h
167 %{_includedir}/SLP_Appcore_PG.h