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