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