/[ascend]/trunk/debian/rules
ViewVC logotype

Contents of /trunk/debian/rules

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2328 - (show annotations) (download)
Wed Dec 22 07:24:22 2010 UTC (9 years, 7 months ago) by jpye
File size: 4269 byte(s)
Fix some ignore-paths for the tarball.
Add support for parallel build via dpkg.
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3
4 CFLAGS = -Wall -g
5
6 SCONS_OPTIONS = CC="ccache gcc" \
7 CXX="ccache g++" \
8 ABSOLUTE_PATHS=1 \
9 INSTALL_PREFIX=/usr \
10 WITH_DOC_BUILD=0 \
11 WITH_DOC_INSTALL=1 \
12 F2C_LIB=gfortran \
13 FORTRAN=gfortran \
14 WITH_SOLVERS=CMSLV,CONOPT,DOPRI5,IDA,LRSLV,LSODE,QRSLV,IPOPT
15
16 # F2C_LIBPATH=/usr/lib/gcc/i486-linux-gnu/4.2.1/ \
17
18 SCONS= scons $(SCONS_OPTIONS)
19
20 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
21 CFLAGS += -O0
22 else
23 CFLAGS += -O2
24 endif
25
26 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
27 INSTALL_PROGRAM += -s
28 endif
29
30 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
31 NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
32 SCONS_OPTIONS += -j$(NUMJOBS)
33 endif
34
35 # shared library versions, option 1
36 major=0
37
38 INSTALLROOT=$(CURDIR)/debian/tmp
39 DATADIR=$(INSTALLROOT)/usr/share
40
41 GTKSOURCEVIEW=gtksourceview-2.0
42 GTKSOURCEVIEWLANGS=$(DATADIR)/$(GTKSOURCEVIEW)/language-specs
43
44 build: build-stamp
45 build-stamp:
46 dh_testdir
47 cd $(CURDIR) && $(SCONS) libascend tcltk pygtk models
48 touch build-stamp
49
50 clean:
51 dh_testdir
52 rm -f build-stamp
53 dh_clean
54 $(SCONS) -c
55 rm -rf .scon*
56 rm scons/*.pyc
57
58 install: build
59 dh_testdir
60 # dh_testroot
61 dh_clean -k
62 dh_installdirs
63 mkdir -p $(INSTALLROOT)/usr
64 cd $(CURDIR) && $(SCONS) INSTALL_ROOT=$(INSTALLROOT) install
65 #
66 cd $(CURDIR)/pygtk/gnome && \
67 install -m 644 -D ascend.desktop $(DATADIR)/applications/ascend.desktop && \
68 install -m 644 -D ascend.png $(DATADIR)/icons/ascend-app.png && \
69 install -m 644 -D ascend.png $(DATADIR)/icons/hicolor/64x64/ascend.png && \
70 install -m 644 -D ascend.xml $(DATADIR)/mime/packages/ascend.xml
71 #
72 # file-type icon for ascend models (double click should open in ASCEND)
73 cd $(CURDIR)/pygtk/glade && \
74 install -m 644 -D ascend-doc-48x48.svg $(DATADIR)/icons/hicolor/scalable/mimetypes/text-x-ascend-model.svg && \
75 install -m 644 -D ascend-doc-16x16.png $(DATADIR)/icons/hicolor/16x16/mimetypes/text-x-ascend-model.png && \
76 install -m 644 -D ascend-doc-22x22.png $(DATADIR)/icons/hicolor/22x22/mimetypes/text-x-ascend-model.png && \
77 install -m 644 -D ascend-doc-24x24.png $(DATADIR)/icons/hicolor/24x24/mimetypes/text-x-ascend-model.png && \
78 install -m 644 -D ascend-doc-32x32.png $(DATADIR)/icons/hicolor/32x32/mimetypes/text-x-ascend-model.png && \
79 install -m 644 -D ascend-doc-48x48.png $(DATADIR)/icons/hicolor/48x48/mimetypes/text-x-ascend-model.png && \
80 install -m 644 -D ascend-doc-64x64.png $(DATADIR)/icons/hicolor/64x64/mimetypes/text-x-ascend-model.png
81 #
82 # workaround for bug in Ubuntu Hardy -- to prevent generic icons from overriding ASCEND icon.
83 cd $(CURDIR)/pygtk/glade && \
84 install -m 644 -D ascend-doc-48x48.svg $(DATADIR)/icons/Human/scalable/mimetypes/text-x-ascend-model.svg && \
85 install -m 644 -D ascend-doc-16x16.png $(DATADIR)/icons/Human/16x16/mimetypes/text-x-ascend-model.png && \
86 install -m 644 -D ascend-doc-22x22.png $(DATADIR)/icons/Human/22x22/mimetypes/text-x-ascend-model.png && \
87 install -m 644 -D ascend-doc-24x24.png $(DATADIR)/icons/Human/24x24/mimetypes/text-x-ascend-model.png && \
88 install -m 644 -D ascend-doc-32x32.png $(DATADIR)/icons/Human/32x32/mimetypes/text-x-ascend-model.png && \
89 install -m 644 -D ascend-doc-48x48.png $(DATADIR)/icons/Human/48x48/mimetypes/text-x-ascend-model.png && \
90 install -m 644 -D ascend-doc-64x64.png $(DATADIR)/icons/Human/64x64/mimetypes/text-x-ascend-model.png
91 #
92 # syntax highlighting for gedit
93 cd $(CURDIR)/tools/$(GTKSOURCEVIEW) && \
94 install -m 644 -D ascend.lang $(GTKSOURCEVIEWLANGS)/ascend.lang
95 #
96 # DESKTOP file for ASCEND Tcl/Tk
97 cd $(CURDIR)/tcltk/gnome && \
98 install -m 644 -D ascend4.desktop $(DATADIR)/applications/ascend4.desktop
99 #
100 dh_install --fail-missing --sourcedir=$(INSTALLROOT)
101
102 dh_installman
103
104 # Build architecture-independent files here.
105 binary-indep:
106 dh_testdir
107 dh_testroot
108 -cd $(CUR_DIR) && $(SCONS) doc
109
110 # Build architecture-dependent files here.
111 binary-arch: build install
112 dh_testdir
113 dh_testroot
114 dh_installchangelogs CHANGELOG.txt
115 dh_installdocs
116 dh_installexamples
117 dh_installman
118 dh_link
119 dh_strip
120 dh_compress
121 dh_fixperms
122 dh_makeshlibs
123 dh_installdeb
124 dh_shlibdeps
125 dh_gencontrol
126 dh_md5sums
127 dh_builddeb
128
129 binary: binary-indep binary-arch
130 .PHONY: build clean binary-indep binary-arch binary install configure

Properties

Name Value
svn:executable *

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22