~ubuntu-branches/ubuntu/wily/dicomnifti/wily

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Michael Hanke
  • Date: 2010-07-20 17:12:46 UTC
  • mfrom: (3.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100720171246-wi2sx7ote9zfytg2
Tags: 2.28.14-2
* Changed maintainer to NeuroDebian Team.
* Switch from plain debhelper to 'dh'.
* Convert source package format to 3.0 (quilt).
* Bumped Standards-version to 3.9.0, no changes necessary.
* Add patch to prevent unnecessary package dependency in zlib.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
2
# -*- makefile -*-
3
3
 
4
 
# Uncomment this to turn on verbose mode.
5
 
#export DH_VERBOSE=1
6
 
 
7
 
# path where binaries are built
8
 
pkg_buildpath=$(CURDIR)/build
9
 
 
10
 
# default compiler flags
11
 
CXXFLAGS = -Wall -g
12
 
 
13
 
# ease debugging
14
 
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
15
 
        CXXFLAGS += -O0
16
 
else
17
 
        CXXFLAGS += -O2
18
 
endif
19
 
 
20
4
# default CMake flags:
21
5
# set manpage install dir to temp directory -- manpages will be installed
22
6
# by dh_installman
23
 
CMAKE_FLAGS = -DCMAKE_CXX_FLAGS:STRING="$(CXXFLAGS)" \
24
 
              -DCMAKE_INSTALL_PREFIX:PATH=/usr \
25
 
              -DDINIFTI_MAN_DIR:PATH=../../tmp/manpages
26
 
 
27
 
 
28
 
configure: configure-stamp
29
 
configure-stamp:
30
 
        dh_testdir
31
 
        # Add here commands to configure the package.
32
 
 
33
 
        if [ ! -d $(pkg_buildpath) ]; then mkdir $(pkg_buildpath); fi
34
 
        cd $(pkg_buildpath) && cmake .. $(CMAKE_FLAGS)
35
 
 
36
 
        touch configure-stamp
37
 
 
38
 
 
39
 
build: build-stamp
40
 
build-stamp: configure
41
 
        dh_testdir
42
 
        # Add here commands to compile the package.
43
 
 
44
 
        cd $(pkg_buildpath) && $(MAKE) VERBOSE=1
45
 
 
46
 
        touch build-stamp
47
 
 
48
 
clean:
49
 
        dh_testdir
50
 
        dh_testroot
51
 
        rm -f build-stamp configure-stamp
52
 
 
53
 
        -rm -rf $(pkg_buildpath)
54
 
 
55
 
        dh_clean
56
 
 
57
 
install: build
58
 
        dh_testdir
59
 
        dh_testroot
60
 
        dh_clean -k
61
 
        dh_installdirs
62
 
 
63
 
        # Add here commands to install the package into debian/dicomnifti.
64
 
        cd $(pkg_buildpath) && $(MAKE) install DESTDIR=$(CURDIR)/debian/dicomnifti
65
 
 
66
 
 
67
 
# Build architecture-independent files here.
68
 
binary-indep: install
69
 
# We have nothing to do by default.
70
 
 
71
 
# Build architecture-dependent files here.
72
 
binary-arch: install
73
 
        dh_testdir
74
 
        dh_testroot
75
 
        dh_installchangelogs
76
 
        dh_installdocs
77
 
        dh_installman
78
 
        dh_link
79
 
        dh_strip
80
 
        dh_compress
81
 
        dh_fixperms
82
 
        dh_installdeb
83
 
        dh_shlibdeps
84
 
        dh_gencontrol
85
 
        dh_md5sums
86
 
        dh_builddeb
87
 
 
88
 
binary: binary-indep binary-arch
89
 
.PHONY: build clean binary-indep binary-arch binary install configure
 
7
CMAKE_FLAGS = -DDINIFTI_MAN_DIR:PATH=../../tmp/manpages
 
8
 
 
9
# one ring to rule them all ...
 
10
%:
 
11
        dh $@ --buildsystem=cmake
 
12
 
 
13
override_dh_auto_configure:
 
14
        dh_auto_configure -- $(CMAKE_FLAGS)