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