diff options
author | Gergely Risko <gergely+context@risko.hu> | 2009-11-26 16:25:11 +0200 |
---|---|---|
committer | Gergely Risko <gergely+context@risko.hu> | 2009-11-26 16:25:11 +0200 |
commit | 54c2a0a7a5846248b4eed99b9ca774d9dcda65f0 (patch) | |
tree | 455e401d6eaee2d48f0a088ddd93af9eb3afbad2 | |
parent | 131ed679961e2db500159eaa599d62b5091dbdca (diff) |
dpkg-buildpackage after git clone #3
-rw-r--r-- | HACKING | 55 | ||||
-rw-r--r-- | debian/changelog | 4 | ||||
-rwxr-xr-x | debian/rules | 17 | ||||
-rw-r--r-- | doc/Makefile.am | 3 |
4 files changed, 52 insertions, 27 deletions
@@ -16,7 +16,7 @@ Upstream and Packaging ---------------------- We do not separate 'upstream' code development and packaging for -Maemo. Both happen in the same branch. +Debian/Ubuntu/Maemo. Both happen in the same branch. In the Maemo context, we don't get any benefit from separating the two, so we don't. @@ -39,10 +39,6 @@ Since timestamps are not always preserved well enough when checking a distribution tag out of Git, it might happen that documentation is being regenerated also during a pure target build, and might fail. -It's not yet totally clear how to cope with that: one approach is to -have something like autotool's "missing", another might be to touch -all 'interesting' files just before building. Let's see. - Anyway, you can disable generating of documentation by passing --disable-doc to configure. @@ -99,12 +95,17 @@ environments. Distribution tags (see below) should be buildable with one of these two commands right after checking them out - ./configure && make (for a upstream source tree) - dpkg-buildpackage (for Debianized sources) + ./configure && make + dpkg-buildpackage + + Master should always be buildable by one of the following: + + ./autogen.sh ; ./configure && make + dpkg-buildpackage - Note that things like running ./autogen.sh or more generally - regenerating files that are contained in distribution tags is not - supported in the compilation environment. + Running ./autoclean.sh should clean up everything (but not more) that + was ever generated, so the state should be the same as after the + checkout. Coding style ------------ @@ -130,6 +131,14 @@ No generated file should be committed to a branch. After checking out (or exporting) a branch, running "./autogen.sh" will get the tree into a shape where "./configure && make" or "dpkg-buildpackage" will work. +The only exception is doc/fig{3,4}.png, they can be generated by dot +(graphviz) from the doc/context-arch.txt, but the generation is +fragile and the font rendering quality depends on the installation. +If you modify the figures, you should delete the fig{3,4}.png, so the +build system will have a chance to regenerate them. But after this +your version will be committed to the repository, so please double +check that the PNGs are nice and clean. + Distribution tags are different, see below. ChangeLogs @@ -159,10 +168,8 @@ Making a distribution tag ------------------------- No generated file should be committed to a branch, but distribution -tags should be buildable with "./configure && make" or -"dpkg-buildpackage" right away after exporting them, without the need -to run autogen.sh. The created Debian source package should be clean, -and not contain any files that are not supposed to be distributed. +tags should be buildable with "./configure && make", without running +autogen.sh. In general, a tag should contain exactly the files that would be in a distribution tarball produced by "make dist". In essence, we use tags @@ -187,7 +194,7 @@ Here is the general procedure: - Configure your source tree as needed for making a release. - $ ./configure --enable-doc + $ ./configure - Build the source tree and do a "make distcheck" @@ -204,12 +211,18 @@ the contents of the created directory. Building a debian package ------------------------- -After a git clone, you first have to build documentation. If you have -extracted a distribution tarball, then you already have these files. -Otherwise just do a ./configure, let's double check that all of the -documentation tools and the vala compiler is found and make. After -that you are ready to run 'dpkg-buildpackage -us -uc -rfakeroot -b' to -get your shiny new debian packages. +Running 'dpkg-buildpackage -us -uc -rfakeroot -b' to get your shiny +new debian packages should be enough in the case of any distribution +tag, release tag or any commit in the master branch. + +The advantage of using a distribution tag (instead of a release tag or +a master commit) is that some of the build-dependencies will not be +needed, since the generated files are already distributed. Another +advantage is that the build will be a lot faster this way. + +So if you can't afford to have some of the tools, you can try a +distribution tag and 'dpkg-buildpackage -us -uc -rfakeroot -b -d', +good luck! Making releases --------------- diff --git a/debian/changelog b/debian/changelog index 50ef8e97..4e92519c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,10 @@ contextkit (0.5.2~unreleased) unstable; urgency=low * libcontextprovider c-api gained functions for manipulating list and map valued properties + * build system simplified: after git clone you should be able to run + dpkg-buildpackage right away and the packages should build. - -- Akos PASZTORY <ext-akos.pasztory@nokia.com> Tue, 24 Nov 2009 09:54:48 +0200 + -- Gergely Risko <gergely+context@risko.hu> Thu, 26 Nov 2009 15:59:16 +0200 contextkit (0.5.1) unstable; urgency=low diff --git a/debian/rules b/debian/rules index d4c30e91..7f73ac18 100755 --- a/debian/rules +++ b/debian/rules @@ -3,10 +3,19 @@ #export DH_VERBOSE=1 +# Sanitize build environment when running inside Scratchbox 1 +ifneq (,$(wildcard /targets)) + export SBOX_REDIRECT_TO_DIRS= + export PATH=/scratchbox/compilers/bin:/bin:/usr/bin:/scratchbox/tools/bin +endif + LDFLAGS+=-Wl,--as-needed -Makefile: - ./configure --prefix /usr --sysconfdir=/etc --disable-doc --disable-coverage +configure: + ./autogen.sh --no-configure + +Makefile: configure + ./configure --prefix /usr --sysconfdir=/etc --disable-coverage build: build-stamp build-stamp: Makefile @@ -14,11 +23,11 @@ build-stamp: Makefile $(MAKE) LDFLAGS='$(LDFLAGS)' all touch build-stamp -clean: Makefile +clean: dh_testdir dh_testroot rm -f build-stamp - $(MAKE) distclean + [ -f Makefile ] && $(MAKE) distclean || true dh_clean install: diff --git a/doc/Makefile.am b/doc/Makefile.am index b97ac845..4a97160f 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -24,4 +24,5 @@ EXTRA_DIST = $(html_ASCIIDOCS) \ protocol-suggestion.txt \ lgpl-2.1.txt -MAINTAINERCLEANFILES = $(html_DATA) +MAINTAINERCLEANFILES = $(html_EXTRA) \ + $(html_ASCIIDOCS:.txt=.html) |