summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc Verhaegen <libv@skynet.be>2007-01-08 01:09:57 +0100
committerLuc Verhaegen <libv@skynet.be>2007-01-08 01:09:57 +0100
commit9bf02ccfaaf539684da17c32bb2c20c0fdc2a457 (patch)
treec1da50fbc5619673d3bd4209688804696dea2458
parent5ba8910e38581d01638bd118b63acb3d29944b0b (diff)
Add first attempt at debian packaging.
* Properly handled package interdependencies. * Proper copyright file. * Package version depends on GIT SHAID. * xserver-xorg-code version is generated at build time.
-rw-r--r--.gitignore5
-rw-r--r--debian/changelog10
-rw-r--r--debian/compat1
-rw-r--r--debian/control30
-rw-r--r--debian/copyright23
-rwxr-xr-xdebian/rules109
-rwxr-xr-xgit_version.sh6
7 files changed, 182 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index e6ff43f..d14d3a3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,3 +20,8 @@ stamp-h1
git_version.h
*~
*.bak
+build-stamp
+debian/files
+debian/substvars
+debian/xf86-video-unichrome.substvars
+debian/xf86-video-unichrome
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..eedbaa3
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,10 @@
+xf86-video-unichrome (1:0.2.0) any; urgency=low
+
+ * Properly package the unichrome driver. Note that, while i chose to
+ break debians idea of what driver should be called, i am handling
+ driver dependencies correctly.
+ * Add a correct copyright file, not some nasty mash-up.
+ * Introduce build-dynamic version for xserver-xorg-code.
+ * Add code to have the package version depend on the git SHAID
+
+ -- Luc Verhaegen <libv@skynet.be> Mon, 08 Jan 2007 01:05:19 +0100
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..b8626c4
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+4
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..5784c58
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,30 @@
+Source: xf86-video-unichrome
+Section: x11
+Priority: optional
+Maintainer: Luc Verhaegen <libv@skynet.be>
+Build-Depends: debhelper (>= 4.0.0), pkg-config, xserver-xorg-dev, xorg-build-macros, x11proto-core-dev, x11proto-fonts-dev, x11proto-randr-dev, x11proto-render-dev, x11proto-xext-dev, x11proto-xf86dri-dev, x11proto-video-dev, x11proto-gl-dev, libdrm-dev, libx11-dev, libgl1-mesa-dev | libgl1-dev
+Standards-Version: 3.6.1.0
+
+Package: xf86-video-unichrome
+Architecture: any
+Depends: xserver-xorg-core (= ${Xorg:Version}), ${shlibs:Depends}
+Provides: xserver-xorg-video, xserver-xorg-driver-via
+Conflicts: xserver-xorg-driver-via
+Replaces: xserver-xorg (<< 6.8.2-35), xserver-xorg-driver-via
+Description: VIA Unichrome display driver for X.
+ This driver provides support for the Unichrome and Chrome graphics on VIA
+ northbridges.
+ .
+ This is the driver from http://unichrome.sourceforge.net/, the main author
+ is Luc Verhaegen.
+ .
+ Theoretically, this driver should support all Unichrome and Chrome 9 IGPs.
+ But sadly, due to a lack of resources, this support is currently limited to
+ VT3122 (on VIA CLE266), VT7205 (on KM400, KN400 and P4M800) and VT3108 (on
+ K8M800 and K8N800).
+ .
+ This driver lacks some showy features (namely EXA and XvMC), but more
+ than makes up for that in that it is quite robust, well structured, and
+ that it's becoming rather advanced with respect to modesetting, the most
+ significant part of any graphics driver, and the hardest to get right.
+ .
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..f400766
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,23 @@
+Copyright (c) 2004-2007 Luc Verhaegen. All Rights Reserved.
+Copyright (c) 2004-2005 The Unichrome Project. All Rights Reserved.
+Copyright (c) 1998-2003 VIA Technologies, Inc. All Rights Reserved.
+Copyright (c) 2001-2003 S3 Graphics, Inc. All Rights Reserved.
+
+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
+THE AUTHORS OR COPYRIGHT HOLDERS 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/rules b/debian/rules
new file mode 100755
index 0000000..bb375f7
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,109 @@
+#!/usr/bin/make -f
+#
+# debian/rules for the xf86-video-unichrome package.
+#
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>
+# Copyright © 2005 Daniel Stone <daniel@fooishbar.org>
+# Copyright © 2005 David Nusinow <dnusinow@debian.org>
+# Copyright © 2007 Luc Verhaegen <libv@skynet.be>
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+# get a git SHAID for package versioning.
+# this needs to be dynamic, as i don't want to touch this file every 5 minutes.
+UNICHROMEVERSION = 0.2.0
+git_tools := $(shell which git-whatchanged)
+ifdef git_tools
+ not_git_dir := $(shell test -e ../.git/index)
+ ifndef not_git_dir
+ SHAID = $(shell git-whatchanged | head -n1 | sed s/^commit\ // | sed s/[a-f0-9]/\ /9 | awk '{print $$1}')
+ UNICHROMEVERSION = 0.2.0-git-${SHAID}
+ endif
+endif
+
+# We want this to build against many xserver-xorg-core packages,
+# but we do need decent binary dependency tracking.
+XORGVERSION ?= $(shell dpkg-query -l xserver-xorg-core | awk '/xserver-xorg-core/ {print $$3}' | sed s/-.*//)
+
+CFLAGS = -Wall -g
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+ INSTALL_PROGRAM += -s
+endif
+
+DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+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
+
+# kbd_drv.a isn't phenomenally useful; kbd_drv.so more so
+confflags += --disable-static
+
+build: build-stamp
+build-stamp:
+ dh_testdir
+
+ ./autogen.sh --prefix=/usr --mandir=\$${prefix}/share/man \
+ --infodir=\$${prefix}/share/info $(confflags) \
+ CFLAGS="$(CFLAGS)"
+ ./git_version.sh > git_version.h
+ $(MAKE)
+
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp
+
+ rm -f git_version.h
+ 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 obj-*
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ $(MAKE) DESTDIR=$(CURDIR)/debian/xf86-video-unichrome install
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+
+ dh_installdocs
+ dh_installchangelogs
+ dh_install
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+ dh_makeshlibs
+ dh_shlibdeps
+ dh_installdeb
+ dh_gencontrol -- -v$(UNICHROMEVERSION) -VXorg:Version=$(XORGVERSION)
+ dh_md5sums
+ dh_builddeb
+
+# Build architecture-independent files here.
+binary-indep: build install
+# Nothing to do
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
diff --git a/git_version.sh b/git_version.sh
index ea597e6..67b42ef 100755
--- a/git_version.sh
+++ b/git_version.sh
@@ -2,6 +2,8 @@
#
# Generate some basic versioning information which can be piped to a header.
#
+# Copyright (c) 2006-2007 Luc Verhaegen <libv@skynet.be>
+
echo "/*"
echo " * Basic versioning gathered from the git repository."
echo " */"
@@ -19,9 +21,9 @@ if test "$git_tools" != ""; then
echo ""
# SHA-ID
- git_shaid=`git-whatchanged | head -n1 | sed s/^diff-tree\ // | sed s/\ \(from\ \[0-9a-f\]*\.\.\.\)$//`
+ git_shaid=`git-whatchanged | head -n1 | sed s/^commit\ //`
echo "/* Git SHA ID of last commit */"
- echo "#define GIT_SHAID \"$git_shaid\""
+ echo "#define GIT_SHAID \"${git_shaid:0:8}..\""
echo ""
# Branch -- use git-status instead of git-branch