1 |
jpye |
1396 |
#!/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 |
jpye |
1413 |
SCONS_OPTIONS = CC="ccache gcc" CXX="ccache g++" INSTALL_PREFIX=/usr -j2 |
17 |
jpye |
1396 |
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.108 |
31 |
|
|
major=0 |
32 |
|
|
|
33 |
|
|
build: build-stamp |
34 |
|
|
build-stamp: |
35 |
|
|
dh_testdir |
36 |
jpye |
1413 |
cd $(CURDIR) && $(SCONS) libascend tcltk pygtk models |
37 |
|
|
cd $(CURDIR) && $(SCONS) doc/book.pdf |
38 |
jpye |
1396 |
touch build-stamp |
39 |
|
|
|
40 |
|
|
clean: |
41 |
|
|
dh_testdir |
42 |
|
|
rm -f build-stamp |
43 |
|
|
-cd $(CURDIR) && $(SCONS) -c |
44 |
jpye |
1413 |
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 |
jpye |
1396 |
dh_clean |
54 |
|
|
|
55 |
|
|
install: build |
56 |
|
|
dh_testdir |
57 |
jpye |
1413 |
# dh_testroot |
58 |
jpye |
1396 |
dh_clean -k |
59 |
|
|
dh_installdirs |
60 |
|
|
mkdir -p $(CURDIR)/debian/tmp/usr |
61 |
jpye |
1413 |
cd $(CURDIR) && $(SCONS) INSTALL_ROOT=$(CURDIR)/debian/tmp install |
62 |
|
|
dh_install --autodest |
63 |
jpye |
1396 |
|
64 |
|
|
# Build architecture-independent files here. |
65 |
|
|
binary-indep: |
66 |
|
|
dh_testdir |
67 |
|
|
dh_testroot |
68 |
|
|
-cd $(CUR_DIR) && $(SCONS) doc |
69 |
|
|
|
70 |
|
|
# Build architecture-dependent files here. |
71 |
|
|
binary-arch: build install |
72 |
|
|
dh_testdir |
73 |
|
|
dh_testroot |
74 |
|
|
dh_installchangelogs CHANGELOG.txt |
75 |
|
|
dh_installdocs |
76 |
|
|
dh_installexamples |
77 |
|
|
dh_installman |
78 |
|
|
dh_link |
79 |
|
|
dh_strip |
80 |
|
|
dh_compress |
81 |
|
|
dh_fixperms |
82 |
|
|
dh_makeshlibs |
83 |
|
|
dh_installdeb |
84 |
jpye |
1413 |
dh_shlibdeps -L ascend -l debian/ascend/usr/lib |
85 |
jpye |
1396 |
dh_gencontrol |
86 |
|
|
dh_md5sums |
87 |
|
|
dh_builddeb |
88 |
|
|
|
89 |
|
|
binary: binary-indep binary-arch |
90 |
|
|
.PHONY: build clean binary-indep binary-arch binary install configure |
91 |
|
|
|