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