From 8d884f8a7a7dd1983cb595880f68899cbb3425a4 Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Thu, 25 Aug 2011 11:42:27 +0200 Subject: [PATCH] Add debian packaging. --- Makefile.am | 16 +++++++++++++++- configure.ac | 14 +++++++++++++- debian.upstream/Makefile.am | 28 ++++++++++++++++++++++++++++ debian.upstream/changelog.in | 5 +++++ debian.upstream/compat | 1 + debian.upstream/control.in | 28 ++++++++++++++++++++++++++++ debian.upstream/copyright | 25 +++++++++++++++++++++++++ debian.upstream/libva-driver-intel.install | 1 + debian.upstream/rules | 15 +++++++++++++++ 9 files changed, 131 insertions(+), 2 deletions(-) create mode 100644 debian.upstream/Makefile.am create mode 100644 debian.upstream/changelog.in create mode 100644 debian.upstream/compat create mode 100644 debian.upstream/control.in create mode 100644 debian.upstream/copyright create mode 100644 debian.upstream/libva-driver-intel.install create mode 100755 debian.upstream/rules diff --git a/Makefile.am b/Makefile.am index 099031a..552f9b8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,9 +1,23 @@ AUTOMAKE_OPTIONS = foreign -SUBDIRS = src +SUBDIRS = debian.upstream src # Extra clean files so that maintainer-clean removes *everything* MAINTAINERCLEANFILES = \ aclocal.m4 compile config.guess config.sub \ configure depcomp install-sh ltmain.sh \ Makefile.in missing + +DEB_BUILDDIR = debian.build + +deb: + @[ -d debian ] || ln -s debian.upstream debian + dpkg-buildpackage -rfakeroot -uc -us + +deb.upstream: dist + -mkdir -p $(DEB_BUILDDIR) + cd $(DEB_BUILDDIR) && \ + rm -rf $(PACKAGE)-$(VERSION) && \ + tar zxvf ../$(PACKAGE)-$(VERSION).tar.gz && \ + cd $(PACKAGE)-$(VERSION) && \ + $(MAKE) deb -f Makefile.am diff --git a/configure.ac b/configure.ac index fbff021..907b137 100644 --- a/configure.ac +++ b/configure.ac @@ -9,6 +9,12 @@ m4_if(intel_driver_pre_version, [0], [], [ m4_append([intel_driver_version], intel_driver_pre_version, [.pre]) ]) +# libva minimum version requirement +m4_define([libva_package_version], [1.0.14]) + +# libdrm minimum version requirement +m4_define([libdrm_version], [2.4.23]) + AC_PREREQ([2.57]) AC_INIT([intel_driver], [intel_driver_version], [haihao.xiang@intel.com], [libva-driver-intel]) @@ -43,8 +49,13 @@ AC_C_BIGENDIAN AC_HEADER_STDC AC_SYS_LARGEFILE +LIBVA_PACKAGE_VERSION=libva_package_version +AC_SUBST(LIBVA_PACKAGE_VERSION) + dnl Check for recent enough DRM -PKG_CHECK_MODULES([DRM], [libdrm >= 2.4.23]) +LIBDRM_VERSION=libdrm_version +PKG_CHECK_MODULES([DRM], [libdrm >= $LIBDRM_VERSION]) +AC_SUBST(LIBDRM_VERSION) dnl Check for gen4asm PKG_CHECK_MODULES(GEN4ASM, [intel-gen4asm >= 1.2], [gen4asm=yes], [gen4asm=no]) @@ -79,6 +90,7 @@ AC_SUBST(LIBVA_DRIVERS_PATH) AC_OUTPUT([ Makefile + debian.upstream/Makefile src/Makefile src/shaders/Makefile src/shaders/h264/Makefile diff --git a/debian.upstream/Makefile.am b/debian.upstream/Makefile.am new file mode 100644 index 0000000..4363ac7 --- /dev/null +++ b/debian.upstream/Makefile.am @@ -0,0 +1,28 @@ +DEBIANFILES = \ + changelog.in \ + compat \ + control.in \ + copyright \ + libva-driver-intel.install \ + rules \ + $(NULL) + +DEBIANGENFILES = \ + changelog \ + control \ + $(NULL) + +EXTRA_DIST = $(DEBIANFILES) + +dist_noinst_DATA = $(DEBIANGENFILES) + +# Extra clean files so that maintainer-clean removes *everything* +MAINTAINERCLEANFILES = Makefile.in $(DEBIANGENFILES) + +$(DEBIANGENFILES): %: %.in Makefile + -sed \ + -e 's|\@DATE\@|'"`LC_ALL=C date +'%a, %d %b %Y %X %z'`"'|' \ + -e 's|\@LIBDRM_VERSION\@|$(LIBDRM_VERSION)|' \ + -e 's|\@LIBVA_PACKAGE_VERSION\@|$(LIBVA_PACKAGE_VERSION)|' \ + -e 's|\@PACKAGE_VERSION\@|$(PACKAGE_VERSION)|' \ + $< > $@ diff --git a/debian.upstream/changelog.in b/debian.upstream/changelog.in new file mode 100644 index 0000000..70310b5 --- /dev/null +++ b/debian.upstream/changelog.in @@ -0,0 +1,5 @@ +libva-driver-intel (@PACKAGE_VERSION@-1) unstable; urgency=low + + * Autogenerated package, see NEWS file for ChangeLog. + + -- Gwenole Beauchesne @DATE@ diff --git a/debian.upstream/compat b/debian.upstream/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/debian.upstream/compat @@ -0,0 +1 @@ +5 diff --git a/debian.upstream/control.in b/debian.upstream/control.in new file mode 100644 index 0000000..88ee928 --- /dev/null +++ b/debian.upstream/control.in @@ -0,0 +1,28 @@ +Source: libva-driver-intel +Section: libs +Priority: optional +Maintainer: Gwenole Beauchesne +Build-Depends: debhelper (>= 5), + cdbs, + libdrm-dev (>= @LIBDRM_VERSION@), + libva-dev (>= @LIBVA_PACKAGE_VERSION@) +Standards-Version: 3.7.2 + +Package: libva-driver-intel +Section: libs +Architecture: any +Depends: libva1 (>= @LIBVA_PACKAGE_VERSION@), + ${shlibs:Depends}, ${misc:Depends} +Description: VA driver for Intel G45 & HD Graphics family + Video decode & encode driver for Intel G45 chipsets and Intel HD + Graphics for Intel Core processor family. + +Package: libva-driver-intel-dbg +Section: libdevel +Architecture: any +Depends: libva-driver-intel (= ${Source-Version}) +Description: VA driver for Intel G45 & HD Graphics family (debug symbols) + Video decode & encode driver for Intel G45 chipsets and Intel HD + Graphics for Intel Core processor family. + . + This package contains the debug files. diff --git a/debian.upstream/copyright b/debian.upstream/copyright new file mode 100644 index 0000000..8f3c4c3 --- /dev/null +++ b/debian.upstream/copyright @@ -0,0 +1,25 @@ +This package is maintained by: +Gwenole Beauchesne + + +License: + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sub license, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice (including the + next paragraph) shall be included in all copies or substantial portions + of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR + ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/debian.upstream/libva-driver-intel.install b/debian.upstream/libva-driver-intel.install new file mode 100644 index 0000000..daa01dc --- /dev/null +++ b/debian.upstream/libva-driver-intel.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/dri/*.so diff --git a/debian.upstream/rules b/debian.upstream/rules new file mode 100755 index 0000000..27b2639 --- /dev/null +++ b/debian.upstream/rules @@ -0,0 +1,15 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/autotools.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk +include /usr/share/cdbs/1/rules/utils.mk + +# Allow SMP build +ifeq ($(DEBIAN_BUILD_NCPUS),) + DEBIAN_BUILD_NCPUS = $(shell /usr/bin/getconf _NPROCESSORS_ONLN) +endif +ifneq ($(DEBIAN_BUILD_NCPUS),) + EXTRA_MAKE_FLAGS += -j$(DEBIAN_BUILD_NCPUS) +endif +MAKE += $(EXTRA_MAKE_FLAGS) -- 2.7.4