The following commit has been merged in the debian-experimental-3.5 branch: commit 4d504386feb9a84aaa5cedef6b6a6ce4adcb81b9 Author: Bjoern Michaelsen <bjoern.michael...@canonical.com> Date: Wed Nov 23 15:39:55 2011 +0100
more get-orig-source work diff --git a/README b/README index 225e966..cde3293 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ -OpenOffice build system ------------------------ +LibreOffice build system +------------------------ Building the packages from source ================================= @@ -45,7 +45,7 @@ The targets that are built during the package build - targets run during the package build - -config.status - Does prerequisites for the build like unpacking extra +unpack - Does prerequisites for the build like unpacking extra stuff and run configure in ooo-build. build - as the name says @@ -70,6 +70,15 @@ get-orig-source - gets original source tarballs and unpacks them GIT_TAG is tag that should be packed GIT_BRANCH and GIT_TAG can both be master +Building the package from git master +==================================== +To do a build from git master, do: + mkdir libreoffice-git + cd libreoffice-git + git clone git://anonscm.debian.org/pkg-openoffice/libreoffice.git debian + ./debian/rules unpack GIT_BRANCH=master GIT_TAG=master SOURCE_TARBALLS=n + dpkg-buildpackage + Build system file layout ======================== debian/scripts: diff --git a/rules b/rules index 967f01b..d3e1f1a 100755 --- a/rules +++ b/rules @@ -1575,7 +1575,7 @@ endif touch $@ build: $(STAMP_DIR)/build -$(STAMP_DIR)/build: config.status $(CURDIR)/../libreoffice_$(DEB_VERSION_UPSTREAM).orig-ext-sources.tar.gz +$(STAMP_DIR)/build: config.status | ext-sources/fetch.log dh_testdir ifeq "$(BUILD_KDE)" "n" @@ -3238,15 +3238,15 @@ binary: binary-arch binary-indep ifneq "$(SOURCE_TARBALLS)" "y" # $(1) is the upstream name of the repo -# $(2) is the location where the contents of the tarball end up relative to CURDIR (might be empty) -# $(3) is the name of the tarball +# $(2) is the name of the tarball +# $(3) is the path to archive (empty for everything) # # according to policy get-orig-source has to download to the current dir, thus # should not require a dh_testdir. However, like this we can have clean deps # from build and download the source, configure, build, pack in on piece. As # get-orig-source is an optional target anyway, we stick to support only this # case and not random dirs. see also: debian bug 494141 - +# also, we need to run configure to create the ext-sources tarball anyway define pack_gittarball dh_testdir @@ -3259,43 +3259,60 @@ if test -n "$$TMP"; then \ else \ TMPD=`mktemp -d`; \ fi && \ -git clone --bare $(GIT_BASEURL)/$(1) $${TMPD} -b $(GIT_BRANCH) && \ -git archive --remote $${TMPD} --format=tar --prefix libreoffice-$(DEB_VERSION_UPSTREAM)/$(2) $(GIT_TAG) \ - | gzip \ - > $(3) && \ -rm -rf $${TMPD} && \ -tar xvzf $(3) -C $(CURDIR) --strip-components=1 +mkdir $${TMPD}/archive && \ +git clone --bare $(GIT_BASEURL)/$(1) $${TMPD}/repo -b $(GIT_BRANCH) && \ +git archive --remote $${TMPD}/repo --format=tar --prefix libreoffice-$(DEB_VERSION_UPSTREAM)/ $(GIT_TAG) |tar x -C $${TMPD}/archive && \ +tar cvzf $(2) -C $${TMPD}/archive/$(3) --transform 's,./,,' . && \ +rm -rf $${TMPD} endef $(CURDIR)/../libreoffice_$(DEB_VERSION_UPSTREAM).orig.tar.gz: - $(call pack_gittarball,core,,$@) + $(call pack_gittarball,core,$@,) + +$(CURDIR)/../libreoffice_$(DEB_VERSION_UPSTREAM).orig-helpcontent2.tar.gz: + $(call pack_gittarball,help,$@,libreoffice-$(DEB_VERSION_UPSTREAM)/helpcontent2) -$(CURDIR)/../libreoffice_$(DEB_VERSION_UPSTREAM)-helpcontent2.orig.tar.gz: - $(call pack_gittarball,helpcontent2,clone/help/,$@) +$(CURDIR)/../libreoffice_$(DEB_VERSION_UPSTREAM).orig-%.tar.gz: + $(call pack_gittarball,$*,$@,libreoffice-$(DEB_VERSION_UPSTREAM)/$*) + +.gitignore: $(CURDIR)/../libreoffice_$(DEB_VERSION_UPSTREAM).orig.tar.gz + dh_testdir + tar xvzf $< -C $(CURDIR) --strip-components=1 -$(CURDIR)/../libreoffice_$(DEB_VERSION_UPSTREAM)-%.orig.tar.gz: - $(call pack_gittarball,$*,clone/$*/,$@) +%/.gitignore: $(CURDIR)/../libreoffice_$(DEB_VERSION_UPSTREAM).orig-%.tar.gz + dh_testdir + mkdir -p $(CURDIR)/$* + tar xvzf $< -C $(CURDIR)/$* + +ext-sources/fetch.log: $(CURDIR)/../libreoffice_$(DEB_VERSION_UPSTREAM).orig-ext-sources.tar.gz + dh_testdir + mkdir -p $(CURDIR)/ext-sources + tar xvzf $< -C $(CURDIR)/ext-sources + +config.status:| $(foreach tarball,binfilter dictionaries helpcontent2 translations,$(tarball)/.gitignore $(CURDIR)/../libreoffice_$(DEB_VERSION_UPSTREAM).orig-$(tarball).tar.gz) +config.status:|.gitignore $(CURDIR)/../libreoffice_$(DEB_VERSION_UPSTREAM).orig.tar.gz -config.status: $(CURDIR)/../libreoffice_$(DEB_VERSION_UPSTREAM).orig.tar.gz -config.status: $(foreach repo,binfilter dictionaries translations,$(CURDIR)/../libreoffice_$(DEB_VERSION_UPSTREAM)-$(repo).orig.tar.gz) # Get upstream external sources -$(CURDIR)/../libreoffice_$(DEB_VERSION_UPSTREAM).orig-ext-sources.tar.gz: config.status +$(CURDIR)/../libreoffice_$(DEB_VERSION_UPSTREAM).orig-ext-sources.tar.gz:| config.status + dh_testdir rm -rf $(TARFIILE_LOCATION) mkdir -p $(TARFILE_LOCATION) ./download - tar cfvz $@ -C $(dir $(TARFILE_LOCATION)) $(notdir $(TARFILE_LOCATION)) - rm -f ooo.lst - + tar cvzf $@ -C $(TARFILE_LOCATION) --transform 's,./,,' . get-orig-source: $(CURDIR)/../libreoffice_$(DEB_VERSION_UPSTREAM).orig-ext-sources.tar.gz + dh_testdir + +unpack: ext-sources/fetch.log + dh_testdir endif .PHONY: control .PHONY: clean-debdir clean-instsetoo clean-objectdirs clean default configure .PHONY: build build-indep build-arch install-arch install-indep -.PHONY: get-orig-source +.PHONY: get-orig-source unpack .PHONY: $(stampdir_targets) # vim:set noet ai sts=8 sw=8 tw=0: -- LibreOffice packaging repository -- To UNSUBSCRIBE, email to debian-openoffice-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1rteje-0001z9...@vasks.debian.org