use %license macro to copy the COPYING file.
[platform/core/uifw/e-mod-tizen-eom.git] / packaging / e-mod-tizen-eom.spec
1 %bcond_with x
2 %bcond_with wayland
3
4 Name: e-mod-tizen-eom
5 Version: 0.1.3
6 Release: 1
7 Summary: The Enlightenment eom Module for Tizen
8 URL: http://www.enlightenment.org
9 Group: Graphics & UI Framework/Other
10 Source0: %{name}-%{version}.tar.gz
11 License: BSD-2-Clause
12 BuildRequires: pkgconfig(enlightenment)
13 BuildRequires: pkgconfig(eom-server)
14 BuildRequires:  gettext
15 %if %{with x}
16 BuildRequires:  pkgconfig(x11)
17 %endif
18 %if %{with wayland}
19 BuildRequires:  pkgconfig(wayland-server)
20 BuildRequires:  pkgconfig(libtbm)
21 BuildRequires:  pkgconfig(wayland-tbm-server)
22 %endif
23 BuildRequires:  pkgconfig(dlog)
24
25 %description
26 This package is a the Enlightenment eom Module for Tizen.
27
28 %global TZ_SYS_RO_SHARE  %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE}%{!?TZ_SYS_RO_SHARE:/usr/share}
29
30 %prep
31 %setup -q
32
33 %build
34
35 export GC_SECTIONS_FLAGS="-fdata-sections -ffunction-sections -Wl,--gc-sections"
36 export CFLAGS+=" -Wall -Werror -g -fPIC -rdynamic ${GC_SECTIONS_FLAGS}"
37 export LDFLAGS+=" -Wl,--hash-style=both -Wl,--as-needed -Wl,--rpath=/usr/lib"
38
39 %autogen
40 %if %{with wayland}
41 %configure --prefix=/usr --enable-wayland-only
42 %else
43 %configure --prefix=/usr
44 %endif
45
46 make
47
48 %install
49 rm -rf %{buildroot}
50
51 # install
52 make install DESTDIR=%{buildroot}
53
54 # clear useless textual files
55 find  %{buildroot}%{_libdir}/enlightenment/modules/%{name} -name *.la | xargs rm
56 find  %{buildroot}%{_libdir}/enlightenment/modules/%{name} -name *.a | xargs rm
57
58 %files
59 %defattr(-,root,root,-)
60 %{_libdir}/enlightenment/modules/e-mod-tizen-eom
61 %license COPYING