OSDN Git Service

Add debian packaging.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 25 Aug 2011 09:42:27 +0000 (11:42 +0200)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Thu, 25 Aug 2011 12:28:40 +0000 (14:28 +0200)
Makefile.am
configure.ac
debian.upstream/Makefile.am [new file with mode: 0644]
debian.upstream/changelog.in [new file with mode: 0644]
debian.upstream/compat [new file with mode: 0644]
debian.upstream/control.in [new file with mode: 0644]
debian.upstream/copyright [new file with mode: 0644]
debian.upstream/libva-driver-intel.install [new file with mode: 0644]
debian.upstream/rules [new file with mode: 0755]

index 099031a..552f9b8 100644 (file)
@@ -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
index fbff021..907b137 100644 (file)
@@ -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 (file)
index 0000000..4363ac7
--- /dev/null
@@ -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 (file)
index 0000000..70310b5
--- /dev/null
@@ -0,0 +1,5 @@
+libva-driver-intel (@PACKAGE_VERSION@-1) unstable; urgency=low
+
+  * Autogenerated package, see NEWS file for ChangeLog.
+
+ -- Gwenole Beauchesne <gwenole.beauchesne@intel.com>  @DATE@
diff --git a/debian.upstream/compat b/debian.upstream/compat
new file mode 100644 (file)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/debian.upstream/control.in b/debian.upstream/control.in
new file mode 100644 (file)
index 0000000..88ee928
--- /dev/null
@@ -0,0 +1,28 @@
+Source: libva-driver-intel
+Section: libs
+Priority: optional
+Maintainer: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
+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 (file)
index 0000000..8f3c4c3
--- /dev/null
@@ -0,0 +1,25 @@
+This package is maintained by:
+Gwenole Beauchesne <gwenole.beauchesne@intel.com>
+
+
+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 (file)
index 0000000..daa01dc
--- /dev/null
@@ -0,0 +1 @@
+debian/tmp/usr/lib/dri/*.so
diff --git a/debian.upstream/rules b/debian.upstream/rules
new file mode 100755 (executable)
index 0000000..27b2639
--- /dev/null
@@ -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)