Do not use tizen-target-name
[platform/adaptation/spreadtrum/libtbm-sprd.git] / packaging / libtbm-sprd.spec
1 Name:           libtbm-sprd
2 Version:        1.0.8
3 Release:        0
4 License:        MIT
5 Summary:        Tizen Buffer Manager - sprd backend
6 Group:          System/Libraries
7 ExcludeArch:    i586 x86_64 aarch64
8 Source0:        %{name}-%{version}.tar.gz
9
10 BuildRequires:  pkgconfig(libdrm)
11 BuildRequires:  pkgconfig(libtbm)
12 BuildRequires:  pkgconfig(dlog)
13 BuildRequires:  pkgconfig(libudev)
14 BuildRequires:  kernel-headers-3.10-sc7730
15 BuildConflicts:  linux-glibc-devel
16
17 %description
18 descriptionion:Tizen Buffer manager backend module for spreadtrum
19
20 %global TZ_SYS_RO_SHARE  %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE}%{!?TZ_SYS_RO_SHARE:/usr/share}
21
22 %prep
23 %setup -q
24
25 %build
26
27 %reconfigure --prefix=%{_prefix} --libdir=%{_libdir}/bufmgr \
28             CFLAGS="${CFLAGS} -Wall -Werror `pkg-config --cflags dlog`" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
29
30 make %{?_smp_mflags}
31
32 %install
33 rm -rf %{buildroot}
34 mkdir -p %{buildroot}/%{TZ_SYS_RO_SHARE}/license
35 cp -af COPYING %{buildroot}/%{TZ_SYS_RO_SHARE}/license/%{name}
36 mkdir -p %{buildroot}%{_libdir}/udev/rules.d/
37 cp -af rules/99-libtbm_sprd.rules %{buildroot}%{_libdir}/udev/rules.d/
38 %make_install
39
40
41 %post
42 if [ -f %{_libdir}/bufmgr/libtbm_default.so ]; then
43     rm -rf %{_libdir}/bufmgr/libtbm_default.so
44 fi
45 ln -s libtbm_sprd.so %{_libdir}/bufmgr/libtbm_default.so
46
47 %postun -p /sbin/ldconfig
48
49 %files
50 %defattr(-,root,root,-)
51 %{TZ_SYS_RO_SHARE}/license/%{name}
52 %{_libdir}/bufmgr/libtbm_*.so*
53 %{_libdir}/udev/rules.d/99-libtbm_sprd.rules
54