source: git/debian/rules @ 0ed1981

RELEASE/1.2debug-cidebug-ci-sanitisersstereowalls-data
Last change on this file since 0ed1981 was 92c8fce, checked in by Olly Betts <olly@…>, 14 years ago

debian/survex-aven.lintian-overrides: The warning for the misspelling of
"reencode" is incorrect - it's a PostScript? command in this context.

git-svn-id: file:///home/survex-svn/survex/trunk@3456 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

  • Property mode set to 100755
File size: 3.2 KB
Line 
1#!/usr/bin/make -f
2# Based on public domain debhelper example rules.multi2 by Joey Hess.
3#
4# Copyright (C) 2005,2006,2010 Olly Betts
5#
6# GPL licensed.
7#
8# This is a multibinary package.  You can build any of the binary packages
9# independently by using the appropriate binary-<package> target.
10
11# Uncomment this to turn on verbose mode.
12#export DH_VERBOSE=1
13
14# This has to be exported to make some magic below work.
15export DH_OPTIONS
16
17ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
18CFLAGS += -O0
19CXXFLAGS += -O0
20else
21CFLAGS += -O2
22CXXFLAGS += -O2
23endif
24ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
25STRIP=/bin/true
26endif
27ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
28NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
29MAKEFLAGS += -j$(NUMJOBS)
30endif
31
32ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
33# Disable the testsuite when cross-compiling.
34DEB_BUILD_OPTIONS += nocheck
35endif
36
37build: build-stamp
38build-stamp:
39        dh_testdir
40
41        # Use the latest config.sub and config.guess from the autotools-dev
42        # package.
43        rm -f config.sub config.guess
44        ln -s /usr/share/misc/config.sub config.sub
45        ln -s /usr/share/misc/config.guess config.guess
46
47        ./configure --prefix=/usr --mandir=\$${prefix}/share/man --enable-docdir=\$${prefix}/share/doc/survex CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" STRIP="$(STRIP)"
48        $(MAKE)
49ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
50        $(MAKE) check DISPLAY=
51endif
52        touch build-stamp
53
54clean:
55        dh_testdir
56        dh_testroot
57
58        [ ! -f Makefile ] || $(MAKE) distclean
59
60        rm -f config.sub config.guess
61        dh_clean
62
63install: DH_OPTIONS=
64install: build
65        dh_testdir
66        dh_testroot
67        dh_prep
68        dh_installdirs
69
70        $(MAKE) DESTDIR=`pwd`/debian/tmp install
71        install -d debian/survex/usr/share/vim/addons/ftdetect
72        install -d debian/survex/usr/share/vim/addons/syntax
73        install -d debian/survex/usr/share/vim/registry
74        install -m 0644 vim/ftdetect/survex.vim debian/survex/usr/share/vim/addons/ftdetect
75        install -m 0644 vim/syntax/survex.vim debian/survex/usr/share/vim/addons/syntax
76        install -m 0644 debian/vim-survex.yaml debian/survex/usr/share/vim/registry
77
78        dh_install --fail-missing
79
80# This single target is used to build all the packages, all at once, or
81# one at a time. So keep in mind: any options passed to commands here will
82# affect _all_ packages. Anything you want to only affect one package
83# should be put in another target, such as the install target.
84binary-common:
85        dh_testdir
86        dh_testroot
87        dh_installchangelogs
88        dh_installdocs
89        dh_installexamples
90        dh_installmenu
91# FIXME: investigate using dh_installmime
92#       dh_installmime
93        dh_lintian
94        dh_strip
95        dh_link
96        dh_compress
97        dh_fixperms
98        dh_installdeb
99        dh_shlibdeps
100        dh_gencontrol
101        dh_md5sums
102        dh_builddeb
103
104# Build architecture independent packages using the common target.
105binary-indep: build install
106        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
107
108# Build architecture dependant packages using the common target.
109binary-arch: build install
110        $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
111
112# Any other binary targets build just one binary package at a time.
113binary-%: build install
114        make -f debian/rules binary-common DH_OPTIONS=-p$*
115
116binary: binary-indep binary-arch
117.PHONY: build clean binary-indep binary-arch binary-common binary install
Note: See TracBrowser for help on using the repository browser.