~ubuntu-branches/ubuntu/precise/libdbi-drivers/precise

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): David Parker
  • Date: 2004-02-01 14:33:06 UTC
  • Revision ID: james.westby@ubuntu.com-20040201143306-10zg0y32z6u67n1g
Tags: 0.7.1-2
Fixed makefiles so that distclean doesn't remove documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
# debian/rules that uses debhelper.
 
3
# GNU copyright 1997 to 1999 by Joey Hess.
 
4
 
 
5
# Uncomment this to turn on verbose mode.
 
6
#export DH_VERBOSE=1
 
7
 
 
8
# This is the debhelper compatibility version to use.
 
9
export DH_COMPAT=3
 
10
 
 
11
# These are used for cross-compiling and for saving the configure script
 
12
# from having to guess our platform (since we know it already)
 
13
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
14
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
15
 
 
16
 
 
17
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
 
18
        CFLAGS += -g
 
19
endif
 
20
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 
21
        INSTALL_PROGRAM += -s
 
22
endif
 
23
 
 
24
# shared library versions, option 1
 
25
#version=2.0.5
 
26
#major=2
 
27
# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
 
28
version=`ls src/.libs/lib*.so.* | \
 
29
 awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
 
30
major=`ls src/.libs/lib*.so.* | \
 
31
 awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
 
32
 
 
33
config.status: configure
 
34
        dh_testdir
 
35
        ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --with-pgsql --with-mysql --with-sqlite
 
36
 
 
37
 
 
38
build: build-stamp
 
39
build-stamp:  config.status
 
40
        dh_testdir
 
41
 
 
42
        $(MAKE)
 
43
 
 
44
        touch build-stamp
 
45
 
 
46
clean:
 
47
        dh_testdir
 
48
        dh_testroot
 
49
        rm -f build-stamp 
 
50
 
 
51
        -$(MAKE) distclean
 
52
        -test -r /usr/share/misc/config.sub && \
 
53
          cp -f /usr/share/misc/config.sub config.sub
 
54
        -test -r /usr/share/misc/config.guess && \
 
55
          cp -f /usr/share/misc/config.guess config.guess
 
56
 
 
57
 
 
58
        dh_clean
 
59
 
 
60
install: build
 
61
        dh_testdir
 
62
        dh_testroot
 
63
        dh_clean -k
 
64
        dh_installdirs
 
65
 
 
66
        $(MAKE) install prefix=$(CURDIR)/debian/tmp/usr
 
67
 
 
68
 
 
69
binary-indep: build install
 
70
 
 
71
binary-arch: build install
 
72
        dh_testdir
 
73
        dh_testroot
 
74
        dh_movefiles
 
75
 
 
76
        dh_installdocs
 
77
        dh_installexamples
 
78
        dh_installmenu
 
79
        dh_installcron
 
80
        dh_installman
 
81
        dh_installinfo
 
82
        dh_installchangelogs ChangeLog
 
83
        dh_link
 
84
        dh_strip
 
85
        dh_compress
 
86
        dh_fixperms
 
87
        dh_makeshlibs
 
88
        dh_installdeb
 
89
        dh_shlibdeps
 
90
        dh_gencontrol
 
91
        dh_md5sums
 
92
        dh_builddeb
 
93
 
 
94
binary: binary-indep binary-arch
 
95
.PHONY: build clean binary-indep binary-arch binary install