b0e49d25e2c0ab5adb1a7cf835e0d666bf1859ea
[platform/core/uifw/wayland-tbm.git] / packaging / libwayland-tbm.spec
1 %define UTEST_PACKAGE 1
2 %define UTEST_GCOV    0
3
4 Name:           libwayland-tbm
5 Version:        0.3.7
6 Release:        0
7 Summary:        Wayland TBM Protocol
8 License:        MIT
9 Group:          Graphics & UI Framework/Wayland Window System
10 URL:            http://www.tizen.org/
11
12 Source: %name-%version.tar.gz
13 Source1001:     %name.manifest
14 BuildRequires:  autoconf automake
15 BuildRequires:  libtool
16 BuildRequires:  pkgconfig
17 BuildRequires:  pkgconfig(wayland-server)
18 BuildRequires:  pkgconfig(wayland-client)
19 BuildRequires:  pkgconfig(libtbm)
20 BuildRequires:  pkgconfig(dlog)
21 BuildRequires:  gtest-devel
22
23 %description
24 Wayland TBM Protocol for TIZEN
25
26 # libwayland-tbm-server package
27 %package -n libwayland-tbm-server
28 Group:          Graphics & UI Framework/Wayland Window System
29 Summary:        Wayland TBM server library
30
31 %description -n libwayland-tbm-server
32 Wayland tbm is a protocol for graphics memory management for TIZEN
33
34 # libwayland-tbm-client package
35 %package -n libwayland-tbm-client
36 Group:          Graphics & UI Framework/Wayland Window System
37 Summary:        Wayland TBM client library
38
39 %description -n libwayland-tbm-client
40 Wayland tbm is a protocol for graphics memory management for TIZEN
41
42 # libwayland-tbm devel package
43 %package devel
44 Summary:    Development header files
45 Group:          Graphics & UI Framework/Development
46 Requires:       libwayland-tbm-server = %version
47 Requires:       libwayland-tbm-client = %version
48 Requires:   pkgconfig(libtbm)
49
50 %description devel
51 Development header files for use with Wayland protocol
52
53 %if "%{UTEST_PACKAGE}" == "1"
54 %package utests
55 Summary:    Wayland TBM unit test package
56 Group:          Graphics & UI Framework/Wayland Window System
57 %description utests
58 Test module for testing wayland-tbm APIs
59 %endif
60
61 %global TZ_SYS_RO_SHARE  %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE}%{!?TZ_SYS_RO_SHARE:/usr/share}
62
63 %prep
64 %setup -q
65 cp %{SOURCE1001} .
66
67 %build
68 UTEST="no"
69
70 %if "%{UTEST_PACKAGE}" == "1"
71 UTEST="yes"
72 %endif
73
74 %if "%{UTEST_GCOV}" == "1"
75 CFLAGS+=" -fprofile-arcs -ftest-coverage -DTIZEN_TEST_GCOV"
76 CXXFLAGS+=" -fprofile-arcs -ftest-coverage -DTIZEN_TEST_GCOV"
77 LDFLAGS+=" -lgcov"
78 %endif
79
80 %reconfigure --with-utests=${UTEST} \
81              CFLAGS="${CFLAGS} -Wall -Werror" \
82              CXXFLAGS="${CXXFLAGS} -Wall -Werror" \
83              LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
84
85 make %{?_smp_mflags}
86
87 %install
88 rm -rf %{buildroot}
89 %make_install
90
91 %post -n libwayland-tbm-client -p /sbin/ldconfig
92 %postun -n libwayland-tbm-client -p /sbin/ldconfig
93
94 %post -n libwayland-tbm-server -p /sbin/ldconfig
95 %postun -n libwayland-tbm-server -p /sbin/ldconfig
96
97 %files -n libwayland-tbm-server
98 %defattr(-,root,root)
99 %manifest %{name}.manifest
100 %license COPYING
101 %_libdir/libwayland-tbm-server.so.0*
102
103 %files -n libwayland-tbm-client
104 %defattr(-,root,root)
105 %manifest %{name}.manifest
106 %license COPYING
107 %_libdir/libwayland-tbm-client.so.0*
108 %{_bindir}/wayland-tbm-monitor
109
110 %files devel
111 %manifest %{name}.manifest
112 %defattr(-,root,root)
113 %_includedir/wayland-tbm*.h
114 %_libdir/libwayland-tbm*.so
115 %_libdir/pkgconfig/wayland-tbm*.pc
116 %doc README TODO
117
118 %if "%{UTEST_PACKAGE}" == "1"
119 %files utests
120 %defattr(-,root,root,-)
121 %{_bindir}/wayland-tbm-utests
122 %endif
123
124 %changelog