Merge "Revert "Disable TTS temporarily in wayland environment"" into tizen
[platform/core/uifw/libscl-ui.git] / packaging / libscl-ui.spec
1 %bcond_with x
2 %bcond_with wayland
3
4 %define _optdir /opt
5 %define _appdir %{_optdir}/apps
6
7 Name:       libscl-ui
8 Summary:    A library for developing XML-based software keyboards
9 Version:    0.4.7
10 Release:    1
11 Group:      Graphics & UI Framework/Input
12 License:    Apache-2.0
13 Source0:    libscl-ui-%{version}.tar.gz
14 BuildRequires:  gettext-tools
15 BuildRequires:  cmake
16 BuildRequires:  pkgconfig(elementary)
17 %if %{with wayland}
18 %else
19 BuildRequires:  pkgconfig(utilX)
20 BuildRequires:  pkgconfig(x11)
21 %endif
22 BuildRequires:  pkgconfig(vconf)
23 BuildRequires:  pkgconfig(feedback)
24 BuildRequires:  pkgconfig(sensor)
25 BuildRequires:  pkgconfig(dlog)
26 BuildRequires:  pkgconfig(libxml-2.0)
27 BuildRequires:  pkgconfig(tts)
28
29
30 %description
31 A library that helps developing S/W Keyboard
32
33 %package devel
34 Summary:    SCL header file
35 Group:      Development/Libraries
36 Requires:   %{name} = %{version}-%{release}
37
38 %description devel
39 A devel package of libscl-ui library that helps developing S/W Keyboard
40
41 %prep
42 %setup -q
43
44
45 %build
46 rm -rf CMakeFiles
47 rm -rf CMakeCache.txt
48
49 %if "%{profile}" == "wearable"
50 CFLAGS+=" -D_WEARABLE";
51 CXXFLAGS+=" -D_WEARABLE";
52 %endif
53
54 %if "%{profile}" == "mobile"
55 CFLAGS+=" -D_MOBILE";
56 CXXFLAGS+=" -D_MOBILE";
57 %endif
58
59 %if "%{profile}" == "tv"
60 CFLAGS+=" -D_TV";
61 CXXFLAGS+=" -D_TV";
62 %endif
63
64 %if %{with wayland}
65 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIB_INSTALL_DIR:PATH=%{_libdir} -Dwith_wayland=TRUE
66 %else
67 cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIB_INSTALL_DIR:PATH=%{_libdir}
68 %endif
69 make %{?jobs:-j%jobs}
70
71 %install
72 rm -rf %{buildroot}
73 mkdir -p %{buildroot}/usr/share/license
74 cp LICENSE %{buildroot}/usr/share/license/%{name}
75
76 %make_install
77
78
79
80 %post
81
82 %postun
83
84 %files
85 %defattr(-,root,root,-)
86 %{_libdir}/libscl-ui.so
87 %{_datadir}/libscl-ui/metadata.xml
88 /usr/share/license/%{name}
89
90 %files devel
91 %defattr(-,root,root,-)
92 %{_includedir}/*
93 %{_libdir}/pkgconfig/libscl-ui.pc
94 %{_bindir}/xml2binary