[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xsf-docs: Changes to 'master'



 reference/dependencies.mdwn |  101 ++++++++++++++++++++++++++++++++++++++------
 1 file changed, 88 insertions(+), 13 deletions(-)

New commits:
commit b80193b9126ba009f70af25d38b87a7b8f9a5d91
Author: Cyril Brulebois <kibi@debian.org>
Date:   Sun Feb 6 07:37:43 2011 +0100

    dependencies: Add sample control and rules files.

diff --git a/reference/dependencies.mdwn b/reference/dependencies.mdwn
index dca9156..19d4fdc 100644
--- a/reference/dependencies.mdwn
+++ b/reference/dependencies.mdwn
@@ -123,3 +123,84 @@ To make it easy to compute substvars when using `dh`, a `dh` sequence
 (`xsf.pm`) is shipped. As of `2:1.9.4-1`, it inserts
 `dh_xsf_substvars` right before the `dh_gencontrol` call. Other
 repetitive tasks could also be automated this way.
+
+
+## Sample driver packaging
+
+The following assumes:
+
+ * The upstream build system is sane enough, which lets us run
+   `autoreconf` at build time.
+ * It is a `video` driver. For an `input` driver, replace both
+   `xviddriver` occurrences with `xinpdriver`.
+
+### Sample debian/control file
+
+    Build-Depends:
+     debhelper (>= 8),
+     dh-autoreconf,
+     quilt,
+     xserver-xorg-dev (>= 2:1.9.4),
+     …
+
+    Depends:
+     ${shlibs:Depends},
+     ${misc:Depends},
+     ${xviddriver:Depends},
+    Provides:
+     ${xviddriver:Provides}
+
+
+### Sample debian/rules file
+
+    #!/usr/bin/make -f
+
+    # Configuration:
+    #override_dh_auto_configure:
+    #        dh_auto_configure -- --with-FOO --without-BAR
+
+    # Install in debian/tmp to retain control through dh_install:
+    override_dh_auto_install:
+            dh_auto_install --destdir=debian/tmp
+
+    # Kill *.la files, and forget no-one:
+    override_dh_install:
+            find debian/tmp -name '*.la' -delete
+            dh_install --fail-missing
+
+    ## Debug package:
+    #override_dh_strip:
+    #        dh_strip --dbg-package=xserver-xorg-video-DRIVER-dbg
+
+    # That's a plugin, use appropriate warning level:
+    override_dh_shlibdeps:
+            dh_shlibdeps -- --warnings=6
+
+    %:
+            dh $@ --with quilt,autoreconf,xsf --builddirectory=build/
+
+Some comments:
+
+ * `dh_auto_configure`: Commented out since there’s usually no
+   specific option to pass when building drivers. Sometimes needed to
+   get a related utility built.
+ * `dh_auto_install`: It behaves differently when operating on a
+   single package (it installs under `debian/PACKAGE` instead of
+   `debian/tmp`), so make it use `debian/tmp` in all cases. This way,
+   `dh_install` has to be used (see below). That also means that a
+   binary package (*e.g.* a debug package) can be added without
+   changing this part.
+ * `dh_install`: No point in keeping the `.la` files. Also, using
+   `--fail-missing` makes sure every file installed by upstream is
+   installed in some package, or explicitly ignored.
+ * `dh_strip`: Commented out, there’s only a few drivers shipping a
+   debug package.
+ * `dh_shlibdeps`: The comment really says it all.
+ * `dh`: The order is important! We want patching to happen before
+   autoreconfiguring (both `quilt` and `autoreconf` insert commands
+   before `dh_auto_configure`, and after `dh_clean`). Also, we build
+   out-of-tree. The `xsf` sequence is explained in the previous part.
+
+If one needs to build several flavours,
+[`fbdev`’s rules file](http://git.debian.org/?p=pkg-xorg/driver/xserver-xorg-video-fbdev.git;a=blob;f=debian/rules)
+can be used as an example.

commit f87c7dad87aba4c9d0fd507b950afb61cca138ad
Author: Cyril Brulebois <kibi@debian.org>
Date:   Sun Feb 6 07:37:37 2011 +0100

    dependencies: Document xsf's dh sequence.

diff --git a/reference/dependencies.mdwn b/reference/dependencies.mdwn
index f6987eb..dca9156 100644
--- a/reference/dependencies.mdwn
+++ b/reference/dependencies.mdwn
@@ -119,13 +119,7 @@ variable” warning messages while building. And since there’s a clear
 only input-related variables for input drivers, and only video-related
 variables for video drivers.
 
-
-## Possible improvements
-
-Once we’re done implementing the above stuff in `xorg-server`, and
-getting rid of deprecated features, we can do a bit more.
-
-To make it easy to compute substvars when using `dh`, we can ship a
-`dh` sequence to insert `dh_xsf_substvars` right before the
-`dh_gencontrol` call. That sequence could also be used to automate
-other stuff.
+To make it easy to compute substvars when using `dh`, a `dh` sequence
+(`xsf.pm`) is shipped. As of `2:1.9.4-1`, it inserts
+`dh_xsf_substvars` right before the `dh_gencontrol` call. Other
+repetitive tasks could also be automated this way.

commit ac1cc074195214738677fdc1c9f1a1352f38b0e9
Author: Cyril Brulebois <kibi@debian.org>
Date:   Sun Feb 6 07:37:21 2011 +0100

    dependencies: Mention the version where dh_xsf_substvars appeared.

diff --git a/reference/dependencies.mdwn b/reference/dependencies.mdwn
index 8725713..f6987eb 100644
--- a/reference/dependencies.mdwn
+++ b/reference/dependencies.mdwn
@@ -95,7 +95,7 @@ tweaks afterwards if needed.
 ### Driver’s build system
 
 To set those variables, we ship a `dh_xsf_substvars` script in
-`xserver-xorg-dev` starting with ***FIXME_version***, to be run before
+`xserver-xorg-dev` starting with `2:1.9.4`, to be run before
 `dh_gencontrol`. It iterates on the packages listed by
 `dh_listpackages` (very old `debhelper` command) and does the
 following work:

commit 68fb444b81bcac3a32c296833685d775c7068a95
Author: Cyril Brulebois <kibi@debian.org>
Date:   Tue Feb 1 19:12:59 2011 +0100

    dependencies: Reword a bit.

diff --git a/reference/dependencies.mdwn b/reference/dependencies.mdwn
index 270ad71..8725713 100644
--- a/reference/dependencies.mdwn
+++ b/reference/dependencies.mdwn
@@ -6,8 +6,8 @@ Cyril Brulebois &lt;kibi@debian.org>
 ## Upstream-side: ABI version numbers
 
 The X server defines several
-[ABI](http://en.wikipedia.org/wiki/Application_binary_interface) in
-`hw/xfree86/common/xf86Module.h`, through the
+[ABI](http://en.wikipedia.org/wiki/Application_binary_interface) version numbers in the
+`hw/xfree86/common/xf86Module.h` header, through the
 `SET_ABI_VERSION(maj,min)` macro. In this document, the focus is on
 `ABI_VIDEODRV_VERSION` and `ABI_XINPUT_VERSION`, which are
 respectively about `video` drivers and `input` drivers.


Reply to: