2ed30cfdca5ffee29a692002712c0f4f20783a71
[platform/core/appfw/appcore-agent.git] / packaging / appcore-agent.spec
1 Name:           appcore-agent
2 Version:        1.0.4
3 Release:        1
4 License:        Apache-2.0
5 Summary:        Service Application basic
6 Group:          Application Framework/Service
7 Source0:        %{name}-%{version}.tar.gz
8 Source1001:     appcore-agent.manifest
9 BuildRequires:  cmake
10 BuildRequires:  pkgconfig(aul)
11 BuildRequires:  pkgconfig(capi-appfw-app-control)
12 BuildRequires:  pkgconfig(capi-appfw-app-common)
13 BuildRequires:  pkgconfig(appcore-common)
14 BuildRequires:  pkgconfig(dlog)
15 BuildRequires:  pkgconfig(ecore)
16 BuildRequires:  pkgconfig(vconf)
17 BuildRequires:  pkgconfig(vconf-internal-keys)
18
19 %description
20 Service Application basic
21
22 %if "%{?profile}" == "wearable"
23 %define appfw_feature_background_management 1
24 %else
25 %if "%{?profile}" == "mobile"
26 %define appfw_feature_background_management 1
27 %else
28 %if "%{?profile}" == "tv"
29 %define appfw_feature_background_management 0
30 %endif
31 %endif
32 %endif
33
34 %package devel
35 Summary:        Application Core Agent
36 Group:          Application Framework/Development
37 Requires:       %{name} = %{version}-%{release}
38
39 %description devel
40 appcore agent (developement files)
41
42 %package -n capi-appfw-service-application-devel
43 Summary:    service appliation
44 Group:      Development/Libraries
45 Requires:    appcore-agent-devel = %{version}-%{release}
46
47 %description -n capi-appfw-service-application-devel
48 Service Application basic (developement files)
49
50 %prep
51 %setup -q
52 cp %{SOURCE1001} .
53
54 %build
55
56 %if 0%{?appfw_feature_background_management}
57 _APPFW_FEATURE_BACKGROUND_MANAGEMENT=ON
58 %endif
59
60 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
61
62 %cmake -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \
63         -D_APPFW_FEATURE_BACKGROUND_MANAGEMENT:BOOL=${_APPFW_FEATURE_BACKGROUND_MANAGEMENT} \
64         .
65 %__make %{?_smp_mflags}
66
67 %install
68 %make_install
69
70 %post -p /sbin/ldconfig
71
72 %postun -p /sbin/ldconfig
73
74 %files
75 %manifest %{name}.manifest
76 %license LICENSE
77 %defattr(-,root,root,-)
78 %{_libdir}/libappcore-agent.so*
79
80 %files devel
81 %manifest %{name}.manifest
82 %defattr(-,root,root,-)
83 %{_libdir}/pkgconfig/appcore-agent.pc
84 %{_includedir}/appcore-agent/appcore-agent.h
85
86
87 %files -n capi-appfw-service-application-devel
88 %{_includedir}/appcore-agent/service_app.h
89 %{_includedir}/appcore-agent/service_app_extension.h
90 %{_libdir}/pkgconfig/capi-appfw-service-application.pc