Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / build / package / debian / rules
blob3b2262e6565565be8a47bd5faa48fddb7046e27c
1 #!/usr/bin/make -f
2 # Derived from debhelper/dh_make example.
4 #export DH_VERBOSE=1
6 # Set by configure (plus USE_AUTOCONF=1), but useful for NSPR
7 export MOZILLA_CLIENT=1
8 export BUILD_OPT=1
9 export NO_STATIC_LIB=1
10 # untested upstream - export USE_IPV6=$(shell cpp debian/testipv6 | sh -)
11 export USE_PTHREADS=1
13 nspr = libnspr3
14 nsprdev = libnspr3-dev
15 mailnews = mozilla-mailnews
16 editor = mozilla-editor
17 TOP=..
19 build: build-stamp
20 build-stamp:
21 dh_testdir
23 test -d build-nspr || mkdir build-nspr
24 test -s build-nspr/lib/$(nspr).so || $(MAKE) -C nsprpub DIST=`pwd`/build-nspr
26 test -d obj-`./build/autoconf/config.guess` || mkdir obj-`./build/autoconf/config.guess`
27 cd obj-`./build/autoconf/config.guess` && \
28 LD_LIBRARY_PATH=`cd ..;pwd`/build-nspr/lib \
29 $(TOP)/configure --verbose --prefix=/usr \
30 --disable-debug --disable-profile --disable-crypto \
31 --disable-netcast --disable-java --disable-oji --disable-static \
32 --disable-tests --disable-smart-mail --enable-mailnews \
33 --enable-editor --enable-ldap --enable-optimize --with-pthreads \
34 --with-jpeg=/usr/include --with-png=/usr/include \
35 --with-zlib=/usr/include --with-nspr=`cd $(TOP);pwd`/build-nspr
36 cd obj-`./build/autoconf/config.guess` && LD_LIBRARY_PATH=`cd $(TOP);pwd`/build-nspr/lib $(MAKE)
38 touch build-stamp
40 clean:
41 dh_testdir
42 dh_testroot
43 rm -f build-stamp install-stamp
45 -cd nsprpub ; $(MAKE) realclean
46 rm -rf build-nspr obj-`./build/autoconf/config.guess`
47 # find . -type f -name Makefile ! -path '*nsprpub*' | xargs -r rm
49 dh_clean
51 install: install-stamp
52 install-stamp: build-stamp
53 dh_testdir
54 dh_testroot
55 dh_clean -k
56 dh_installdirs -a
58 cp -pR build-nspr/lib/*.so* `pwd`/debian/$(nspr)/usr/lib
59 cd `pwd`/debian/$(nspr)/usr/lib ; /sbin/ldconfig -n .
60 # cd `pwd`/debian/$(nspr)/usr/lib ; for i in * ; do ln -s $$i $$i.0 ; done
62 cp -pR build-nspr/include/* `pwd`/debian/$(nsprdev)/usr/include/nspr
63 cp -pR build-nspr/lib/*.a `pwd`/debian/$(nsprdev)/usr/lib
65 # this may fail, but who cares
66 -cp -pR obj-`./build/autoconf/config.guess`/dist/bin/* `pwd`/debian/tmp/usr/lib/mozilla
67 install -m 755 `pwd`/debian/runner `pwd`/debian/tmp/usr/bin/mozilla
69 # # Okay, lets move a bunch of mail-news stuff to its own place
70 # Note: We have to cd and set sourcedir because the debian directory
71 # now lives in mozilla/build/package and dh_movefiles won't work
72 # across the symlink.
73 cd `pwd`/build/package; \
74 dh_movefiles --sourcedir=debian/tmp -a
76 touch install-stamp
78 binary-indep: build
79 # We have nothing to do by default, no architecture-independent files here.
81 binary-arch: build install
82 dh_testdir -a
83 dh_testroot -a
84 cd debian/ ; cat copyright.short > copyright
85 cat LICENSE >> debian/copyright
86 dh_installdocs -pmozilla LEGAL
87 dh_installdocs -p$(nspr)
88 dh_installmime -pmozilla
89 rm debian/copyright
90 # dh_installexamples `find -name '*.ad'`
91 dh_installmenu -pmozilla
92 # Running this is a baaad idea.
93 # dh_installmanpages
94 dh_undocumented -pmozilla mozilla.1
95 dh_installchangelogs -pmozilla
96 dh_installchangelogs -p$(nspr)
97 cd `pwd`/debian/$(nsprdev)/usr/doc ; ln -s /usr/doc/$(nspr) ./$(nsprdev)
98 cd `pwd`/debian/$(mailnews)/usr/doc ; ln -s /usr/doc/mozilla ./$(mailnews)
99 cd `pwd`/debian/$(editor)/usr/doc ; ln -s /usr/doc/mozilla ./$(editor)
100 dh_strip -a
101 dh_compress -a
102 dh_fixperms -a
103 dh_installdeb -a
104 cd debian ; cat $(nspr).shlibs > shlibs.local
105 env LD_LIBRARY_PATH=`pwd`/debian/$(nspr)/usr/lib:`pwd`/debian/tmp/usr/lib/mozilla \
106 dh_shlibdeps -pmozilla -plibnspr3 -p$(mailnews) -p$(editor)
107 rm -f debian/shlibs.local
108 dh_gencontrol -a
109 dh_md5sums -a
110 dh_builddeb -a
112 source diff:
113 @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
115 binary: binary-indep binary-arch
117 .PHONY: build clean binary-indep binary-arch binary # quicktest make