Merge branch 'tizen_3.0' into tizen
[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(pkgmgr-info)
35 BuildRequires:  pkgconfig(ttrace)
36 BuildRequires:  cmake
37
38 %description
39 SLP common application basic
40
41
42 %package efl
43 Summary:    App basic EFL
44 Group:      Development/Libraries
45 Requires(post): /sbin/ldconfig
46 Requires(postun): /sbin/ldconfig
47
48 %description efl
49 Application basic EFL
50
51
52 %package efl-devel
53 Summary:    App basic EFL (devel)
54 Group:      Development/Libraries
55 Requires:   %{name}-efl = %{version}-%{release}
56 Requires:   %{name}-common-devel = %{version}-%{release}
57
58 %description efl-devel
59 Application basic EFL (devel)
60
61
62 %package common
63 Summary:    App basics common
64 Group:      Development/Libraries
65 Requires(post): /sbin/ldconfig
66 Requires(postun): /sbin/ldconfig
67
68 %description common
69 Application basics common
70
71
72 %package common-devel
73 Summary:    App basics common (devel)
74 Group:      Development/Libraries
75 Requires:   %{name}-common = %{version}-%{release}
76 Requires:   pkgconfig(sensor)
77 Requires:   pkgconfig(vconf)
78 Requires:   pkgconfig(elementary)
79 Requires:   pkgconfig(aul)
80 %if %{with x}
81 Requires:   pkgconfig(x11)
82 %endif
83
84 %description common-devel
85 Application basics common (devel)
86
87
88 %package template
89 Summary:    App basics template
90 Group:      Development/Libraries
91
92 %description template
93 Application basics template
94
95 %if "%{?profile}" == "wearable"
96 %define appfw_feature_background_management 1
97 %else
98 %if "%{?profile}" == "mobile"
99 %define appfw_feature_background_management 1
100 %else
101 %if "%{?profile}" == "tv"
102 %define appfw_feature_background_management 0
103 %endif
104 %endif
105 %endif
106
107 %prep
108 %setup -q
109 cp %{SOURCE1001} .
110
111 %build
112 %if %{with wayland}
113 _WITH_WAYLAND=ON
114 %endif
115 %if %{with x}
116 _WITH_X11=ON
117 %endif
118 %if 0%{?appfw_feature_background_management}
119 _APPFW_FEATURE_BACKGROUND_MANAGEMENT=ON
120 %endif
121
122 %cmake . \
123         -D_WITH_WAYLAND:BOOL=${_WITH_WAYLAND} \
124         -D_WITH_X11:BOOL=${_WITH_X11} \
125         -D_APPFW_FEATURE_BACKGROUND_MANAGEMENT:BOOL=${_APPFW_FEATURE_BACKGROUND_MANAGEMENT} \
126         -DENABLE_GTK=OFF
127
128 make %{?_smp_mflags}
129
130
131 %install
132 rm -rf %{buildroot}
133 %make_install
134
135
136 %post -n app-core-efl -p /sbin/ldconfig
137
138 %postun -n app-core-efl -p /sbin/ldconfig
139
140 %post -n app-core-common -p /sbin/ldconfig
141
142 %postun -n app-core-common -p /sbin/ldconfig
143
144
145 %files efl
146 %manifest %{name}.manifest
147 %{_libdir}/libappcore-efl.so.*
148 %license LICENSE
149
150 %files efl-devel
151 %manifest %{name}.manifest
152 %{_includedir}/appcore/appcore-efl.h
153 %{_libdir}/libappcore-efl.so
154 %{_libdir}/pkgconfig/appcore-efl.pc
155
156 %files common
157 %manifest %{name}.manifest
158 %{_libdir}/libappcore-common.so.*
159 %license LICENSE
160
161 %files common-devel
162 %manifest %{name}.manifest
163 %{_libdir}/libappcore-common.so
164 %{_libdir}/pkgconfig/appcore-common.pc
165 %{_includedir}/appcore/appcore-common.h
166 %{_includedir}/SLP_Appcore_PG.h