Package version up to 4.0.8
[platform/adaptation/spreadtrum/libtdm-sprd.git] / packaging / libtdm-sprd.spec
1 Name:           libtdm-sprd
2 Version:        4.0.8
3 Release:        0
4 License:        MIT
5 Summary:        Tizen Display Manager Spreadtrum Back-End Library
6 Group:          Development/Libraries
7 ExcludeArch:    %{ix86} x86_64 aarch64
8 Source0:        %{name}-%{version}.tar.gz
9 Source1001:     %{name}.manifest
10 Source1002:         libhal-backend-tdm-sprd.manifest
11
12 BuildRequires: pkgconfig(libdrm)
13 BuildRequires: pkgconfig(libudev)
14 BuildRequires: pkgconfig(dlog)
15 BuildRequires: pkgconfig(libtdm)
16 BuildRequires: pkgconfig(libtbm)
17 BuildRequires: pkgconfig(hal-api-common)
18 BuildRequires: pkgconfig(hal-api-tdm)
19 BuildRequires: pkgconfig(hal-api-tbm)
20 BuildRequires: pkgconfig(pixman-1)
21 BuildRequires: kernel-headers-3.10-sc7730
22 BuildConflicts: linux-glibc-devel
23
24 %description
25 Back-End library of Tizen Display Manager Spreadtrum : libtdm-mgr SPRD library
26
27 %package -n hal-backend-tdm-sprd
28 Summary:        hal-backend-tdm module for sprd
29 Group:          System/Libraries
30 Requires:       hal-api-tdm
31 Requires:       hal-api-common
32
33 %description -n hal-backend-tdm-sprd
34 descriptionion: hal tdm backend module for sprd
35
36 %global TZ_SYS_RO_SHARE  %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE}%{!?TZ_SYS_RO_SHARE:/usr/share}
37
38 %prep
39
40 %setup -q
41 cp %{SOURCE1001} .
42 cp %{SOURCE1002} .
43
44 %build
45 %reconfigure --prefix=%{_prefix} --libdir=%{_libdir}  --disable-static \
46              --with-hal-libdir=%{_hal_libdir} \
47              CFLAGS="${CFLAGS} -Wall -Werror" \
48              LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
49 make %{?_smp_mflags}
50
51 %install
52 rm -rf %{buildroot}
53 %make_install
54
55 # make lincense directory and move COPY to it.
56 mkdir -p %{buildroot}%{_hal_licensedir}/libhal-backend-tdm-sprd
57 cp -af COPYING %{buildroot}%{_hal_licensedir}/libhal-backend-tdm-sprd
58
59 %post
60 if [ -f %{_libdir}/tdm/libtdm-default.so ]; then
61     rm -rf %{_libdir}/tdm/libtdm-default.so
62 fi
63 ln -s libtdm-sprd.so %{_libdir}/tdm/libtdm-default.so
64
65 %postun -p /sbin/ldconfig
66
67 %post -n hal-backend-tdm-sprd
68 if [ -f %{_hal_libdir}/libhal-backend-tdm.so ]; then
69     rm -rf %{_hal_libdir}/libhal-backend-tdm.so
70 fi
71 ln -s libhal-backend-tdm-sprd.so %{_hal_libdir}/libhal-backend-tdm.so
72
73 %postun -n hal-backend-tdm-sprd -p /sbin/ldconfig
74
75 %files
76 %defattr(-,root,root,-)
77 %manifest %{name}.manifest
78 %license COPYING
79 %{_libdir}/tdm/libtdm-sprd.so
80
81 %files -n hal-backend-tdm-sprd
82 %manifest libhal-backend-tdm-sprd.manifest
83 %{_hal_licensedir}/libhal-backend-tdm-sprd/COPYING
84 %{_hal_libdir}/libhal-backend-*.so*