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