821ef11cc6878a052a462258e057e70285cca16d
[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.30
7 Release:    1
8 Group:      System/Libraries
9 License:    Apache-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(x11)
20 %endif
21 BuildRequires:  pkgconfig(appsvc)
22 BuildRequires:  pkgconfig(elementary)
23 BuildRequires:  pkgconfig(capi-appfw-application)
24 BuildRequires:  pkgconfig(capi-appfw-app-manager)
25 BuildRequires:  pkgconfig(vconf)
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 mkdir -p %{buildroot}/usr/share/license
63 install LICENSE %{buildroot}/usr/share/license/%{name}
64
65 %post
66 /sbin/ldconfig
67 ln -sf %{TZ_SYS_BIN}/ug-client %{TZ_SYS_BIN}/ug-launcher
68
69 %postun -p /sbin/ldconfig
70
71 %files
72 %manifest %{name}.manifest
73 %defattr(-,root,root,-)
74 %{_libdir}/*.so.*
75 %{_libdir}/lib%{name}-efl-engine.so
76 /usr/share/edje/ug_effect.edj
77 %{_bindir}/ug-client
78 /usr/share/edje/ug-client/*.edj
79 /usr/share/license/%{name}
80
81 %files devel
82 %manifest %{name}.manifest
83 %defattr(-,root,root,-)
84 %{_includedir}/ug-1/*.h
85 %{_libdir}/libui-gadget-1.so
86 %{_libdir}/pkgconfig/%{name}.pc
87