debian: generate packing files from configure.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Wed, 3 Oct 2012 09:21:45 +0000 (11:21 +0200)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Wed, 3 Oct 2012 09:21:45 +0000 (11:21 +0200)
Use configure script substitution capabilities to handle Debian packaging
files, hence removing custom replacement functions at make dist time. This
also makes it possible to automatically generate the correct library major
version in package names.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
configure.ac
debian.upstream/Makefile.am
debian.upstream/changelog.in
debian.upstream/control.in
debian.upstream/libva-dev.dirs [deleted file]
debian.upstream/libva.install.in [moved from debian.upstream/libva1.install with 100% similarity]
debian.upstream/libva1.dirs [deleted file]

index 3edb109..287fd6e 100644 (file)
@@ -86,6 +86,9 @@ AM_INIT_AUTOMAKE([dist-bzip2])
 AM_CONFIG_HEADER([config.h])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
+TODAY="`LC_ALL=C date +'%a, %d %b %Y %X %z'`"
+AC_SUBST(TODAY)
+
 VA_API_MAJOR_VERSION=va_api_major_version
 VA_API_MINOR_VERSION=va_api_minor_version
 VA_API_MICRO_VERSION=va_api_micro_version
@@ -281,6 +284,10 @@ fi
 AC_OUTPUT([
     Makefile
     debian.upstream/Makefile
+    debian.upstream/changelog
+    debian.upstream/control
+    debian.upstream/libva$LIBVA_MAJOR_VERSION.install:\
+debian.upstream/libva.install.in
     doc/Makefile
     dummy_drv_video/Makefile
     pkgconfig/Makefile
index 87a571a..46accc4 100644 (file)
@@ -1,20 +1,19 @@
 DEBIANFILES = \
-       README.Debian                           \
-       changelog.in                            \
-       compat                                  \
-       control.in                              \
-       copyright                               \
-       libva-dev.dirs                          \
-       libva-dev.install                       \
-       libva1.dirs                             \
-       libva1.install                          \
-       rules                                   \
-       vainfo.install                          \
+       README.Debian                                   \
+       changelog.in                                    \
+       compat                                          \
+       control.in                                      \
+       copyright                                       \
+       libva-dev.install                               \
+       libva.install.in                                \
+       rules                                           \
+       vainfo.install                                  \
        $(NULL)
 
-DEBIANGENFILES =                               \
-       changelog                               \
-       control                                 \
+DEBIANGENFILES = \
+       changelog                                       \
+       control                                         \
+       libva$(LIBVA_MAJOR_VERSION).install             \
        $(NULL)
 
 EXTRA_DIST = $(DEBIANFILES)
@@ -23,11 +22,3 @@ 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)|' \
-         $< > $@
index 397b5eb..f5482c4 100644 (file)
@@ -2,4 +2,4 @@ libva (@PACKAGE_VERSION@-1) unstable; urgency=low
 
   * Autogenerated package, see NEWS file for ChangeLog.
 
- -- Gwenole Beauchesne <gwenole.beauchesne@intel.com>  @DATE@
+ -- Gwenole Beauchesne <gwenole.beauchesne@intel.com>  @TODAY@
index c6bb652..54555a0 100644 (file)
@@ -18,7 +18,7 @@ Section: libs
 Package: libva-dev
 Section: libdevel
 Architecture: any
-Depends: libva1 (= ${binary:Version}),
+Depends: libva@LIBVA_MAJOR_VERSION@ (= ${binary:Version}),
          libdrm-dev (>= @LIBDRM_VERSION@),
          libgl-dev,
          pkg-config
@@ -28,7 +28,7 @@ Description: Video Acceleration (VA) API for Linux -- development files
  .
  This package provides the development environment for libva.
 
-Package: libva1
+Package: libva@LIBVA_MAJOR_VERSION@
 Section: libs
 Architecture: any
 Depends: ${shlibs:Depends}
@@ -36,10 +36,10 @@ Description: Video Acceleration (VA) API for Linux -- runtime
  The libva library implements the Video Acceleration (VA) API for Linux.
  The library loads a hardware dependendent driver.
 
-Package: libva1-dbg
+Package: libva@LIBVA_MAJOR_VERSION@-dbg
 Section: libdevel
 Architecture: any
-Depends: libva1 (= ${Source-Version})
+Depends: libva@LIBVA_MAJOR_VERSION@ (= ${Source-Version})
 Description: Video Acceleration (VA) API for Linux -- runtime
  The libva library implements the Video Acceleration (VA) API for Linux.
  The library loads a hardware dependendent driver.
@@ -48,7 +48,7 @@ Description: Video Acceleration (VA) API for Linux -- runtime
 
 Package: vainfo
 Architecture: any
-Depends: libva1 (= ${Source-Version})
+Depends: libva@LIBVA_MAJOR_VERSION@ (= ${Source-Version})
 Description: Video Acceleration (VA) API for Linux -- info program
  The libva library implements the Video Acceleration (VA) API for Linux.
  The library loads a hardware dependendent driver.
diff --git a/debian.upstream/libva-dev.dirs b/debian.upstream/libva-dev.dirs
deleted file mode 100644 (file)
index 4418816..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-usr/lib
-usr/include
diff --git a/debian.upstream/libva1.dirs b/debian.upstream/libva1.dirs
deleted file mode 100644 (file)
index 6845771..0000000
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib