32c0e1ce055f1ae027ec8fce7bde34319b76508e
[platform/core/uifw/libtdm.git] / packaging / libtdm.spec
1 %bcond_with utest
2
3 Name:           libtdm
4 Version:        1.7.8
5 Release:        0
6 Summary:        User Library of Tizen Display Manager
7 Group:          Development/Libraries
8 License:        MIT
9 Source0:        %{name}-%{version}.tar.gz
10 Source1001:         %{name}.manifest
11 BuildRequires:  pkgconfig(libtbm)
12 BuildRequires:  pkgconfig(libpng)
13 BuildRequires:  pkgconfig(ttrace)
14 BuildRequires:  pkgconfig(wayland-server)
15 BuildRequires:  pkgconfig(pixman-1)
16
17 %if %{with utest}
18 BuildRequires:  gtest-devel
19 %endif
20
21 %description
22 Common user library of Tizen Display Manager : libtdm front-end library
23
24 %package devel
25 Summary:        Devel of Tizen Display Manager Library
26 Group:          Development/Libraries
27 Requires:       libtdm = %{version}
28 Requires:       pkgconfig(libtbm)
29
30 %description devel
31 This supports frontend & backend library header and so
32
33 %package client
34 Summary:        Client library for Tizen Display Manager
35 Group:          Development/Libraries
36 Requires:       libtdm = %{version}
37
38 %description client
39 Tizen Display Manager Client Library
40
41 %package client-devel
42 Summary:        Client library for Tizen Display Manager
43 Group:          Development/Libraries
44 Requires:       libtdm-client = %{version}
45 Requires:       libtdm-devel
46
47 %description client-devel
48 Tizen Display Manager Client Library headers
49
50 %global TZ_SYS_RO_SHARE  %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE}%{!?TZ_SYS_RO_SHARE:/usr/share}
51
52 %package tools
53 Summary:        Tools for libtdm
54 Group:          Development/Utilities
55 Requires:       libtdm = %{version}
56
57 %description tools
58 This contains libtdm tools for fundamental testing
59
60 %prep
61 %setup -q
62 cp %{SOURCE1001} .
63
64 %build
65 UTEST="no"
66
67 %if %{with utest}
68 UTEST="yes"
69 %endif
70
71 %reconfigure --disable-static --with-utest=${UTEST} \
72              CFLAGS="${CFLAGS} -Wall -Werror" \
73              LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
74 make %{?_smp_mflags}
75
76 %if %{with utest}
77 make -C ut check
78 %endif
79
80 %install
81 rm -rf %{buildroot}
82 %make_install
83
84 %__mkdir_p %{buildroot}%{_unitdir_user}
85 install -m 644 service/tdm-socket-user.service %{buildroot}%{_unitdir_user}
86 install -m 644 service/tdm-socket-user.path %{buildroot}%{_unitdir_user}
87
88 %remove_docs
89
90
91 %pre
92 %__mkdir_p %{_unitdir_user}/basic.target.wants
93 ln -sf ../tdm-socket-user.path %{_unitdir_user}/basic.target.wants/
94
95 %post -p /sbin/ldconfig
96 %postun -p /sbin/ldconfig
97 rm -f %{_unitdir_user}/basic.target.wants/tdm-socket-user.path
98
99 %files
100 %manifest %{name}.manifest
101 %defattr(-,root,root,-)
102 %license COPYING
103 %{_libdir}/libtdm.so.*
104 %attr(750,root,root) %{_bindir}/tdm-monitor
105 %{_unitdir_user}/tdm-socket-user.path
106 %{_unitdir_user}/tdm-socket-user.service
107 %if %{with utest}
108 %{_bindir}/ut
109 %endif
110
111 %files devel
112 %manifest %{name}.manifest
113 %defattr(-,root,root,-)
114 %{_includedir}/tdm.h
115 %{_includedir}/tdm_common.h
116 %{_includedir}/tdm_backend.h
117 %{_includedir}/tdm_helper.h
118 %{_includedir}/tdm_list.h
119 %{_includedir}/tdm_log.h
120 %{_includedir}/tdm_types.h
121 %{_libdir}/pkgconfig/libtdm.pc
122 %{_libdir}/libtdm.so
123
124 %files client
125 %manifest %{name}.manifest
126 %defattr(-,root,root,-)
127 %license COPYING
128 %{_libdir}/libtdm-client.so.*
129
130 %files client-devel
131 %manifest %{name}.manifest
132 %defattr(-,root,root,-)
133 %{_includedir}/tdm_client.h
134 %{_includedir}/tdm_client_types.h
135 %{_libdir}/pkgconfig/libtdm-client.pc
136 %{_libdir}/libtdm-client.so
137
138 %files tools
139 %manifest %{name}.manifest
140 %attr(750,root,root) %{_bindir}/tdm-test-server
141 %{_bindir}/tdm-test-client
142
143 %changelog