summaryrefslogtreecommitdiff
path: root/packaging/libtdm-sprd.spec
blob: fe3e3c9d6ffb312cb0ea0fe9fc4b366e0ead1396 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
Name:           libtdm-sprd
Version:        4.0.8
Release:        0
License:        MIT
Summary:        Tizen Display Manager Spreadtrum Back-End Library
Group:          Development/Libraries
ExcludeArch:    %{ix86} x86_64 aarch64
Source0:        %{name}-%{version}.tar.gz
Source1001:     %{name}.manifest
Source1002:	    libhal-backend-tdm-sprd.manifest

BuildRequires: pkgconfig(libdrm)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(libtdm)
BuildRequires: pkgconfig(libtbm)
BuildRequires: pkgconfig(hal-api-common)
BuildRequires: pkgconfig(hal-api-tdm)
BuildRequires: pkgconfig(hal-api-tbm)
BuildRequires: pkgconfig(pixman-1)
BuildRequires: kernel-headers-3.10-sc7730
BuildConflicts: linux-glibc-devel

%description
Back-End library of Tizen Display Manager Spreadtrum : libtdm-mgr SPRD library

%package -n hal-backend-tdm-sprd
Summary:	hal-backend-tdm module for sprd
Group:		System/Libraries
Requires:	hal-api-tdm
Requires:	hal-api-common

%description -n hal-backend-tdm-sprd
descriptionion: hal tdm backend module for sprd

%global TZ_SYS_RO_SHARE  %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE}%{!?TZ_SYS_RO_SHARE:/usr/share}

%prep

%setup -q
cp %{SOURCE1001} .
cp %{SOURCE1002} .

%build
%reconfigure --prefix=%{_prefix} --libdir=%{_libdir}  --disable-static \
             --with-hal-libdir=%{_hal_libdir} \
             CFLAGS="${CFLAGS} -Wall -Werror" \
             LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
make %{?_smp_mflags}

%install
rm -rf %{buildroot}
%make_install

# make lincense directory and move COPY to it.
mkdir -p %{buildroot}%{_hal_licensedir}/libhal-backend-tdm-sprd
cp -af COPYING %{buildroot}%{_hal_licensedir}/libhal-backend-tdm-sprd

%post
if [ -f %{_libdir}/tdm/libtdm-default.so ]; then
    rm -rf %{_libdir}/tdm/libtdm-default.so
fi
ln -s libtdm-sprd.so %{_libdir}/tdm/libtdm-default.so

%postun -p /sbin/ldconfig

%post -n hal-backend-tdm-sprd
if [ -f %{_hal_libdir}/libhal-backend-tdm.so ]; then
    rm -rf %{_hal_libdir}/libhal-backend-tdm.so
fi
ln -s libhal-backend-tdm-sprd.so %{_hal_libdir}/libhal-backend-tdm.so

%postun -n hal-backend-tdm-sprd -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%manifest %{name}.manifest
%license COPYING
%{_libdir}/tdm/libtdm-sprd.so

%files -n hal-backend-tdm-sprd
%manifest libhal-backend-tdm-sprd.manifest
%{_hal_licensedir}/libhal-backend-tdm-sprd/COPYING
%{_hal_libdir}/libhal-backend-*.so*