/[debian-med]/trunk/packages/libsbml/trunk/debian/rules
ViewVC logotype

Contents of /trunk/packages/libsbml/trunk/debian/rules

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7933 - (show annotations) (download)
Mon Sep 26 10:52:47 2011 UTC (20 months, 3 weeks ago) by ivomaintz-guest
File size: 3873 byte(s)
debian/rules checks now for matlab and modifies the debian/control file
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 # Uncomment this to turn on verbose mode.
10 #export DH_VERBOSE=1
11
12
13 # These are used for cross-compiling and for saving the configure script
14 # from having to guess our platform (since we know it already)
15 DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
16 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
17 ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
18 CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
19 else
20 CROSS= --build $(DEB_BUILD_GNU_TYPE)
21 endif
22
23
24 # shared library versions, option 1
25 version=5.0.99
26 major=5
27
28 libpack := libsbml
29 devpack := $(libpack)-dev
30 mathpack := $(libpack)-matlab
31 perlpack := $(libpack)-dev
32 pythonpack := $(libpack)-dev
33 javapack := $(libpack)-dev
34 debtmp := $(CURDIR)/debian/tmp
35 dbgpack := $(libpack)$(major)-dbg
36 # Test for matlab
37 BIND_MATLAB := $(shell which matlab | grep -q matlab && echo '--with-matlab')
38
39 config.status: configure
40 dh_testdir
41 # Add here commands to configure the package.
42 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
43 cp -f /usr/share/misc/config.sub config.sub
44 endif
45 ifneq "$(wildcard /usr/share/misc/config.guess)" ""
46 cp -f /usr/share/misc/config.guess config.guess
47 endif
48 # prepare the debian/control file
49 if [ "$(BIND_MATLAB)" = "--with-matlab" ] ; then \
50 sed -e 's/^#//' debian/control.in > debian/control ; else \
51 grep -v ^# debian/control.in > debian/control ; fi
52
53 ./configure $(CROSS) --prefix=/usr \
54 --with-doxygen \
55 --with-perl \
56 --with-python \
57 --with-java \
58 --with-swig \
59 --with-ruby \
60 --with-octave \
61 $(BIND_MATLAB) \
62 --enable-layout \
63 --with-csharp \
64 --mandir=\$${prefix}/share/man \
65 --infodir=\$${prefix}/share/info \
66 CFLAGS="$(CFLAGS)" \
67 LDFLAGS="-Wl,-z,defs"
68
69 build: build-stamp
70
71 build-stamp: config.status
72 dh_testdir
73
74 # Add here commands to compile the package.
75 $(MAKE)
76
77 touch $@
78
79 clean:
80 dh_testdir
81 dh_testroot
82 rm -f build-stamp
83
84 # Add here commands to clean up after the build process.
85 [ ! -f Makefile ] || $(MAKE) distclean
86 rm -f config.sub config.guess
87
88 dh_clean
89
90 install: build
91 dh_testdir
92 dh_testroot
93 dh_prep
94 dh_installdirs
95
96 # Add here commands to install the package into debian/libsbml.
97 mkdir -p $(debtmp)/etc
98 cp -a debian/etc $(debtmp)
99 $(MAKE) install-docs DESTDIR=$(debtmp)
100 $(MAKE) install DESTDIR=$(debtmp)
101 find $(debtmp)/usr/lib/python2.6/ -type d -name site-packages -exec mv {} $(debtmp)/usr/lib/python2.6/dist-packages \; || true
102 rm $(debtmp)/usr/lib/python2.6/dist-packages/libsbml/*.pyc
103 mkdir $(debtmp)/usr/lib/perl5
104 mv $(debtmp)/usr/lib/perl/*/* $(debtmp)/usr/lib/perl5/
105 chmod 644 $(debtmp)/usr/share/java/libsbmlj.jar
106 find $(debtmp)/usr/lib/ -type f -exec chmod 644 {} +
107 find $(debtmp)/usr/lib/ -type f -name .packlist -exec rm -f {} +
108 find $(debtmp)/usr/lib/ -type d -iname "*.libs" -exec rm -rf {} +
109
110 # Build architecture-independent files here.
111 binary-indep: build install
112 # We have nothing to do by default.
113
114 # Build architecture-dependent files here.
115 binary-arch: build install
116 dh_testdir
117 dh_testroot
118 dh_installchangelogs
119 dh_installdocs
120 dh_installexamples
121 dh_install
122 dh_installman
123 dh_link
124 dh_strip --dbg-package=${dbgpack}
125 dh_compress
126 dh_fixperms
127 dh_makeshlibs
128 dh_makeclilibs -i -V
129 dh_installcligac -i
130 dh_perl
131 dh_python2 --no-guessing-versions
132 dh_installdeb
133 dh_shlibdeps
134 dh_gencontrol
135 dh_md5sums
136 dh_builddeb
137
138 binary: binary-indep binary-arch
139 .PHONY: build clean binary-indep binary-arch binary install

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5