summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabien Tassin <fta@sofaraway.org>2008-01-29 14:13:34 +0100
committerFabien Tassin <fta@sofaraway.org>2008-01-29 14:13:34 +0100
commit39ef632dda70c9be009e5d2f7b1626d5be796394 (patch)
treebe1db4ae37b2eeb01230a274359c493a8f64f4f7
parent064831ac4a417a335318822f1b216a66ce9c3493 (diff)
* Add the 'compare' script
- add src/compare.mk.in - update src/Makefile * Rephrase documentation and document 'compare' - update README - update src/mozclient.mk.in
-rw-r--r--README30
-rw-r--r--debian/changelog8
-rw-r--r--src/Makefile3
-rw-r--r--src/compare.mk.in47
-rw-r--r--src/mozclient.mk.in4
-rw-r--r--src/seamonkey-2.0.mk.in15
6 files changed, 100 insertions, 7 deletions
diff --git a/README b/README
index 36fb93c..0c43896 100644
--- a/README
+++ b/README
@@ -1,6 +1,8 @@
-mozilla-devscripts is an abstract tarball creator based on Makefile
-inheritance which provides a get-new-orig target usable by Mozilla packages in
-Ubuntu.
+mozilla-devscripts is a collection of scripts based on Makefile inheritance
+usable by Mozilla packages in Ubuntu.
+
+- mozclient is an abstract tarball creator which provides a get-new-orig target
+- compare is an install checker
The package contains rules for the following projects:
- firefox-3.0
@@ -11,6 +13,10 @@ The package contains rules for the following projects:
- thunderbird-3.0
- xulrunner-1.9
+=== mozclient ===
+
+Creates a source tarball from CVS
+
A clean-up script, called "remove.binonly.sh", is called to remove all
binary-only files. It is applied to all projects before packing.
Traces of the cleaning are preserved inside that resulting tarball
@@ -69,3 +75,21 @@ You can now call it:
- debian/rules get-orig-source DEBIAN_TAG=FIREFOX_3_0b2_RC1=3.0~b2~rc1
=> firefox-3.0_3.0~b2~rc1+nobinonly.orig.tar.gz
+=== compare ===
+
+Compares installed files and debs content
+
+The following target is available to the caller:
+compare: check the difference between what has been installed in debian/tmp
+by the (upstream) make install rule and what has been put in the debs.
+
+The following variable are available:
+COMPARE_FILTER_IN and COMPARE_FILTER_OUT
+By default, both are 'sed' commands that could be augmented (+=) or
+overwritten by the caller.
+
+To use (if not already done for another mozilla-devscripts script)
+
+- in debian/control: add mozilla-devscripts to Build-Depends
+- in debian/rules: add "include /usr/share/mozilla-devscripts/yourproject.mk"
+
diff --git a/debian/changelog b/debian/changelog
index 981d0c1..2abf54d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,8 +2,14 @@ mozilla-devscripts (0.03) UNRELEASED; urgency=low
* Fix PST date missed for direct checkout
- update src/mozclient.mk.in
+ * Add the 'compare' script
+ - add src/compare.mk.in
+ - update src/Makefile
+ * Rephrase documentation and document 'compare'
+ - update README
+ - update src/mozclient.mk.in
- -- Fabien Tassin <fta@sofaraway.org> Wed, 23 Jan 2008 21:15:14 +0100
+ -- Fabien Tassin <fta@sofaraway.org> Tue, 29 Jan 2008 14:06:37 +0100
mozilla-devscripts (0.02) hardy; urgency=low
diff --git a/src/Makefile b/src/Makefile
index 98ca56f..d41331d 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,6 +1,6 @@
# -*- mode: makefile; coding: utf-8 -*-
-# Copyright (c) 2007 Fabien Tassin <fta@sofaraway.org>
+# Copyright (c) 2007-2008 Fabien Tassin <fta@sofaraway.org>
# Description: Build system for mozilla-devscripts
#
# This program is free software; you can redistribute it and/or
@@ -30,6 +30,7 @@ mk_files = \
thunderbird-3.0.mk \
xulrunner-1.9.mk \
mozclient.mk \
+ compare.mk \
$(NULL)
extra_mk_files = \
diff --git a/src/compare.mk.in b/src/compare.mk.in
new file mode 100644
index 0000000..625c0e2
--- /dev/null
+++ b/src/compare.mk.in
@@ -0,0 +1,47 @@
+# -*- mode: makefile; coding: utf-8 -*-
+
+# Copyright (c) 2007-2008 Fabien Tassin <fta@sofaraway.org>
+# Description: The 'compare' module of mozilla-devscripts
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2, or (at
+# your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+#####################################################################
+
+# Don't include this file directly, include one of the project.mk
+# file instead, which will include this file for you.
+
+# The following target is available to the caller:
+# compare: check the difference between what has been installed in debian/tmp
+# by the (upstream) make install rule and what has been put in the debs.
+#
+# The following variable are available:
+# COMPARE_FILTER_IN and COMPARE_FILTER_OUT
+# By default, both are 'sed' commands that could be augmented (+=) or
+# overwritten by the caller.
+
+TEMP := $(shell echo $$$$)
+LIST_INSTALLED := /tmp/installed.$(TEMP)
+LIST_IN_DEBS := /tmp/in_debs.$(TEMP)
+
+PKG_DIRS = $(addprefix debian/,$(shell grep ^Package debian/control | cut -d' ' -f2))
+
+compare:
+ @echo "# Compare..."
+ find debian/tmp -type f | cut -d/ -f3- | $(COMPARE_FILTER_IN) | sort > $(LIST_INSTALLED)
+ find $(PKG_DIRS) -type f | cut -d/ -f3- | $(COMPARE_FILTER_OUT) | sort > $(LIST_IN_DEBS)
+ -diff -u $(LIST_INSTALLED) $(LIST_IN_DEBS) | grep -E '^(\+|-).' | tail -n +3
+ @rm -f $(LIST_INSTALLED) $(LIST_IN_DEBS)
+ @echo "# End"
+
diff --git a/src/mozclient.mk.in b/src/mozclient.mk.in
index cf61c89..3453834 100644
--- a/src/mozclient.mk.in
+++ b/src/mozclient.mk.in
@@ -1,7 +1,7 @@
# -*- mode: makefile; coding: utf-8 -*-
-# Copyright (c) 2007 Fabien Tassin <fta@sofaraway.org>
-# Description: The core of mozilla-devscripts
+# Copyright (c) 2007-2008 Fabien Tassin <fta@sofaraway.org>
+# Description: The 'mozclient' module of mozilla-devscripts
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
diff --git a/src/seamonkey-2.0.mk.in b/src/seamonkey-2.0.mk.in
index c9c551d..3f3a2ed 100644
--- a/src/seamonkey-2.0.mk.in
+++ b/src/seamonkey-2.0.mk.in
@@ -27,3 +27,18 @@ MOZCLIENT_GETDATE = wget -O - -q --read-timeout=10 --user-agent='' --tries=3
MOZCLIENT_WANTMOZDIR := 0
include mozclient.mk.in
+
+COMPARE_FILTER_IN := sed \
+ -s 's,^fake,fake,' \
+ $(NULL)
+COMPARE_FILTER_OUT := sed \
+ -e 's,^DEBIAN/.*,,' \
+ -e 's,^usr/lib/debug/.*,,' \
+ -e 's,^usr/lib/mime/packages/.*,,' \
+ -e 's,^usr/share/doc/.*,,' \
+ -e 's,^usr/share/applications/.*,,' \
+ -e 's,^usr/share/menu/.*,,' \
+ -e 's,^usr/share/pixmaps/.*,,' \
+ $(NULL)
+
+include compare.mk.in