libdrm/libdrm.spec

288 lines
7.6 KiB
RPMSpec

#
# spec file for package libdrm
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: libdrm
Url: http://dri.freedesktop.org/
Version: 2.4.52
Release: 0
Provides: libdrm23 = %{version}
Obsoletes: libdrm23 < %{version}
# bug437293
%ifarch ppc64
Obsoletes: libdrm-64bit < %{version}
Provides: libdrm-64bit = %{version}
%endif
#
Summary: Userspace Interface for Kernel DRM Services
License: MIT
Group: System/Libraries
#Git-Clone: git://anongit.freedesktop.org/git/mesa/drm
#Git-Web: http://cgit.freedesktop.org/mesa/drm/
Source: http://dri.freedesktop.org/libdrm/%{name}-%{version}.tar.bz2
Source2: baselibs.conf
# PATCH-FIX-UPSTREAM libdrm-implicit-defs.diff fdo#48599 -- Fix compiler warnings in tests/radeon/radeon_ttm.c
Patch1: libdrm-implicit-defs.diff
Patch2: u_Fix-compilation-on-systems-that-don-t-provide-O_CLOE.patch
Patch3: U_freedreno_license_fix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: autoconf >= 2.63
BuildRequires: automake >= 1.10
BuildRequires: libtool >= 2.2
BuildRequires: pkgconfig
BuildRequires: pkgconfig(pciaccess) >= 0.10
BuildRequires: pkgconfig(pthread-stubs)
%ifarch %ix86 x86_64 ppc ppc64 s390x armv7l armv7hl
BuildRequires: pkgconfig(valgrind)
%endif
%description
The package contains the userspace interface to the kernel DRM
services.
%package tools
Summary: Diagnostic utilities for DRI and DRM
Group: System/Base
# O/P added in 12.2
Obsoletes: libdrm < %version-%release
Provides: libdrm = %version-%release
%description tools
(Upstream has not provided a description)
%package devel
Summary: Libraries, includes and more to develop libdrm applications
Group: Development/Libraries/X11
Requires: libdrm2 = %version
Requires: libdrm_nouveau2 = %version
Requires: libdrm_radeon1 = %version
%ifarch %arm
Requires: libdrm_freedreno1 = %version
Requires: libdrm_omap1 = %version
%endif
%ifarch %ix86 x86_64
Requires: libdrm_intel1 = %version
%endif
# bug437293
%ifarch ppc64
Obsoletes: libdrm-devel-64bit < %{version}
Provides: libdrm-devel-64bit = %{version}
%endif
%description devel
libdrm is a library for accessing the Direct Rendering Manager on
Linux, BSD and other operating systes that support the ioctl
interface, and for chipsets with DRM memory manager, support for
tracking relocations and buffers. libdrm is a low-level library,
typically used by graphics drivers such as the Mesa DRI and X
drivers.
This package contains the development headers for the library found
in libdrm2.
%package -n libdrm2
Summary: Userspace Interface for Kernel DRM Services
Group: System/Libraries
%description -n libdrm2
libdrm is a library for accessing the Direct Rendering Manager on
Linux, BSD and other operating systes that support the ioctl
interface, and for chipsets with DRM memory manager, support for
tracking relocations and buffers. libdrm is a low-level library,
typically used by graphics drivers such as the Mesa DRI and X
drivers.
%package -n libdrm_intel1
Summary: Userspace interface for Kernel DRM services for Intel chips
Group: System/Libraries
%description -n libdrm_intel1
(Upstream has not provided a description)
%package -n libdrm_nouveau2
Summary: Userspace interface for Kernel DRM services for NVIDIA chips
Group: System/Libraries
%description -n libdrm_nouveau2
(Upstream has not provided a description)
%package -n libdrm_radeon1
Summary: Userspace interface for Kernel DRM services for AMD Radeon chips
Group: System/Libraries
%description -n libdrm_radeon1
(Upstream has not provided a description)
%package -n libkms-devel
Summary: Development files for the KMS MM abstraction library
Group: Development/Libraries/C and C++
Requires: libkms1 = %version
%description -n libkms-devel
This package contains the development headers for the library found
in libkms1.
%package -n libkms1
Summary: Userspace interface to kernel DRM buffer management
Group: System/Libraries
%description -n libkms1
The KMS Memory Management abstraction library.
%ifarch %arm
%package -n libdrm_omap1
Summary: Userspace interface to kernel DRM services for omap chips
Group: System/Libraries
%description -n libdrm_omap1
(Upstream has not provided a description)
%package -n libdrm_freedreno1
Summary: Userspace interface to kernel DRM services for Qualcomm Adreno chips
Group: System/Libraries
%description -n libdrm_freedreno1
(Upstream has not provided a description)
%endif
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
autoreconf -fi
%configure --with-pic \
%ifarch %arm
--enable-omap-experimental-api \
--enable-freedreno-experimental-api \
%endif
--enable-udev
make %{?_smp_mflags}
make %{?_smp_mflags} -C tests dristat drmstat
%check
make %{?_smp_mflags} -C tests check-am
%install
make install DESTDIR=$RPM_BUILD_ROOT
make -C tests/modeprint install DESTDIR=$RPM_BUILD_ROOT
make -C tests/modetest install DESTDIR=$RPM_BUILD_ROOT
rm -f "%buildroot/%_libdir"/*.la
%{__mkdir} -p $RPM_BUILD_ROOT/usr/bin
%{__install} \
tests/.libs/dristat \
tests/.libs/drmstat \
tests/modeprint/.libs/modeprint \
tests/modetest/.libs/modetest $RPM_BUILD_ROOT/usr/bin
%post -n libdrm2 -p /sbin/ldconfig
%postun -n libdrm2 -p /sbin/ldconfig
%post -n libdrm_intel1 -p /sbin/ldconfig
%postun -n libdrm_intel1 -p /sbin/ldconfig
%post -n libdrm_nouveau2 -p /sbin/ldconfig
%postun -n libdrm_nouveau2 -p /sbin/ldconfig
%post -n libdrm_radeon1 -p /sbin/ldconfig
%postun -n libdrm_radeon1 -p /sbin/ldconfig
%post -n libkms1 -p /sbin/ldconfig
%postun -n libkms1 -p /sbin/ldconfig
%ifarch %arm
%post -n libdrm_omap1 -p /sbin/ldconfig
%postun -n libdrm_omap1 -p /sbin/ldconfig
%post -n libdrm_freedreno1 -p /sbin/ldconfig
%postun -n libdrm_freedreno1 -p /sbin/ldconfig
%endif
%files tools
%defattr(-,root,root)
%_bindir/dristat
%_bindir/drmstat
%_bindir/modeprint
%_bindir/modetest
%files devel
%defattr(-,root,root)
%_includedir/libdrm
%ifarch %arm
%_includedir/omap
%_includedir/freedreno
%endif
%_includedir/xf86drm.h
%_includedir/xf86drmMode.h
%_libdir/libdrm*.so
%_libdir/pkgconfig/libdrm*.pc
#%_mandir/man3/drm*
%files -n libdrm2
%defattr(-,root,root)
%_libdir/libdrm.so.2*
%ifarch %ix86 x86_64
%files -n libdrm_intel1
%defattr(-,root,root)
%_libdir/libdrm_intel.so.1*
%endif
%files -n libdrm_nouveau2
%defattr(-,root,root)
%_libdir/libdrm_nouveau.so.2*
%files -n libdrm_radeon1
%defattr(-,root,root)
%_libdir/libdrm_radeon.so.1*
%files -n libkms1
%defattr(-,root,root)
%_libdir/libkms.so.1*
%files -n libkms-devel
%defattr(-,root,root)
%_includedir/libkms
%_libdir/libkms.so
%_libdir/pkgconfig/libkms.pc
%ifarch %arm
%files -n libdrm_omap1
%defattr(-,root,root)
%_libdir/libdrm_omap.so.1*
%files -n libdrm_freedreno1
%defattr(-,root,root)
%_libdir/libdrm_freedreno.so.1*
%endif
%changelog