1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
|
#!/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 ?= lightning-sunbird
DEB_TAR_SRCDIR := mozilla
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
OPTFLAGS = --disable-optimize
else
OPTFLAGS = --enable-optimize
endif
# we are modern and build with 4.2 everywhere
#DEB_AUTO_UPDATE_DEBIAN_CONTROL=1
#DEB_AUTO_UPDATE_AUTOCONF=2.13
DEB_DH_INSTALL_ARGS_iceowl := -Xgnome -Ximgicon -Xmozlibthai
DEB_DH_INSTALL_ARGS_iceowl-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
ifneq (,$(findstring s390,$(DEB_HOST_GNU_TYPE)))
export FORCE_USE_HOST_OS=1
endif
DEB_CONFIGURE_USER_FLAGS= \
--host=$(DEB_HOST_GNU_TYPE) \
--enable-application=calendar \
--disable-strip \
--disable-strip-libs \
--enable-default-toolkit=gtk2 \
--with-default-mozilla-five-home=/usr/lib/iceowl \
--with-system-mng=/usr \
--with-system-png=/usr \
--with-system-jpeg=/usr \
--with-system-zlib=/usr \
$(OPTFLAGS) \
--enable-extensions=default,lightning,pref,auth \
--with-system-nspr \
--with-system-nss \
--enable-postscript \
--enable-gnomevfs \
--enable-libthai \
--enable-system-cairo \
--disable-debug \
--with-distribution-id=com.ubuntu
UUDECODE = \
debsearch.gif \
wikipedia.gif \
$(NULL)
common-install-arch::
set -e; mkdir -p debian/iceowl-extension/usr/lib/iceowl-extension; \
sh -c "set -e; cd debian/iceowl-extension/usr/lib/iceowl-extension/; unzip $(CURDIR)/build-tree/mozilla/dist/xpi-stage/lightning.xpi"
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/iceowl.cfg.source debian/iceowl.cfg
clean::
set -e; for i in $(UUDECODE); do \
rm -f debian/$$i; \
done; rm -f debian/build-tools/obscure-tool;
rm -f debian/iceowl.cfg
common-install-arch:: common-install-impl
set -e; \
DISTRIB_ID="`lsb_release --id -s`" \
DISTRIB_RELEASE="`lsb_release --release -s`" \
DISTRIB_CODENAME="`lsb_release --codename`" \
$(CURDIR)/build-tree/mozilla/config/preprocessor.pl -E < \
$(CURDIR)/debian/vendor.js.in > \
$(CURDIR)/debian/tmp/usr/lib/iceowl/defaults/pref/vendor.js
set -e; /usr/bin/convert -resize 48x48 $(CURDIR)/debian/tmp/usr/lib/iceowl/icons/mozicon128.png $(CURDIR)/debian/tmp/usr/lib/iceowl/icons/mozicon50.png
touch $(CURDIR)/debian/tmp/usr/lib/iceowl/extensions/\{e2fda1a4-762b-4020-b5ad-a41df1933103\}/chrome.manifest
$(DEBIAN_MOZ_APPLICATION)-$(DEBIAN_MOZ_UPSTREAM_VERSION)-source.tar.bz2: $(DEBIAN_MOZ_UPSTREAM_APPLICATION)-$(DEBIAN_MOZ_UPSTREAM_VERSION)-source.tar.bz2
set -e; rm -rf tmp1; mkdir tmp1; tar -C tmp1/ -x -j -f $^
set -e; cd tmp1/*; sh ../../debian/remove.nonfree
set -e; tar -C tmp1/ -c -j -f $@ .; rm -rf tmp1/
$(CURDIR)/../$(DEBIAN_MOZ_APPLICATION)_$(DEBIAN_MOZ_SOURCE_VERSION).orig.tar.gz: $(DEBIAN_MOZ_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=-g
CXXFLAGS=-g
export CFLAGS CXXFLAGS
|