source: git/debian/rules @ bc59149

RELEASE/1.1RELEASE/1.2debug-cidebug-ci-sanitisersstereowalls-datawalls-data-hanging-as-warning
Last change on this file since bc59149 was bc59149, checked in by Olly Betts <olly@…>, 14 years ago

Update packaging for 1.1.3.

git-svn-id: file:///home/survex-svn/survex/branches/survex-1_1@3436 4b37db11-9a0c-4f06-9ece-9ab7cdaee568

  • Property mode set to 100755
File size: 3.2 KB
RevLine 
[70d428e]1#!/usr/bin/make -f
[a061c14a]2# Based on public domain debhelper example rules.multi2 by Joey Hess.
[b462168]3#
[bc59149]4# Copyright (C) 2005,2006,2010 Olly Betts
[70d428e]5#
[a061c14a]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.
[70d428e]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
[b462168]17ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
18CFLAGS += -O0
[a061c14a]19CXXFLAGS += -O0
[b462168]20else
21CFLAGS += -O2
[a061c14a]22CXXFLAGS += -O2
[b462168]23endif
24ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
[a061c14a]25STRIP=/bin/true
[b462168]26endif
[bc59149]27ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
28NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
29MAKEFLAGS += -j$(NUMJOBS)
30endif
[b462168]31
[bc59149]32ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
33# Disable the testsuite when cross-compiling.
34DEB_BUILD_OPTIONS += nocheck
35endif
[a061c14a]36
[70d428e]37build: build-stamp
38build-stamp:
39        dh_testdir
40
[bc59149]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)"
[70d428e]48        $(MAKE)
[bc59149]49ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
50        $(MAKE) check DISPLAY=
[7ad2d31]51endif
[70d428e]52        touch build-stamp
53
54clean:
55        dh_testdir
56        dh_testroot
57
[bc59149]58        [ ! -f Makefile ] || $(MAKE) distclean
[70d428e]59
[bc59149]60        rm -f config.sub config.guess
[70d428e]61        dh_clean
62
63install: DH_OPTIONS=
64install: build
65        dh_testdir
66        dh_testroot
[bc59149]67        dh_prep
[70d428e]68        dh_installdirs
69
[a061c14a]70        $(MAKE) DESTDIR=`pwd`/debian/tmp install
[bc59149]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
[70d428e]77
[a061c14a]78        dh_install --fail-missing
[70d428e]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.
[a061c14a]84binary-common:
[70d428e]85        dh_testdir
86        dh_testroot
[a061c14a]87        dh_installchangelogs
[70d428e]88        dh_installdocs
89        dh_installexamples
90        dh_installmenu
[a061c14a]91# FIXME: investigate using dh_installmime
[70d428e]92#       dh_installmime
93        dh_strip
[a061c14a]94        dh_link
[70d428e]95        dh_compress
96        dh_fixperms
97        dh_installdeb
98        dh_shlibdeps
99        dh_gencontrol
100        dh_md5sums
101        dh_builddeb
102
[a061c14a]103# Build architecture independent packages using the common target.
104binary-indep: build install
[34c131f]105        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
[70d428e]106
107# Build architecture dependant packages using the common target.
[a061c14a]108binary-arch: build install
[70d428e]109        $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
110
111# Any other binary targets build just one binary package at a time.
112binary-%: build install
113        make -f debian/rules binary-common DH_OPTIONS=-p$*
114
[a061c14a]115binary: binary-indep binary-arch
116.PHONY: build clean binary-indep binary-arch binary-common binary install
Note: See TracBrowser for help on using the repository browser.