#!/usr/bin/make -f # 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) DEBIAN_VERSION := $(shell dpkg-parsechangelog | sed -n 's/^Version: *\(.*\)$$/\1/ p') DEBIAN_REV_CODE := $(shell echo $(DEBIAN_VERSION) | sed 's/^.*-\([0-9]*\)[^-]*$$/0\1/ ; s/^.*\(..\)$$/\1/') DEBIAN_DATE := $(shell echo $(DEBIAN_VERSION) | sed 's/^.*cvs\([0-9]*\).*$$/\1/') DEBIAN_MOZ_UPSTREAM_VERSION := $(shell dpkg-parsechangelog | sed -n 's/^Version: \([0-9.]*\).*$$/\1/ p') DEBIAN_MOZ_SOURCE_VERSION := $(shell echo $(DEBIAN_VERSION) | sed 's/^\(.*\)-[^-]*$$/\1/') DEBIAN_MOZ_APPLICATION := $(shell dpkg-parsechangelog | sed -n 's/Source: \(.*\)$$/\1/ p') DEBIAN_MOZ_UPSTREAM_APPLICATION ?= sunbird DEB_TAR_SRCDIR := mozilla ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) OPTFLAGS = -O0 else OPTFLAGS = -O2 -fno-strict-aliasing endif OPTFLAGS += -g #DEB_AUTO_UPDATE_DEBIAN_CONTROL=1 #DEB_AUTO_UPDATE_AUTOCONF=2.13 DEB_DH_INSTALL_ARGS_sunbird := -Xgnome -Ximgicon -Xmozlibthai DEB_DH_INSTALL_ARGS_sunbird-dev := include /usr/share/cdbs/1/rules/tarball.mk include $(CURDIR)/debian/cdbs-rules/debhelper.mk include /usr/share/cdbs/1/rules/patchsys-quilt.mk include /usr/share/cdbs/1/class/autotools.mk export BUILD_OFFICIAL=1 export MOZILLA_OFFICIAL=1 DEB_CONFIGURE_USER_FLAGS= \ --enable-application=calendar \ --enable-plaintext-editor-only \ --enable-necko-protocols=about,http,ftp,file,jar,res \ --enable-storage \ --enable-svg-renderer=cairo \ --disable-accessibility \ --disable-activex \ --disable-activex-scripting \ --disable-installer \ --disable-jsd \ --disable-necko-disk-cache \ --disable-oji \ --disable-view-source \ --disable-logging \ --disable-plugins \ --disable-cookies \ --disable-strip \ --disable-xprint \ --disable-strip-libs \ --disable-updater \ --enable-default-toolkit=gtk2 \ --disable-freetype2 \ --disable-elf-dynstr-gc \ --disable-gtktest \ --disable-installer \ --disable-ldap \ --disable-mailnews \ --disable-profilesharing \ --disable-tests \ --disable-updater \ --with-default-mozilla-five-home=/usr/lib/sunbird \ --with-system-mng=/usr \ --with-system-png=/usr \ --with-system-jpeg=/usr \ --with-system-zlib=/usr \ --enable-extensions=default \ --disable-debug \ --enable-optimize="-pipe -w $(OPTFLAGS)" \ --with-system-nspr \ --with-system-nss \ --enable-pango \ --enable-postscript \ --enable-xft \ --enable-xinerama \ --enable-gnomevfs \ --enable-libthai \ --enable-canvas \ --with-distribution-id=com.ubuntu \ --enable-single-profile \ --enable-mathml \ --enable-svg \ --enable-system-cairo \ --enable-official-branding UUDECODE = \ debsearch.gif \ wikipedia.gif \ $(NULL) pre-build:: set -e; for i in $(UUDECODE); do \ uudecode -o debian/$$i debian/$$i.uu; \ done; gcc -o debian/build-tools/obscure-tool debian/build-tools/obscure.c; \ debian/build-tools/obscure-tool debian/sunbird.cfg.source debian/sunbird.cfg clean:: set -e; for i in $(UUDECODE); do \ rm -f debian/$$i; \ done; rm -f debian/build-tools/obscure-tool; rm -f debian/sunbird.cfg common-install-arch:: common-install-impl set -e; . /etc/lsb-release; export DISTRIB_ID DISTRIB_RELEASE DISTRIB_CODENAME; $(CURDIR)/build-tree/mozilla/config/preprocessor.pl -E < $(CURDIR)/debian/vendor.js.in > $(CURDIR)/debian/tmp/usr/lib/sunbird/defaults/pref/vendor.js set -e; /usr/bin/convert -resize 48x48 $(CURDIR)/debian/tmp/usr/lib/sunbird/icons/mozicon128.png $(CURDIR)/debian/tmp/usr/lib/sunbird/icons/mozicon50.png $(CURDIR)/../$(DEBIAN_MOZ_APPLICATION)_$(DEBIAN_MOZ_SOURCE_VERSION).orig.tar.gz: $(DEBIAN_MOZ_UPSTREAM_APPLICATION)-$(DEBIAN_MOZ_UPSTREAM_VERSION)-source.tar.bz2 set -e; rm -rf $(DEBIAN_MOZ_APPLICATION)-$(DEBIAN_MOZ_SOURCE_VERSION); \ mkdir $(DEBIAN_MOZ_APPLICATION)-$(DEBIAN_MOZ_SOURCE_VERSION); \ cp $^ $(DEBIAN_MOZ_APPLICATION)-$(DEBIAN_MOZ_SOURCE_VERSION)/; \ tar cvzf $@ $(DEBIAN_MOZ_APPLICATION)-$(DEBIAN_MOZ_SOURCE_VERSION)/$^ ; \ rm -rf $(DEBIAN_MOZ_APPLICATION)-$(DEBIAN_MOZ_SOURCE_VERSION) update-orig: $(CURDIR)/../$(DEBIAN_MOZ_APPLICATION)_$(DEBIAN_MOZ_SOURCE_VERSION).orig.tar.gz echox: set -e; echo DEBIAN_MOZ_APPLICATION = $(DEBIAN_MOZ_APPLICATION); \ echo DEBIAN_MOZ_SOURCE_VERSION = $(DEBIAN_MOZ_SOURCE_VERSION) CFLAGS = CXXFLAGS =