Remove hardcoded path for multiuser support
[platform/core/appfw/ui-gadget-1.git] / packaging / ui-gadget-1.spec
1 %bcond_with x
2 %bcond_with wayland
3
4 Name:       ui-gadget-1
5 Summary:    UI Gadget Library
6 Version:    0.1.25
7 Release:    1
8 Group:      System/Libraries
9 License:    Apache License, Version 2.0
10 Source0:    %{name}-%{version}.tar.gz
11 Source1001:     ui-gadget-1.manifest
12 Requires(post): /sbin/ldconfig
13 Requires(postun): /sbin/ldconfig
14 BuildRequires:  pkgconfig(glib-2.0)
15 BuildRequires:  pkgconfig(appcore-efl)
16 BuildRequires:  pkgconfig(bundle)
17 BuildRequires:  pkgconfig(dlog)
18 %if %{with x}
19 BuildRequires:  pkgconfig(utilX)
20 BuildRequires:  pkgconfig(x11)
21 %endif
22 BuildRequires:  pkgconfig(appsvc)
23 BuildRequires:  pkgconfig(capi-appfw-application)
24 BuildRequires:  pkgconfig(capi-system-runtime-info)
25 BuildRequires:  pkgconfig(capi-appfw-app-manager)
26 BuildRequires:  cmake
27 BuildRequires:  edje-bin
28 BuildRequires: pkgconfig(libtzplatform-config)
29
30 %description
31 UI gadget library (development headers)
32
33 %package devel
34 Summary:    Development files for %{name}
35 Group:      Development/Libraries
36 Requires:   %{name} = %{version}-%{release}
37 %if %{with x}
38 Requires:  pkgconfig(x11)
39 %endif
40
41 %description devel
42 Development files for %{name}
43
44 %prep
45 %setup -q
46 cp %{SOURCE1001} .
47
48 %build
49 %cmake . \
50 -DTZ_SYS_ETC=%TZ_SYS_ETC \
51 %if %{with wayland} && !%{with x}
52 -Dwith_wayland=TRUE
53 %else
54 -Dwith_x=TRUE
55 %endif
56
57 make %{?jobs:-j%jobs}
58
59 %install
60 rm -rf %{buildroot}
61 %make_install
62
63 %post 
64 /sbin/ldconfig
65 ln -sf %{TZ_SYS_BIN}/ug-client %{TZ_SYS_BIN}/ug-launcher
66
67 %postun -p /sbin/ldconfig
68
69 %files
70 %manifest %{name}.manifest
71 %defattr(-,root,root,-)
72 %{_libdir}/*.so.*
73 %{_libdir}/lib%{name}-efl-engine.so
74 /usr/share/edje/ug_effect.edj
75 %{_bindir}/ug-client
76 /usr/share/edje/ug-client/*.edj
77 %{TZ_SYS_ETC}/smack/accesses.d/ui-gadget-1.rule
78
79 %files devel
80 %manifest %{name}.manifest
81 %defattr(-,root,root,-)
82 %{_includedir}/ug-1/*.h
83 %{_libdir}/libui-gadget-1.so
84 %{_libdir}/pkgconfig/%{name}.pc
85