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