diff -u gnumeric-1.6.3/debian/rules gnumeric-1.6.3/debian/rules --- gnumeric-1.6.3/debian/rules +++ gnumeric-1.6.3/debian/rules @@ -15,6 +15,9 @@ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 +# 2 variants for this package, GNOME and GTK +VARIANTS=gnome gtk + # This is the debhelper compatability version to use. export DH_COMPAT=4 @@ -82,7 +85,7 @@ # Spreadsheet indexer for beagle features+= --enable-ssindex -confflags := --prefix=/usr \ +confflags := --prefix=/usr \ --mandir=\$${prefix}/share/man \ --sysconfdir=/etc \ --localstatedir=/var/lib \ @@ -90,6 +93,7 @@ --enable-compile-warnings=minimum \ $(features) + ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) confflags += --build $(DEB_HOST_GNU_TYPE) else @@ -102,42 +106,46 @@ # for all libraries specified in the link line. confflags += LDFLAGS="-Wl,-O1 -Wl,--as-needed" +## Define confflags for both gtk and gnome variants +confflags-gnome := $(confflags) +confflags-gtk := $(confflags) --without-gnome + source-updates: - rm -f configure-stamp + rm -f configure-stamp* # Update files generated by autotools env srcdir=`pwd` NOCONFIGURE=1 \ LIBTOOLIZE="libtoolize --copy" \ INTLTOOLIZE="intltoolize --copy" \ sh autogen.sh $(confflags) -configure: configure-stamp -configure-stamp: +configure-stamp-%: dh_testdir cd po; intltool-update -p cd po-functions; intltool-update -p # Prepare for build - mkdir build - cd build && env srcdir=`pwd`/.. \ - ../configure $(confflags) + mkdir build-$* + cd build-$* && env srcdir=`pwd`/.. \ + ../configure $(confflags-$(*)) - touch configure-stamp + touch configure-stamp-$* -build: configure-stamp build-stamp -build-stamp: +build: $(foreach v,$(VARIANTS),build-stamp-$(v)) +build-stamp-%: configure-stamp-% dh_testdir - cd build && $(MAKE) - touch build-stamp + cd build-$* && $(MAKE) + touch build-stamp-$* -clean: +clean: $(foreach v,$(VARIANTS),clean-$(v)) +clean-%: dh_testdir dh_testroot - rm -f build-stamp configure-stamp debian/*substvars debian/*~ \ + rm -f build-stamp* configure-stamp-* debian/*substvars debian/*~ \ debian/buildinfo - rm -rf debian/tmp build + rm -rf debian/tmp-$* build-$* # Update config.{sub,guess} from autotools-dev, if possible. -for f in config.sub config.guess ; do \ @@ -167,72 +175,83 @@ dh_clean install: DH_OPTIONS= -install: build +install: build $(foreach v,$(VARIANTS),install-$(v)) + dh_install -pgnumeric --sourcedir=`pwd`/debian/tmp-gnome --list-missing + dh_install -pgnumeric-gtk --sourcedir=`pwd`/debian/tmp-gtk --list-missing + dh_install -pgnumeric-plugins-extra --sourcedir=`pwd`/debian/tmp-gnome --list-missing + dh_install -pgnumeric-gtk-plugins-extra --sourcedir=`pwd`/debian/tmp-gtk --list-missing + dh_install -pgnumeric-common --sourcedir=`pwd`/debian/tmp-gnome --list-missing + dh_install -pgnumeric-doc --sourcedir=`pwd`/debian/tmp-gnome --list-missing + + # Name the binary just "gnumeric" + cd debian/gnumeric/usr/bin && mv gnumeric-* gnumeric + cd debian/gnumeric-gtk/usr/bin && mv gnumeric-* gnumeric + + dh_link -pgnumeric-common usr/share/gnumeric/$(upstreamversion)/idl/GNOME_Gnumeric.idl usr/share/idl/GNOME_Gnumeric.idl + + # Make the documentation accessible to gnumeric + dh_link -pgnumeric-doc usr/share/gnome/help/gnumeric usr/share/gnumeric/$(upstreamversion)/doc + + dh_link -pgnumeric-doc usr/share/xml/docbook/stylesheet/nwalsh/images/ usr/share/gnumeric/$(upstreamversion)/doc/C/images + + # Remove files from the main package that belong to a more + # specialist package + # (dh_install doesn't do the right thing here IMO; perhaps it + # doesn't like multiple globs in one line) + while read l ; do \ + rm -rvf debian/gnumeric/$$l ; \ + rm -rvf debian/gnumeric-gtk/$$l ; \ + done < debian/gnumeric-plugins-extra.install + + # Remove dirs that are now empty + -find debian/gnumeric -depth -type d | xargs rmdir >/dev/null 2>&1 + -find debian/gnumeric-gtk -depth -type d | xargs rmdir >/dev/null 2>&1 + + +install-%: dh_testdir dh_testroot dh_clean -k dh_installdirs - cd build && env GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 \ + cd build-$* && env GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 \ $(MAKE) install \ - DESTDIR=`pwd`/../debian/tmp/ \ - localstatedir=`pwd`/../debian/tmp/var/lib \ - libexecdir=`pwd`/../debian/tmp/usr/bin \ + DESTDIR=`pwd`/../debian/tmp-$*/ \ + localstatedir=`pwd`/../debian/tmp-$*/var/lib \ + libexecdir=`pwd`/../debian/tmp-$*/usr/bin \ scrollkeeper_localstate_dir=/var/lib/scrollkeeper # Plugins are not intended as stand-alone executables - find `pwd`/debian/tmp/usr/lib/gnumeric/*/plugins -type f -print0 | xargs -0 chmod a-x + find `pwd`/debian/tmp-$*/usr/lib/gnumeric/*/plugins -type f -print0 | xargs -0 chmod a-x # Remove unwanted files: static libraries and documentation sources - find `pwd`/debian/tmp/usr/ -name '*.a' -print0 | xargs -0 rm -f - find `pwd`/debian/tmp/ -name '*.sgml' -print0 | xargs -0 rm -f + find `pwd`/debian/tmp-$*/usr/ -name '*.a' -print0 | xargs -0 rm -f + find `pwd`/debian/tmp-$*/ -name '*.sgml' -print0 | xargs -0 rm -f # Bonobo-only files - rm -rf debian/tmp/usr/lib/bonobo + rm -rf debian/tmp-$*/usr/lib/bonobo # libspreadsheet is far from a mature library; loose the development # files - rm -f debian/tmp/usr/lib/libspreadsheet.la debian/tmp/usr/lib/libspreadsheet.so + rm -f debian/tmp-$*/usr/lib/libspreadsheet.la debian/tmp/usr/lib/libspreadsheet.so # Outdated - rm -f debian/tmp/usr/share/mc/templates/gnumeric.desktop + rm -f debian/tmp-$*/usr/share/mc/templates/gnumeric.desktop # Remove scrollkeeper generated files as well; for a package they # need to be (re)generated at package (de)install time. - rm -rf `pwd`/debian/tmp/var/lib/scrollkeeper + rm -rf `pwd`/debian/tmp-$*/var/lib/scrollkeeper # Low-colour icon for use by the menu system - $(INSTALL) -m 644 debian/gnome-gnumeric.xpm `pwd`/debian/tmp/usr/share/pixmaps/ + $(INSTALL) -m 644 debian/gnome-gnumeric.xpm `pwd`/debian/tmp-$*/usr/share/pixmaps/ # Checksums of historical versions of conffiles - $(INSTALL) -m 644 debian/gnumeric-dialogs.schemas.md5sum debian/gnumeric-general.schemas.md5sum debian/gnumeric-plugins.schemas.md5sum `pwd`/debian/tmp/usr/share/gnumeric/ + $(INSTALL) -m 644 debian/gnumeric-dialogs.schemas.md5sum debian/gnumeric-general.schemas.md5sum debian/gnumeric-plugins.schemas.md5sum `pwd`/debian/tmp-$*/usr/share/gnumeric/ # Add translation domain to .desktop files - DOMAIN=$$(grep --max-count 1 '^GETTEXT_PACKAGE[[:space:]]*=' $(CURDIR)/build/po/Makefile | sed 's/^.*=[[:space:]]\([^[:space:]]\)/\1/'); \ + DOMAIN=$$(grep --max-count 1 '^GETTEXT_PACKAGE[[:space:]]*=' $(CURDIR)/build-$*/po/Makefile | sed 's/^.*=[[:space:]]\([^[:space:]]\)/\1/'); \ for d in $$(find debian/tmp -type f -name "*.desktop" ); do \ echo "Adding translation domain $$DOMAIN to $$d..."; \ echo "X-Ubuntu-Gettext-Domain=$$DOMAIN" >> $$d; \ done; \ - dh_install --sourcedir=`pwd`/debian/tmp --fail-missing - - # Name the binary just "gnumeric" - cd debian/gnumeric/usr/bin && mv gnumeric-* gnumeric - - dh_link usr/share/gnumeric/$(upstreamversion)/idl/GNOME_Gnumeric.idl usr/share/idl/GNOME_Gnumeric.idl - - # Make the documentation accessible to gnumeric - dh_link -pgnumeric-doc usr/share/gnome/help/gnumeric usr/share/gnumeric/$(upstreamversion)/doc - - dh_link -pgnumeric-doc usr/share/xml/docbook/stylesheet/nwalsh/images/ usr/share/gnumeric/$(upstreamversion)/doc/C/images - - # Remove files from the main package that belong to a more - # specialist package - # (dh_install doesn't do the right thing here IMO; perhaps it - # doesn't like multiple globs in one line) - while read l ; do \ - rm -rvf debian/gnumeric/$$l ; \ - done < debian/gnumeric-plugins-extra.install - - # Remove dirs that are now empty - -find debian/gnumeric -depth -type d | xargs rmdir >/dev/null 2>&1 # Build architecture-independent files here. # Pass -i to all debhelper commands in this target to reduce clutter. @@ -273,6 +292,7 @@ dh_testroot -a dh_installdebconf -a dh_installdocs -a --noscripts + rm -rf `pwd`/debian/gnumeric-gtk-doc/usr/share/doc-base rm -rf `pwd`/debian/gnumeric-doc/usr/share/doc-base dh_installexamples -a dh_installmenu -a @@ -298,6 +318,7 @@ dh_fixperms -a dh_makeshlibs -a + dh_installdeb -a # dh_perl -a diff -u gnumeric-1.6.3/debian/control gnumeric-1.6.3/debian/control --- gnumeric-1.6.3/debian/control +++ gnumeric-1.6.3/debian/control @@ -21,10 +21,10 @@ Package: gnumeric Architecture: any -Depends: ${shlibs:Depends}, gsfonts, gnumeric-common (= ${Source-Version}), ${misc:Depends} +Depends: libgoffice-1-2, ${shlibs:Depends}, gsfonts, gnumeric-common (= ${Source-Version}), ${misc:Depends} Suggests: gnumeric-doc (>= ${Upstream-Version}), gnumeric-plugins-extra, debconf -Conflicts: gnumeric1.0, gnumeric1.0-doc, gnumeric-doc (<< ${Upstream-Version}) -Replaces: zh-trans (<< 0.8-1), gnumeric1.0 +Conflicts: gnumeric1.0, gnumeric1.0-doc, gnumeric-doc (<< ${Upstream-Version}), gnumeric-gtk +Replaces: zh-trans (<< 0.8-1), gnumeric1.0, gnumeric-gtk Description: GNOME spreadsheet application Gnumeric is a powerful spreadsheet application that interoperates well with other spreadsheets. It comes with plugins that enable it to deal with @@ -77,8 +77,8 @@ Package: gnumeric-plugins-extra Architecture: any Depends: gnumeric (= ${Source-Version}), python-gtk2, ${shlibs:Depends} -Conflicts: gnumeric1.0-python, gnumeric1.0-gda, gnumeric-python, gnumeric-gda -Replaces: gnumeric1.0-gda, gnumeric1.0-python, gnumeric-python, gnumeric-gda, gnumeric (<= 1.3.92-1) +Conflicts: gnumeric1.0-python, gnumeric1.0-gda, gnumeric-python, gnumeric-gda, gnumeric-gtk-plugins-extra +Replaces: gnumeric1.0-gda, gnumeric1.0-python, gnumeric-python, gnumeric-gda, gnumeric (<= 1.3.92-1), gnumeric-gtk-plugins-extra Description: additional plugins for the GNOME spreadsheet Gnumeric ships with a number of plugins; this package contains those plugins that require additional packages above what the 'gnumeric' package @@ -94,0 +95,53 @@ + +Package: gnumeric-gtk +Architecture: any +Depends: libgoffice-gtk-1-2, ${shlibs:Depends}, gsfonts, gnumeric-common (= ${Source-Version}), ${misc:Depends} +Suggests: gnumeric-doc (>= ${Upstream-Version}), gnumeric-gtk-plugins-extra, debconf +Conflicts: gnumeric1.0, gnumeric1.0-doc, gnumeric-doc (<< ${Upstream-Version}), gnumeric +Replaces: zh-trans (<< 0.8-1), gnumeric1.0, gnumeric +Description: GTK spreadsheet application + Gnumeric is a powerful spreadsheet application that interoperates well + with other spreadsheets. It comes with plugins that enable it to deal with + commonly used spreadsheet file formats. + . + The following formats can be imported and exported: + o Microsoft Excel (tm) 97/2000/XP (.xls) + o Microsoft Excel (tm) 95 (.xls) + o OASIS XML, OpenOffice.org XML, StarOffice (.sxc) + o Comma/Character Separated Values (.csv) + o Data Interchange Format (.dif) + o Applix version 4 (.as) + . + Additionally, the following formats can be imported: + o GNU Oleo (.oleo) + o Linear and integer program expression format (.mps) + o Lotus 123 (.wks, .wk1) + o MultiPlan (.sylk) + o Plan Perfect (.pln) + o Quatro Pro (tm) + o SC/XSpread + o XBase (.dbf), + . + Gnumeric can export to LaTeX 2e (.tex), TROFF (.me) and HTML as well. + . + Gnumeric should be easy to use, in particular if you are familiar with + Excel. + . + Gnumeric is a GNOME application, but this package only depends on GTK + libraries. + +Package: gnumeric-gtk-plugins-extra +Architecture: any +Depends: gnumeric-gtk (= ${Source-Version}), python-gtk2, ${shlibs:Depends} +Conflicts: gnumeric1.0-python, gnumeric1.0-gda, gnumeric-python, gnumeric-gda, gnumeric-plugins-extra +Replaces: gnumeric1.0-gda, gnumeric1.0-python, gnumeric-python, gnumeric-gda, gnumeric (<= 1.3.92-1), gnumeric-plugins-extra +Description: additional plugins for the GTK spreadsheet + Gnumeric ships with a number of plugins; this package contains those + plugins that require additional packages above what the 'gnumeric' package + needs. + . + This includes + o The Perl plugin + o The Python plugin + o The Python plugin loader + o Additional Python functions diff -u gnumeric-1.6.3/debian/changelog gnumeric-1.6.3/debian/changelog --- gnumeric-1.6.3/debian/changelog +++ gnumeric-1.6.3/debian/changelog @@ -1,3 +1,10 @@ +gnumeric (1.6.3-0ubuntu4) dapper; urgency=low + + * Modify package to build both gnome and gtk variants from the same source + * Remove empty postinst/prerm files + + -- Gauvain Pocentek Wed, 10 May 2006 08:49:24 +0200 + gnumeric (1.6.3-0ubuntu3) dapper; urgency=low * debian/rules: reverted: --- gnumeric-1.6.3/debian/gnumeric-doc.postrm +++ gnumeric-1.6.3.orig/debian/gnumeric-doc.postrm @@ -1,6 +0,0 @@ -#! /bin/sh -set -e - -#DEBHELPER# - -exit 0 reverted: --- gnumeric-1.6.3/debian/gnumeric.prerm +++ gnumeric-1.6.3.orig/debian/gnumeric.prerm @@ -1,6 +0,0 @@ -#! /bin/sh -set -e - -#DEBHELPER# - -exit 0 reverted: --- gnumeric-1.6.3/debian/gnumeric.postinst +++ gnumeric-1.6.3.orig/debian/gnumeric.postinst @@ -1,6 +0,0 @@ -#! /bin/sh -set -e - -#DEBHELPER# - -exit 0 reverted: --- gnumeric-1.6.3/debian/gnumeric-doc.postinst +++ gnumeric-1.6.3.orig/debian/gnumeric-doc.postinst @@ -1,6 +0,0 @@ -#! /bin/sh -set -e - -#DEBHELPER# - -exit 0 only in patch2: unchanged: --- gnumeric-1.6.3.orig/debian/gnumeric-gtk.dirs +++ gnumeric-1.6.3/debian/gnumeric-gtk.dirs @@ -0,0 +1,6 @@ +usr/bin +usr/lib +usr/share/gconf/schemas +usr/share/idl +usr/share/man/man1 +var/lib/scrollkeeper only in patch2: unchanged: --- gnumeric-1.6.3.orig/debian/gnumeric-gtk.menu +++ gnumeric-1.6.3/debian/gnumeric-gtk.menu @@ -0,0 +1,3 @@ +?package(gnumeric):needs="X11" section="Apps/Math" hints="Gnome,Spreadsheets" \ + title="gnumeric" command="/usr/bin/gnumeric" \ + icon="/usr/share/pixmaps/gnome-gnumeric.xpm" only in patch2: unchanged: --- gnumeric-1.6.3.orig/debian/gnumeric-gtk.mime +++ gnumeric-1.6.3/debian/gnumeric-gtk.mime @@ -0,0 +1,6 @@ +application/msexcel; gnumeric '%s'; edit=gnumeric '%s'; description="MS Excel spreadsheet"; test=test -n "$DISPLAY"; nametemplate=%s.xls +application/x-gnumeric; gnumeric '%s'; edit=gnumeric '%s'; compose=gnumeric '%s'; description="Gnumeric spreadsheet"; test=test -n "$DISPLAY"; nametemplate=%s.gnumeric +text/comma-separated-values; gnumeric '%s'; edit=gnumeric '%s'; description="Comma Separated Values"; test=test -n "$DISPLAY"; nametemplate=%s.csv +application/vnd.ms-excel; gnumeric '%s'; edit=gnumeric '%s'; description="MS Excel spreadsheet"; test=test -n "$DISPLAY"; nametemplate=%s.xls +application/vnd.sun.xml.calc; gnumeric '%s'; edit=gnumeric '%s'; description="OpenOffice.org Calc spreadsheet"; test=test -n "$DISPLAY"; nametemplate=%s.sxc +application/x-applix; gnumeric '%s'; edit=gnumeric '%s'; description="Applixware Spreadsheets file"; test=test -n "$DISPLAY"; nametemplate=%s.as only in patch2: unchanged: --- gnumeric-1.6.3.orig/debian/gnumeric-gtk.examples +++ gnumeric-1.6.3/debian/gnumeric-gtk.examples @@ -0,0 +1,4 @@ +samples/hypothetical-sales.gnumeric +samples/test-date.gnumeric +samples/test-indent.gnumeric +samples/test-math.gnumeric only in patch2: unchanged: --- gnumeric-1.6.3.orig/debian/gnumeric-gtk.install +++ gnumeric-1.6.3/debian/gnumeric-gtk.install @@ -0,0 +1,11 @@ +/etc/gconf/schemas/*.schemas +/usr/bin/gnumeric* +/usr/bin/ssconvert* +/usr/bin/ssindex* +/usr/lib/gnumeric/*/plugins/*/*.glade +/usr/lib/gnumeric/*/plugins/*/*.la +/usr/lib/gnumeric/*/plugins/*/*.so +/usr/lib/gnumeric/*/plugins/*/*.xml +/usr/lib/libspreadsheet-*.so* +/usr/share/gnumeric/*/GNOME_Gnumeric-gtk.xml +/usr/share/man/man*/* only in patch2: unchanged: --- gnumeric-1.6.3.orig/debian/shlibs.local +++ gnumeric-1.6.3/debian/shlibs.local @@ -0,0 +1 @@ +libspreadsheet 1.6.3 gnumeric-gtk | gnumeric only in patch2: unchanged: --- gnumeric-1.6.3.orig/debian/gnumeric-gtk.preinst +++ gnumeric-1.6.3/debian/gnumeric-gtk.preinst @@ -0,0 +1,33 @@ +#! /bin/sh +set -e + +if ! test -e /usr/share/debconf/confmodule ; then + # Nothing we can do + exit 0 +fi + +if ! pgrep gnumeric 2>&1 >/dev/null ; then + # Nothing more to do + exit 0 +fi + +. /usr/share/debconf/confmodule + +db_version 2.0 +db_title Detected a running gnumeric process + +# Ignore the fact that shis question may have been answered on another +# occasion already +db_fset gnumeric/existing-process seen false + +# Try hard to get it answered +db_input high gnumeric/existing-process || true +db_go +db_get gnumeric/existing-process +if [ "$RET" = "false" ] ; then + db_stop + exit 1 +fi + +db_stop +exit 0 only in patch2: unchanged: --- gnumeric-1.6.3.orig/debian/gnumeric-gtk.templates +++ gnumeric-1.6.3/debian/gnumeric-gtk.templates @@ -0,0 +1,10 @@ +Template: gnumeric/existing-process +Type: boolean +Default: false +Description: Are you sure you want to upgrade gnumeric right now? + It appears there is an instance of gnumeric running currently. If you + upgrade gnumeric now, that instance may not be able to save its data + anymore. + . + You are strongly recommended to close the running instances of gnumeric + prior to upgrading this package. only in patch2: unchanged: --- gnumeric-1.6.3.orig/debian/gnumeric-gtk-plugins-extra.install +++ gnumeric-1.6.3/debian/gnumeric-gtk-plugins-extra.install @@ -0,0 +1,9 @@ +/usr/lib/gnumeric/*/plugins/gdaif/* +/usr/lib/gnumeric/*/plugins/gnome-db/* +/usr/lib/gnumeric/*/plugins/gnome-glossary/* +/usr/lib/gnumeric/*/plugins/paradox/* +/usr/lib/gnumeric/*/plugins/perl*/* +/usr/lib/gnumeric/*/plugins/py-func/* +/usr/lib/gnumeric/*/plugins/python-loader/* +/usr/lib/gnumeric/*/plugins/python/* +/usr/share/gnumeric/*/python