~ubuntu-branches/ubuntu/trusty/rasmol/trusty

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Teemu Ikonen
  • Date: 2009-06-03 20:06:55 UTC
  • Revision ID: james.westby@ubuntu.com-20090603200655-e0hx71pp0urhb3k1
Tags: 2.7.4.2-4
* Increase debhelper compat to 7, build-dep on the same
* rules: Rewrite and simplify using dh. Allow building GTK and
  X11 versions separately for testing
* Add a bash_completion file
* Merge patch insvn/gtk-shortcuts: Add various keyboard shortcuts
  to the GTK interface
* Merge insvn/fileopen:
  - Add support for opening more than one file from the command
    line. (closes: #498261)
  - Fix reading files from stdin with '-' arg.
* Merge insvn/switches:
  - Fix crashing of the GTK version when trying to output errors
    before initialising GUI (closes: #498261)
  - Accept options prefixed either with a single or double dash.
  - New command line options:
      -colour / color: Set default colour of a new molecule.
      -wireframe, -backbone, -sticks, -spacefill, -spheres, -ballstick,
          -ribbons, -strands, -cartoons: Set default representation
          of a new molecule.
  - New command line options in GTK version:
      -prompt, -noprompt, -scrolls, -noscrolls, -menus, -nomenus,
      -fullscreen: Set ui elements present after startup.
* Merge insvn/vte-text-output: Write all text output through
  WriteChar() and WriteString().
* Use direct VTE feeding with text output in GTK version,
  instead of PTYs
* Make Delete key work and ignore unhandled terminal escape sequences.
* Fixed debian/watch file, thanks to Daniel Leidert (closes: #520524)
* Add an application icon to the GTK version
* Fix recent files support in GTK version
* Show file name in title, if the file does not have a PDB code
* rasmol.h: Use C99 exact-width ints in some typedefs. Closes LP: #349585
* Imakefile: Build with -Wall
* Fix the Exec field in .desktop files to correctly handle multi-argument
  binaries, also add chemical/x-xyz mime-type

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/make -f
2
2
 
3
 
# Uncomment this to turn on verbose mode.
4
 
#export DH_VERBOSE=1
5
 
 
6
 
# This has to be exported to make some magic below work.
7
 
export DH_OPTIONS
8
 
 
9
3
CFLAGS = -Wall -g
10
 
SRC = src
11
 
DOC = doc
12
4
 
13
5
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
14
6
        CFLAGS += -O0
16
8
        CFLAGS += -O2
17
9
endif
18
10
 
19
 
configure: configure-stamp
20
 
configure-stamp:
21
 
        dh_testdir
22
 
        # Add here commands to configure the package.
23
 
        touch configure-stamp
24
 
 
25
 
#Architecture
 
11
build-gtk: src/rasmol-gtk
 
12
src/rasmol-gtk:
 
13
        dh_testdir
 
14
        cd $(CURDIR)/src ; xmkmf -DGTKWIN ; cd $(CURDIR)
 
15
        $(MAKE) -C src clean;
 
16
        $(MAKE) -C src
 
17
        mv src/rasmol src/rasmol-gtk
 
18
 
 
19
build-x11: src/rasmol.8 src/rasmol.16 src/rasmol.32
 
20
 
 
21
src/rasmol.8:
 
22
        dh_testdir
 
23
        cd $(CURDIR)/src ; xmkmf -DX11WIN ; cd $(CURDIR)
 
24
        $(MAKE) -C src clean;
 
25
        $(MAKE) -C src DEPTHDEF=-DEIGHTBIT=1 rasmol
 
26
        mv src/rasmol src/rasmol.8
 
27
 
 
28
src/rasmol.16:
 
29
        dh_testdir
 
30
        cd $(CURDIR)/src ; xmkmf -DX11WIN ; cd $(CURDIR)
 
31
        $(MAKE) -C src clean;
 
32
        $(MAKE) -C src DEPTHDEF=-DSIXTEENBIT=1 rasmol
 
33
        mv src/rasmol src/rasmol.16
 
34
 
 
35
src/rasmol.32:
 
36
        dh_testdir
 
37
        cd $(CURDIR)/src ; xmkmf -DX11WIN ; cd $(CURDIR)
 
38
        $(MAKE) -C src clean;
 
39
        $(MAKE) -C src DEPTHDEF=-DTHIRTYTWOBIT=1 rasmol
 
40
        mv src/rasmol src/rasmol.32
 
41
 
 
42
build-arch: build-gtk build-x11
 
43
 
 
44
build-indep:
 
45
        dh_testdir
 
46
        zcat doc/manualA4.pdf.gz > manualA4.pdf
 
47
        zcat doc/refcardA4.pdf.gz > refcardA4.pdf
 
48
 
26
49
build: build-arch build-indep
27
50
 
28
 
build-arch: build-arch-stamp
29
 
build-arch-stamp: configure-stamp
30
 
        # Add here commands to compile the arch part of the package.
31
 
        dh_testdir
32
 
 
33
 
        zcat $(DOC)/manualA4.pdf.gz > manualA4.pdf
34
 
        zcat $(DOC)/refcardA4.pdf.gz > refcardA4.pdf
35
 
 
36
 
        cd $(CURDIR)/src ; xmkmf -DGTKWIN ; cd $(CURDIR)
37
 
        $(MAKE) -C $(SRC) gtkui.h
38
 
        $(MAKE) -C $(SRC) DEPTHDEF=-DTHIRTYTWOBIT=1 rasmol
39
 
        mv $(SRC)/rasmol $(SRC)/rasmol-gtk
40
 
        $(MAKE) -C $(SRC) clean;
41
 
 
42
 
        cd $(CURDIR)/src ; xmkmf -DX11WIN ; cd $(CURDIR)
43
 
        $(MAKE) -C $(SRC) DEPTHDEF=-DEIGHTBIT=1 rasmol
44
 
        mv $(SRC)/rasmol $(SRC)/rasmol.8
45
 
        $(MAKE) -C $(SRC) clean;
46
 
        
47
 
        $(MAKE) -C $(SRC) DEPTHDEF=-DSIXTEENBIT=1 rasmol
48
 
        mv $(SRC)/rasmol $(SRC)/rasmol.16
49
 
        $(MAKE) -C $(SRC) clean;
50
 
        
51
 
        $(MAKE) -C $(SRC) DEPTHDEF=-DTHIRTYTWOBIT=1 rasmol
52
 
        mv $(SRC)/rasmol $(SRC)/rasmol.32
53
 
        
54
 
        touch build-arch-stamp
55
 
 
56
 
build-indep: build-indep-stamp
57
 
build-indep-stamp: configure-stamp
58
 
        # Add here commands to compile the indep part of the package.
59
 
        touch build-indep-stamp
60
 
 
61
51
clean:
62
52
        dh_testdir
63
53
        dh_testroot
64
 
        rm -f build-arch-stamp build-indep-stamp configure-stamp
65
 
 
66
 
        # Add here commands to clean up after the build process.
67
 
        if [ -f src/Makefile ] ; then $(MAKE) -C $(SRC) distclean ; fi
68
 
        -rm -f $(SRC)/rasmol-gtk $(SRC)/rasmol.32 $(SRC)/rasmol.16 $(SRC)/rasmol.8
69
 
        -rm -f $(SRC)/gtkui.h
 
54
        if [ -f src/Makefile ] ; then $(MAKE) -C src distclean ; fi
 
55
        -rm -f src/rasmol-gtk src/rasmol.32 src/rasmol.16 src/rasmol.8
 
56
        -rm -f src/gtkui.h
70
57
        -rm -f manualA4.pdf refcardA4.pdf
71
 
        dh_clean  --exclude ./src/mswin31.c.orig
72
 
 
73
 
install: install-indep install-arch
74
 
install-indep:
75
 
        dh_testdir
76
 
        dh_testroot
77
 
        dh_clean -k -i  --exclude ./src/mswin31.c.orig
78
 
        dh_installdirs -i
79
 
        dh_installman ## -prasmol -A $(DOC)/rasmol.1
80
 
        dh_install -i
81
 
 
82
 
install-arch:
83
 
        dh_testdir
84
 
        dh_testroot
85
 
        dh_clean -k  --exclude ./src/mswin31.c.orig
86
 
        dh_installdirs -s
87
 
        dh_install -a
88
 
        dh_installman
89
 
        dh_link
 
58
        dh clean
 
59
 
 
60
install:
 
61
        dh install --before dh_installchangelogs
 
62
        dh_installchangelogs ChangeLog.txt
 
63
        dh install --before dh_compress
 
64
        dh_compress -X.pdf
 
65
        dh install --after dh_compress
90
66
        install -D -m 755 debian/rasmol-classic.sh.debian \
91
 
                $(CURDIR)/debian/rasmol/usr/bin/rasmol-classic
92
 
 
93
 
# Must not depend on anything. This is to be called by
94
 
# binary-arch/binary-indep
95
 
# in another 'make' thread.
96
 
binary-common:
97
 
        dh_testdir
98
 
        dh_testroot
99
 
        dh_installchangelogs -k ChangeLog.html
100
 
        dh_installdocs
101
 
        dh_installexamples
102
 
        dh_installmenu
103
 
        dh_installmime
104
 
        dh_installman
105
 
        dh_desktop
106
 
        dh_link
107
 
        dh_strip
108
 
        dh_compress -X.pdf 
109
 
        dh_fixperms
110
 
        dh_makeshlibs
111
 
        dh_installdeb
112
 
        dh_shlibdeps
113
 
        dh_gencontrol
114
 
        dh_md5sums
115
 
        dh_builddeb
116
 
 
117
 
# Build architecture independant packages using the common target.
118
 
binary-indep: build-indep install-indep
119
 
        $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
120
 
 
121
 
# Build architecture dependant packages using the common target.
122
 
binary-arch: build-arch install-arch
123
 
        $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
 
67
               $(CURDIR)/debian/rasmol/usr/bin/rasmol-classic
 
68
        install -D -m u=rw,go=r debian/rasmol.bash_completion \
 
69
               $(CURDIR)/debian/rasmol/etc/bash_completion.d/rasmol
 
70
 
 
71
binary-indep: build install
 
72
        dh binary-indep
 
73
 
 
74
binary-arch: build install
 
75
        dh binary-arch
124
76
 
125
77
binary: binary-arch binary-indep
126
 
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure
 
78
.PHONY: build build-arch build-indep build-gtk build-x11 clean binary-indep binary-arch binary install