2
by Adam C. Powell, IV
* Added Trilinos linkage. |
1 |
#!/usr/bin/make -f
|
2 |
# Made with the aid of debmake, by Christoph Lameter,
|
|
3 |
# based on the sample debian/rules file for GNU hello by Ian Jackson.
|
|
4 |
||
5 |
package=deal.ii |
|
6 |
version=6.2.0 |
|
7 |
||
8 |
stamp-patch: |
|
9 |
if [ ! -e stamp-patch ]; then \ |
|
10 |
QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2; \ |
|
11 |
fi
|
|
12 |
touch $@ |
|
13 |
||
14 |
clean: |
|
15 |
dh_testdir
|
|
16 |
if [ -e common/Make.global_options ]; then $(MAKE) distclean; fi |
|
17 |
if [ -e stamp-patch ]; then \ |
|
18 |
QUILT_PATCHES=debian/patches quilt pop -a -R || test $$? = 2; \ |
|
19 |
rm -f stamp-patch; \ |
|
20 |
fi
|
|
21 |
rm -f stamp-* |
|
22 |
# This is left by a quilt push/pop sequence
|
|
23 |
rm -rf .pc |
|
24 |
dh_clean
|
|
25 |
||
26 |
stamp-configure: stamp-patch |
|
27 |
dh_testdir
|
|
28 |
autoconf
|
|
29 |
CXX=mpicxx CC=mpicc PETSC_DIR=/usr/lib/petsc PETSC_ARCH=`petscarch` \ |
|
30 |
SLEPC_DIR=/usr/lib/slepc SLEPC_ARCH=linux-gnu-c-opt \ |
|
31 |
./configure --prefix=/usr --disable-parser --enable-multithreading \ |
|
32 |
--enable-shared --with-boost --with-blas --with-lapack \ |
|
33 |
--with-umfpack=/usr --with-umfpack-include=/usr/include/suitesparse \ |
|
34 |
--with-metis=/usr --with-metis-include=/usr/include/metis/ |
|
35 |
# --with-trilinos=/usr --with-trilinos-include=/usr/include/trilinos
|
|
36 |
touch $@ |
|
37 |
||
38 |
build: stamp-build |
|
39 |
stamp-build: stamp-configure |
|
40 |
dh_testdir
|
|
41 |
# Move aside Make.global_options and replace it with something temporary
|
|
42 |
mv common/Make.global_options common/Make.global_options.orig |
|
43 |
sed 's/$$(LIBDIR)\/lib/-L$$(LIBDIR) -l/' < common/Make.global_options.orig \ |
|
44 |
| sed 's/.g$$(lib-suffix)/.g/' | sed 's/call$$(lib-suffix)/call/' \ |
|
45 |
| sed 's/hsl$$(lib-suffix)/hsl/' | sed 's/ase$$(lib-suffix)/ase/' \ |
|
46 |
| sed 's/lac$$(lib-suffix)/lac/' | sed 's/_1d$$(lib-suffix)/_1d/' \ |
|
47 |
| sed 's/_2d$$(lib-suffix)/_2d/' | sed 's/_3d$$(lib-suffix)/_3d/' \ |
|
48 |
> common/Make.global_options |
|
49 |
$(MAKE) all |
|
50 |
touch $@ |
|
51 |
||
52 |
build-doc: stamp-configure |
|
53 |
$(MAKE) online-doc |
|
54 |
touch $@ |
|
55 |
||
56 |
install: build |
|
57 |
# We distribute the libs, and put the includes and common files in -dev
|
|
58 |
install -d debian/libdeal.ii-dbg$(version)/usr/lib |
|
59 |
mv lib/*.g.so.$(version) debian/libdeal.ii-dbg$(version)/usr/lib/ |
|
60 |
install -d debian/libdeal.ii$(version)/usr/lib
|
|
61 |
mv lib/*.so.$(version) debian/libdeal.ii$(version)/usr/lib/
|
|
62 |
install -d debian/libdeal.ii-dbg/usr/lib
|
|
63 |
mv lib/*.g.so debian/libdeal.ii-dbg/usr/lib/
|
|
64 |
install -d debian/libdeal.ii-dev/usr/lib
|
|
65 |
mv lib/*.so debian/libdeal.ii-dev/usr/lib/
|
|
66 |
install -d debian/libdeal.ii-dev/usr/include/deal.II
|
|
67 |
cp -a deal.II/include/* lac/include/* base/include/* \
|
|
68 |
debian/libdeal.ii-dev/usr/include/deal.II/
|
|
69 |
install -d debian/libdeal.ii-dev/usr/share/deal.II
|
|
70 |
cp -a common/* debian/libdeal.ii-dev/usr/share/deal.II
|
|
71 |
# Fix Make.global_options
|
|
72 |
rm -f debian/libdeal.ii-dev/usr/share/deal.II/Make.global_options*
|
|
73 |
sed "s/`echo $(CURDIR) | sed 's/\//\\\\\//g'`/\/usr/" \
|
|
74 |
< common/Make.global_options.orig | \
|
|
75 |
sed 's/deal.II\/include/include\/deal.II/' \
|
|
76 |
> debian/libdeal.ii-dev/usr/share/deal.II/Make.global_options
|
|
77 |
# There are a couple of binaries in common/scripts which belong in $(version)
|
|
78 |
install -d debian/libdeal.ii$(version)/usr/lib/deal.II
|
|
79 |
mv debian/libdeal.ii-dev/usr/share/deal.II/scripts/expand_instantiations \
|
|
80 |
debian/libdeal.ii-dev/usr/share/deal.II/scripts/make_dependencies \
|
|
81 |
debian/libdeal.ii$(version)/usr/lib/deal.II/
|
|
82 |
ln -s ../../../lib/deal.II/expand_instantiations \
|
|
83 |
debian/libdeal.ii-dev/usr/share/deal.II/scripts/expand_instantiations
|
|
84 |
ln -s ../../../lib/deal.II/make_dependencies \
|
|
85 |
debian/libdeal.ii-dev/usr/share/deal.II/scripts/make_dependencies
|
|
86 |
rm -f debian/libdeal.ii-dev/usr/share/deal.II/scripts/*.cc \
|
|
87 |
debian/libdeal.ii-dev/usr/share/deal.II/scripts/make_tarfile.sh
|
|
88 |
touch $@
|
|
89 |
||
90 |
binary-indep: install build-doc
|
|
91 |
dh_testdir -i
|
|
92 |
dh_testroot -i
|
|
93 |
dh_installdirs -i
|
|
94 |
# dh_install -i
|
|
95 |
# dh_movefiles -i
|
|
96 |
dh_installdocs -i
|
|
97 |
rm -rf debian/deal.ii-examples/usr/share/doc/deal.ii-examples/step-*/doc |
|
98 |
# Fix example Makefiles
|
|
99 |
for mfile in `ls debian/deal.ii-examples/usr/share/doc/deal.ii-examples/step-*/Makefile`; do \ |
|
100 |
mv $$mfile $$mfile.in; \ |
|
101 |
sed 's/$$D\/common/$$D/' < $$mfile.in | \ |
|
102 |
sed 's/$$D\/\*\/include/\/usr\/include\/deal.II/' | \ |
|
103 |
sed 's/$$D/\/usr\/share\/deal.II/' | \ |
|
104 |
sed 's/debug-mode = on/debug-mode = off/' | \ |
|
105 |
grep -v 'D = ' > $$mfile; \ |
|
106 |
rm -f $$mfile.in; \ |
|
107 |
done
|
|
108 |
dh_installchangelogs -i |
|
109 |
dh_compress -i -XMakefile -Xcc -Xinp |
|
110 |
dh_fixperms -i |
|
111 |
dh_installdeb -i |
|
112 |
dh_gencontrol -i |
|
113 |
dh_md5sums -i |
|
114 |
dh_builddeb -i |
|
115 |
||
116 |
binary-arch: install |
|
117 |
dh_testdir -a |
|
118 |
dh_testroot -a |
|
119 |
dh_installdirs -a |
|
120 |
# dh_install -a
|
|
121 |
# dh_movefiles -a
|
|
122 |
install -d debian/libdeal.ii-dbg$(version)/usr/share/lintian/overrides |
|
123 |
install -m 644 debian/libdeal.ii-dbg$(version).overrides \ |
|
124 |
debian/libdeal.ii-dbg$(version)/usr/share/lintian/overrides/libdeal.ii-dbg$(version) |
|
125 |
dh_installdocs -a |
|
126 |
dh_installchangelogs -a |
|
127 |
dh_strip -a -X.g |
|
128 |
dh_makeshlibs -a |
|
129 |
dh_compress -a |
|
130 |
dh_fixperms -a |
|
131 |
dh_installdeb -a |
|
132 |
dh_shlibdeps -a |
|
133 |
dh_gencontrol -a |
|
134 |
dh_md5sums -a |
|
135 |
dh_builddeb -a |
|
136 |
||
137 |
binary: binary-indep binary-arch |
|
138 |
||
139 |
.PHONY: binary binary-arch binary-indep clean |