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

Bug#730552: provide xserver-xorg-source package for building 3rd party software (e.g. VNC) reusing XOrg codebase



On Sat, 30 Nov 2013, Julien Cristau wrote:

> > Since better later than never, I have decided to file this wishlist to discuss
> > such a possibility.  do you see any particular concerns against?  would you
> > prefer a patch or work it our yourself?

> Please provide a patch.

Please find initial attempt attached -- review, critique is welcome but
would be even better if some xserver pkg expert would just improve up
it.  

I have distributed sources in the -source packge

- as a tarball  since they would most probably would need to be patched
  anyways, thus would need to be copied, and better --just extracted
- as .xz since it becomes used widely and provides better compression
- I left the distributed tarball unversioned to ease/disambiguate its
  use by projects needing xorg sources to build upon

Cheers!

-- 
Yaroslav O. Halchenko, Ph.D.
http://neuro.debian.net http://www.pymvpa.org http://www.fail2ban.org
Senior Research Associate,     Psychological and Brain Sciences Dept.
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        
From f954df631789d8bf7574ddf18a6ec90a70da2e3b Mon Sep 17 00:00:00 2001
From: Yaroslav Halchenko <debian@onerussian.com>
Date: Sat, 30 Nov 2013 14:55:28 -0500
Subject: [PATCH] Adding xserver-source binary package to provide a tarball
 with original (patched, autoreconfed) sources of the xserver (Closes:
 #730552)

---
 debian/changelog              |  7 +++++++
 debian/control                | 14 ++++++++++++++
 debian/rules                  | 23 ++++++++++++++++++++---
 debian/xserver-source.install |  1 +
 4 files changed, 42 insertions(+), 3 deletions(-)
 create mode 100644 debian/xserver-source.install

diff --git a/debian/changelog b/debian/changelog
index eb503f0..40c7025 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xorg-server (2:1.14.3-6) UNRELEASED; urgency=low
+
+  * Adding xserver-source binary package to provide a tarball with
+    original (patched) sources of the xserver.
+
+ -- Yaroslav Halchenko <debian@onerussian.com>  Sat, 30 Nov 2013 14:55:20 -0500
+
 xorg-server (2:1.14.3-5) unstable; urgency=low
 
   * Cherry-pick a upstream commit to fix mesa-10 driver loading.
diff --git a/debian/control b/debian/control
index f06251e..6a5c508 100644
--- a/debian/control
+++ b/debian/control
@@ -347,3 +347,17 @@ Recommends:
 Replaces: xserver-xorg-core (<< 2:1.5.2)
 Description: common files used by various X servers
  This package provides files necessary for all X.Org based X servers.
+
+Package: xserver-source
+Architecture: all
+Depends:
+ ${misc:Depends},
+Description: Xorg X server - source files
+ This package provides original Debian (with Debian patches already
+ applied, and autotools files updated) sources for the X.Org ('Xorg')
+ X server shipped in a tarball.  This enables other projects re-using
+ X server codebase (e.g. VNC servers) to (re-)use officially
+ Debian-supported version of the X xserver for their builds.
+ .
+ Unless you are building a software product using X server sources,
+ you probably want xserver-xorg and/or xserver-xorg-core instead.
diff --git a/debian/rules b/debian/rules
index 1b1a7b5..e179b81 100755
--- a/debian/rules
+++ b/debian/rules
@@ -184,6 +184,23 @@ $(STAMP_DIR)/autoreconf: $(STAMP_DIR)/stampdir $(QUILT_STAMPFN)
 	autoreconf -vfi
 	>$@
 
+# Wrapping up all sources for xserver-source package is easiest before
+# anything else was done and should only be done if build/binary-indep
+$(STAMP_DIR)/build-source: $(QUILT_STAMPFN) $(STAMP_DIR)/autoreconf
+	dh_testdir
+	dh_testroot
+	mkdir -p build-source
+	tar \
+        --transform 's,^,xorg-server/,' \
+        --exclude=stampdir --exclude=debian --exclude=.git* --exclude=.pc \
+        --exclude=build-* --exclude=autom4te.cache \
+        -cJf build-source/xorg-server.tar.xz *
+	>$@
+
+build-source: $(STAMP_DIR)/build-source
+
+# Depend on build-source to be completed before any other action on
+# the source tree could be done
 $(STAMP_DIR)/configure-%: $(STAMP_DIR)/autoreconf
 	dh_testdir
 	mkdir -p build-$*
@@ -215,7 +232,7 @@ build: $(STAMP_DIR)/build-udeb
 build: $(STAMP_DIR)/tests-udeb
 endif
 build-arch: build
-build-indep: build
+build-indep: build-source build
 
 clean: unpatch abibumpcheck
 	dh_testdir
@@ -343,7 +360,7 @@ endif
 
 
 # Build architecture-independent files here
-binary-indep: build install
+binary-indep: build-source build install
 	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-initial
 	dh_install -i --sourcedir=debian/tmp
 	dh_installdocs -i
@@ -352,4 +369,4 @@ binary-indep: build install
 	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-deb
 
 binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install
+.PHONY: build clean binary-indep binary-arch build-source binary install
diff --git a/debian/xserver-source.install b/debian/xserver-source.install
new file mode 100644
index 0000000..f5fd0fd
--- /dev/null
+++ b/debian/xserver-source.install
@@ -0,0 +1 @@
+../../build-source/* usr/src
-- 
1.8.4.rc3

Attachment: signature.asc
Description: Digital signature


Reply to: