1 |
#!/usr/bin/make -f |
2 |
# -*- makefile -*- |
3 |
# Sample debian/rules that uses debhelper. |
4 |
# This file was originally written by Joey Hess and Craig Small. |
5 |
# As a special exception, when this file is copied by dh-make into a |
6 |
# dh-make output file, you may use that output file without restriction. |
7 |
# This special exception was added by Craig Small in version 0.37 of dh-make. |
8 |
# |
9 |
# File sourced from http://iua-share.upf.edu/svn/clam/trunk/CLAM/debian/rules |
10 |
# by John Pye on 21 Apr 2007 |
11 |
|
12 |
# Uncomment this to turn on verbose mode. |
13 |
#export DH_VERBOSE=1 |
14 |
|
15 |
CFLAGS = -Wall -g |
16 |
SCONS_OPTIONS = CC="ccache gcc" CXX="ccache g++" INSTALL_PREFIX=/usr -j2 |
17 |
SCONS= scons $(SCONS_OPTIONS) |
18 |
|
19 |
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) |
20 |
CFLAGS += -O0 |
21 |
else |
22 |
CFLAGS += -O2 |
23 |
endif |
24 |
|
25 |
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) |
26 |
INSTALL_PROGRAM += -s |
27 |
endif |
28 |
|
29 |
# shared library versions, option 1 |
30 |
version=0.95.109 |
31 |
major=0 |
32 |
|
33 |
build: build-stamp |
34 |
build-stamp: |
35 |
dh_testdir |
36 |
cd $(CURDIR) && $(SCONS) libascend tcltk pygtk models |
37 |
cd $(CURDIR) && $(SCONS) doc/book.pdf |
38 |
touch build-stamp |
39 |
|
40 |
clean: |
41 |
dh_testdir |
42 |
rm -f build-stamp |
43 |
-cd $(CURDIR) && $(SCONS) -c |
44 |
find $(CURDIR) -name ".scon*" | xargs rm -rf |
45 |
find $(CURDIR) -type f -name "*.pyc" | xargs rm -rf |
46 |
find $(CURDIR) -type f -name "*.pyo" | xargs rm -rf |
47 |
find $(CURDIR) -type f -name "*.o" | xargs rm -rf |
48 |
find $(CURDIR) -type f -name "*.os" | xargs rm -rf |
49 |
find $(CURDIR) -type f -name "*.a" | xargs rm -rf |
50 |
-rm $(CURDIR)/doc/*.tex |
51 |
-rm -rf $(CURDIR)/doc/html |
52 |
# dh_testroot |
53 |
dh_clean |
54 |
|
55 |
install: build |
56 |
dh_testdir |
57 |
# dh_testroot |
58 |
dh_clean -k |
59 |
dh_installdirs |
60 |
mkdir -p $(CURDIR)/debian/tmp/usr |
61 |
cd $(CURDIR) && $(SCONS) INSTALL_ROOT=$(CURDIR)/debian/tmp install |
62 |
dh_install --autodest |
63 |
dh_installman debian/ascend.man |
64 |
dh_installman debian/ascend4.man |
65 |
dh_installman debian/ascend-config.man |
66 |
|
67 |
# Build architecture-independent files here. |
68 |
binary-indep: |
69 |
dh_testdir |
70 |
dh_testroot |
71 |
-cd $(CUR_DIR) && $(SCONS) doc |
72 |
|
73 |
# Build architecture-dependent files here. |
74 |
binary-arch: build install |
75 |
dh_testdir |
76 |
dh_testroot |
77 |
dh_installchangelogs CHANGELOG.txt |
78 |
dh_installdocs |
79 |
dh_installexamples |
80 |
dh_installman |
81 |
dh_link |
82 |
dh_strip |
83 |
dh_compress |
84 |
dh_fixperms |
85 |
dh_makeshlibs |
86 |
dh_installdeb |
87 |
dh_shlibdeps -L ascend -l debian/ascend/usr/lib |
88 |
dh_gencontrol |
89 |
dh_md5sums |
90 |
dh_builddeb |
91 |
|
92 |
binary: binary-indep binary-arch |
93 |
.PHONY: build clean binary-indep binary-arch binary install configure |