Add multi-user support
[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:    48
8 Group:      Application Framework
9 License:    Apache-2.0
10 Source0:    app-core-%{version}.tar.gz
11 %if %{with wayland} && !%{with x}
12 Source101:  packaging/core-efl-wayland.target
13 %else
14 Source101:  packaging/core-efl-x.target
15 BuildRequires:  pkgconfig(x11)
16 BuildRequires:  pkgconfig(ecore-x)
17 %endif
18 Source1001:     app-core.manifest
19 BuildRequires:  pkgconfig(sensor)
20 BuildRequires:  pkgconfig(vconf)
21 BuildRequires:  pkgconfig(aul)
22 BuildRequires:  pkgconfig(rua)
23 BuildRequires:  pkgconfig(dlog)
24 BuildRequires:  pkgconfig(elementary)
25 BuildRequires:  pkgconfig(ecore)
26 BuildRequires:  pkgconfig(gobject-2.0)
27 BuildRequires:  pkgconfig(glib-2.0)
28 BuildRequires:  pkgconfig(libtzplatform-config)
29 BuildRequires:  cmake
30
31
32 %description
33 SLP common application basic
34
35
36
37 %package efl
38 Summary:    App basic EFL
39 Group:      Development/Libraries
40 Requires(post): /sbin/ldconfig
41 Requires(postun): /sbin/ldconfig
42
43 %description efl
44 Application basic EFL
45
46 %package efl-devel
47 Summary:    App basic EFL (devel)
48 Group:      Development/Libraries
49 Requires:   %{name}-efl = %{version}-%{release}
50 Requires:   %{name}-common-devel = %{version}-%{release}
51
52 %description efl-devel
53 Application basic EFL (devel)
54
55 %package common
56 Summary:    App basics common
57 Group:      Development/Libraries
58 Requires(post): /sbin/ldconfig
59 Requires(postun): /sbin/ldconfig
60
61 %description common
62 Application basics common
63
64 %package common-devel
65 Summary:    App basics common (devel)
66 Group:      Development/Libraries
67 Requires:   %{name}-common = %{version}-%{release}
68 Requires:   pkgconfig(sensor)
69 Requires:   pkgconfig(vconf)
70 Requires:   pkgconfig(elementary)
71 Requires:   pkgconfig(aul)
72 %if %{with x}
73 Requires:  pkgconfig(x11)
74 %endif
75
76
77 %description common-devel
78 Application basics common (devel)
79
80 %package template
81 Summary:    App basics template
82 Group:      Development/Libraries
83
84 %description template
85 Application basics template
86
87
88 %prep
89 %setup -q 
90 cp %{SOURCE1001} .
91
92 %build
93 %cmake . \
94 %if %{with wayland} && !%{with x}
95 -Dwith_wayland=TRUE\
96 %endif
97 -DENABLE_GTK=OFF
98
99 make %{?jobs:-j%jobs}
100
101 %install
102 rm -rf %{buildroot}
103 %make_install
104 install -d %{buildroot}%{_unitdir_user}/core-efl.target.wants
105 install -m0644 %{SOURCE101} %{buildroot}%{_unitdir_user}/core-efl.target
106
107 mkdir -p %{buildroot}/usr/share/license
108 cp LICENSE %{buildroot}/usr/share/license/%{name}-efl
109 cp LICENSE %{buildroot}/usr/share/license/%{name}-efl-devel
110 cp LICENSE %{buildroot}/usr/share/license/%{name}-common
111 cp LICENSE %{buildroot}/usr/share/license/%{name}-common-devel
112
113 %post efl -p /sbin/ldconfig
114
115 %postun efl -p /sbin/ldconfig
116
117 %post common -p /sbin/ldconfig
118
119 %postun common -p /sbin/ldconfig
120
121
122
123
124
125 %files efl
126 %manifest %{name}.manifest
127 %defattr(-,root,root,-)
128 %{_libdir}/libappcore-efl.so.*
129 /usr/share/license/%{name}-efl
130
131 %files efl-devel
132 %manifest %{name}.manifest
133 %defattr(-,root,root,-)
134 %{_includedir}/appcore/appcore-efl.h
135 %{_libdir}/libappcore-efl.so
136 %{_libdir}/pkgconfig/appcore-efl.pc
137 /usr/share/license/%{name}-efl-devel
138
139 %files common
140 %manifest %{name}.manifest
141 %defattr(-,root,root,-)
142 %{_libdir}/libappcore-common.so.*
143 %{_prefix}/lib/systemd/user/core-efl.target
144 %{_prefix}/lib/systemd/user/core-efl.target.wants/
145 /usr/share/license/%{name}-common
146
147 %files common-devel
148 %manifest %{name}.manifest
149 %defattr(-,root,root,-)
150 %{_libdir}/libappcore-common.so
151 %{_libdir}/pkgconfig/appcore-common.pc
152 %{_includedir}/appcore/appcore-common.h
153 %{_includedir}/SLP_Appcore_PG.h
154 /usr/share/license/%{name}-common-devel
155