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

Contents of /trunk/debian/rules

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1396 - (show annotations) (download)
Sun Apr 22 03:22:45 2007 UTC (14 years ago) by jpye
File size: 2368 byte(s)
First stab at Debian package support
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= prefix=/usr
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.108
31 major=0
32
33 # option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
34 #version=`ls src/.libs/lib*.so.* | \
35 # awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
36 #major=`ls src/.libs/lib*.so.* | \
37 # awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
38
39 build: build-stamp
40 build-stamp:
41 dh_testdir
42 cd $(CURDIR); $(SCONS)
43 touch build-stamp
44
45 clean:
46 dh_testdir
47 dh_testroot
48 rm -f build-stamp
49 -cd $(CURDIR) && $(SCONS) -c
50 find $(CURDIR) -name .scon* | xargs rm -rf
51 find $(CURDIR) -type f -name *.pyc | xargs rm -rf
52 find $(CURDIR) -type f -name *.o | xargs rm -rf
53 find $(CURDIR) -type f -name *.os | xargs rm -rf
54 find $(CURDIR) -type f -name *.a | xargs rm -rf
55 dh_clean
56
57 install: build
58 dh_testdir
59 dh_testroot
60 dh_clean -k
61 dh_installdirs
62 mkdir -p $(CURDIR)/debian/tmp/usr
63 cd $(CURDIR) && scons INSTALL_PREFIX=$(CURDIR)/debian/tmp/usr install
64 dh_install --sourcedir=debian/tmp
65
66 # Build architecture-independent files here.
67 binary-indep:
68 dh_testdir
69 dh_testroot
70 -cd $(CUR_DIR) && $(SCONS) doc
71
72 # Build architecture-dependent files here.
73 binary-arch: build install
74 dh_testdir
75 dh_testroot
76 dh_installchangelogs CHANGELOG.txt
77 dh_installdocs
78 dh_installexamples
79 dh_installman
80 dh_link
81 dh_strip
82 dh_compress
83 dh_fixperms
84 dh_makeshlibs
85 dh_installdeb
86 dh_shlibdeps -L libascend0 -l debian/libascend0/usr/lib
87 dh_gencontrol
88 dh_md5sums
89 dh_builddeb
90
91 binary: binary-indep binary-arch
92 .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