#!/usr/bin/make -f # # debian/rules by Alexander Sack # # $Id: rules,v 1.20.2.1 2004/06/08 17:56:16 alex Exp $ # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 include /usr/share/dpatch/dpatch.make export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 export MOZ_THUNDERBIRD=1 export PACKAGE=mozilla-thunderbird MAKE_OPTS=-C build-dir/mozilla TBIRD_BZ2_ARCHIVE=thunderbird-1.5.0.10-source.tar.bz2 # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH) #CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) OPTFLAGS = -O0 -g else OPTFLAGS = -O2 -g -fno-strict-aliasing -fno-unsigned-char ifeq ($(DEB_BUILD_ARCH),ppc64) OPTFLAGS = -mminimal-toc endif endif #NULL = #CONFIGURE_OPTIONS = \ # --program-prefix=mozilla- \ # --enable-default-toolkit=gtk2 \ # --with-default-mozilla-five-home=/usr/lib/mozilla-thunderbird \ # --with-user-appdir=.mozilla-thunderbird \ # --with-system-mng=/usr \ # --with-system-png=/usr \ # --with-system-jpeg=/usr \ # --with-system-zlib=/usr \ # --without-system-nspr \ # --enable-crypto \ # --disable-mathml \ # --disable-installer \ # --disable-activex \ # --disable-activex-scripting \ # --disable-tests \ # --disable-oji \ # --disable-necko-disk-cache \ # --disable-debug \ # --enable-optimize=\"$(OPTFLAGS)\" \ # --enable-strip \ # --enable-single-profile \ # --disable-profilesharing \ # --enable-extensions=wallet,spellcheck,xmlextras,typeaheadfind,inspector,webservices,pref \ # --enable-necko-protocols=http,file,jar,viewsource,res,data \ # --enable-image-decoders=default,-xbm \ # --enable-xft \ # --enable-xprint \ # $(NULL) NULL = CONFIGURE_OPTIONS = \ --program-prefix=mozilla- \ --enable-default-toolkit=gtk2 \ --enable-application=mail \ --with-default-mozilla-five-home=/usr/lib/mozilla-thunderbird \ --with-user-appdir=.mozilla-thunderbird \ --with-system-mng=/usr \ --with-system-png=/usr \ --with-system-jpeg=/usr \ --with-system-zlib=/usr \ --without-system-nspr \ --enable-system-cairo \ --enable-optimize=\"$(OPTFLAGS)\" \ --enable-extensions=default,typeaheadfind,inspector \ --enable-necko-protocols=http,file,jar,viewsource,res,data \ --enable-xft \ --disable-xprint \ --enable-pango \ --enable-xinerama \ --disable-strip \ --disable-pedantic \ --disable-debug \ --enable-official-branding \ $(NULL) build-dir/mozilla/config.status: build-dir/mozilla/configure dh_testdir rm -f build-dir/mozilla/.mozconfig sh $(CURDIR)/debian/gen-fhunderbird-branding.sh # Add here commands to configure the package. sh -c "cd build-dir/mozilla; ./configure --host=$(DEB_HOST_GNU_TYPE) \ --build=$(DEB_BUILD_GNU_TYPE) \ --prefix=/usr \ --mandir=\$${prefix}/share/man \ --infodir=\$${prefix}/share/info \ --srcdir=. \ $(CONFIGURE_OPTIONS)" build-dir: mkdir $(CURDIR)/build-dir extract: extract-stamp extract-stamp: build-dir tar xjf archives/$(TBIRD_BZ2_ARCHIVE) -C build-dir/ cp build-dir/mozilla/nsprpub/config/nspr.m4 build-dir/mozilla/nsprpub/config/mozilla-thunderbird-nspr.m4 touch extract-stamp dopatch: extract patch-stamp dounpatch: unpatch build: extract dopatch build-dir/mozilla/config.status build-stamp build-stamp: dh_testdir # Add here commands to compile the package. $(MAKE) -C build-dir/mozilla # build separate extensions # $(MAKE) -C build-dir/mozilla/mail/extensions/offline # $(MAKE) -C build-dir/mozilla/mail/extensions/inspector $(MAKE) -C build-dir/mozilla/extensions/inspector $(MAKE) -C build-dir/mozilla/extensions/typeaheadfind # $(MAKE) -C build-dir/mozilla/other-licenses/libical # $(MAKE) -C build-dir/mozilla/calendar /usr/bin/docbook-to-man debian/mozilla-thunderbird.sgml > debian/mozilla-thunderbird.1 touch build-stamp clean: dounpatch clean-real clean-real: dh_testdir dh_testroot rm -rf build-dir extract-stamp build-stamp dh_clean rm -rf debian/tmp-calendar rm -rf debian/tmp-offline rm -rf debian/tmp-inspector rm -rf debian/tmp-typeaheadfind rm -rf debian/tmp-icons rm -rf debian/tmpbuild rm -f debian/mozilla-thunderbird.1 rm -f a.out config.* # configure sometimes leaves files install: build dh_testdir dh_testroot dh_clean -k dh_installdirs # Add here commands to install the package into debian/mozilla-thunderbird. $(MAKE) -C build-dir/mozilla install DESTDIR=$(CURDIR)/debian/tmpbuild # applying patches to /usr/bin/mozilla-thunderbird # applying patch for MFSA_2005-59 ... sorry patching the source would have been # too hard to do right now. #patch -d $(CURDIR)/debian/tmpbuild -p0 < $(CURDIR)/debian/mfsa_2005-59.debian.patch # install separate extensions # $(MAKE) -C build-dir/mozilla/mail/extensions/offline install DESTDIR=$(CURDIR)/debian/tmp-offline # inspector $(MAKE) -C build-dir/mozilla/extensions/inspector install DESTDIR=$(CURDIR)/debian/tmp-inspector # $(MAKE) -C build-dir/mozilla/mail/extensions/inspector install DESTDIR=$(CURDIR)/debian/tmp-inspector # typeaheadfind $(MAKE) -C build-dir/mozilla/extensions/typeaheadfind install DESTDIR=$(CURDIR)/debian/tmp-typeaheadfind cp -v debian/chrome.manifest.typeaheadfind $(CURDIR)/debian/tmp-typeaheadfind/chrome.manifest # calendar # $(MAKE) -C build-dir/mozilla/other-licenses/libical install DESTDIR=$(CURDIR)/debian/tmp-calendar # $(MAKE) -C build-dir/mozilla/calendar install DESTDIR=$(CURDIR)/debian/tmp-calendar sh $(CURDIR)/debian/rejar-chrome.sh comm sh $(CURDIR)/debian/rejar-chrome.sh global sh $(CURDIR)/debian/rejar-chrome.sh messenger sh $(CURDIR)/debian/rejar-typeaheadfind.sh rm -rf $(CURDIR)/build-dir/mozilla/mail/app/profile/extensions/\{972ce4c6-7e08-4474-a285-3208198ce6fd\}/CVS # Build architecture-independent files here. #binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: install dh_testdir dh_testroot dh_installchangelogs dh_installdocs dh_installexamples dh_install rm -rf $(CURDIR)/debian/tmp/usr/lib/mozilla-thunderbird/components/myspell # dirty move to var folder for chromes: do it in .install file rm -f $(CURDIR)/debian/tmp/usr/share/mozilla-thunderbird/chrome/installed-chrome.txt dh_installmenu dh_installdebconf # dh_installlogrotate # dh_installemacsen # dh_installpam # dh_installmime # dh_installinit # dh_installcron # dh_installinfo dh_installman dh_link dh_strip dh_compress dh_fixperms # dh_perl # dh_python # dh_makeshlibs dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install