summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyril Brulebois <kibi@debian.org>2011-04-19 02:05:05 +0200
committerCyril Brulebois <kibi@debian.org>2011-04-19 02:29:16 +0200
commita8d97776ce2fd5ce212a9377077201fc1c97d7b3 (patch)
tree4dac33668b837813b0a2f5c8133e0a94c393cd72
parentf37180918764c3a6963bdff2e5351255fff394fc (diff)
Switch to dh.
-rw-r--r--debian/changelog5
-rw-r--r--debian/compat2
-rw-r--r--debian/control8
-rwxr-xr-xdebian/rules126
4 files changed, 34 insertions, 107 deletions
diff --git a/debian/changelog b/debian/changelog
index 1734a3b8..e2f8ad82 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,11 @@ libdrm (2.4.25-1) UNRELEASED; urgency=low
* New upstream release.
* Update libdrm2.symbols and shlibs.
* Update libkms1.symbols, marking dumb_create@Base as private.
+ * Switch to dh:
+ - Bump compat/build-dep to 8.
+ - Use dh-autoreconf.
+ - Tidy old build-deps.
+ - Testsuite now automatically gets run.
-- Cyril Brulebois <kibi@debian.org> Mon, 18 Apr 2011 22:23:18 +0200
diff --git a/debian/compat b/debian/compat
index 1e8b3149..45a4fb75 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-6
+8
diff --git a/debian/control b/debian/control
index 2ac055da..f67532c0 100644
--- a/debian/control
+++ b/debian/control
@@ -3,12 +3,10 @@ Priority: optional
Maintainer: Debian X Strike Force <debian-x@lists.debian.org>
Uploaders: Cyril Brulebois <kibi@debian.org>
Build-Depends:
- debhelper (>= 7.2.7),
+ debhelper (>= 8),
+ dh-autoreconf,
+ quilt,
libx11-dev,
- dpkg-dev (>= 1.13.19),
- quilt (>= 0.40),
- automake,
- libtool,
pkg-config,
libpthread-stubs0-dev,
Standards-Version: 3.8.4
diff --git a/debian/rules b/debian/rules
index 3a0391fc..f5399dc5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,27 +1,14 @@
#!/usr/bin/make -f
-# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+###
+### Configuration, decide what to build
+###
-include debian/xsfbs/xsfbs.mk
+# Some variables:
+DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
-DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
-
-ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
- confflags += --build=$(DEB_HOST_GNU_TYPE)
-else
- confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
-endif
+# Linux vs. the rest:
ifeq (linux, $(DEB_HOST_ARCH_OS))
confflags += --enable-udev
confflags += --enable-libkms
@@ -34,98 +21,41 @@ ifeq (linux, $(DEB_HOST_ARCH_OS))
else
confflags += --disable-udev
confflags += --disable-libkms
- LIBKMS=no
+ LIBKMS = no
+ confflags += --disable-vmwgfx-experimental-api
confflags += --disable-nouveau-experimental-api
NOUVEAU = no
confflags += --disable-radeon
RADEON = no
endif
-# only build libdrm-intel on x86
+# Intel is only on x86:
ifneq (,$(filter amd64 i386,$(DEB_HOST_ARCH_CPU)))
ifneq (,$(filter linux kfreebsd,$(DEB_HOST_ARCH_OS)))
INTEL = yes
endif
endif
-
ifeq ($(INTEL), yes)
confflags += --enable-intel
else
confflags += --disable-intel
endif
-CFLAGS = -Wall -g
-
-ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
-else
- CFLAGS += -O2
-endif
-ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
- NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
- MAKEFLAGS += -j$(NUMJOBS)
-endif
+###
+### Actual build
+###
-configure: $(STAMP_DIR)/patch
- dh_testdir
- autoreconf -vfi
+override_dh_auto_configure:
+ dh_auto_configure -- --enable-static=yes $(confflags)
-build/config.status: configure
- dh_testdir
- test -d build || mkdir build
- cd build && \
- ../configure \
- --prefix=/usr \
- --mandir=\$${prefix}/share/man \
- --infodir=\$${prefix}/share/info \
- --enable-static=yes \
- $(confflags) \
- CFLAGS="$(CFLAGS)"
+override_dh_auto_install:
+ dh_auto_install --destdir=debian/tmp
-build: build-stamp
-build-stamp: build/config.status
- dh_testdir
- cd build && $(MAKE)
- >$@
+override_dh_install:
+ find debian/tmp -name '*.la' -delete
+ dh_install --fail-missing
-clean: xsfclean
- dh_testdir
- dh_testroot
- rm -f build-stamp
-
- rm -f config.cache config.log config.status
- rm -f */config.cache */config.log */config.status
- rm -f conftest* */conftest*
- rm -rf autom4te.cache */autom4te.cache
- rm -rf build
- rm -f $$(find -name Makefile.in)
- rm -f compile config.guess config.sub configure depcomp install-sh
- rm -f ltmain.sh missing INSTALL aclocal.m4 config.h.in mkinstalldirs
- rm -f libdrm.pc libdrm/config.h.in
-
- dh_clean
-
-install: build
- dh_testdir
- dh_testroot
- dh_prep
- dh_installdirs
-
- cd build && $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
- dh_testdir -s
- dh_testroot -s
- dh_installchangelogs -s ChangeLog
- dh_installdocs -s
- dh_installexamples -s
- dh_install -s --sourcedir=debian/tmp -X.la --fail-missing
- dh_link -s
+override_dh_strip:
dh_strip -plibdrm2 --dbg-package=libdrm2-dbg
ifeq ($(INTEL), yes)
dh_strip -plibdrm-intel1 --dbg-package=libdrm-intel1-dbg
@@ -140,8 +70,8 @@ ifeq ($(LIBKMS), yes)
dh_strip -p libkms1 --dbg-package=libkms1-dbg
endif
dh_strip -s --remaining-packages
- dh_compress -s
- dh_fixperms -s
+
+override_dh_makeshlibs:
dh_makeshlibs -plibdrm2 -V'libdrm2 (>= 2.4.25)' -- -c4
ifeq ($(INTEL), yes)
dh_makeshlibs -plibdrm-intel1 -V'libdrm-intel1 (>= 2.4.23-3~)' -- -c4
@@ -155,12 +85,6 @@ endif
ifeq ($(LIBKMS), yes)
dh_makeshlibs -plibkms1 -V'libkms1' -- -c4
endif
- dh_installdeb -s
- dh_shlibdeps -s
- dh_lintian -s
- dh_gencontrol -s
- dh_md5sums -s
- dh_builddeb -s
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
+%:
+ dh $@ --with quilt,autoreconf --builddirectory=build/