~ubuntu-branches/ubuntu/lucid/judy/lucid

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Troy Heber
  • Date: 2005-03-22 06:55:53 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050322065553-syjpkd48r4re18dn
Tags: 1.0.1-5

* Moving LGPL link in copyright back to LGPL-2.1
* Cleanup of debian/rules: removed explicit refs to 32-bit archs, removed
  unnecessary nostrip, using --man dir to install man pages, moving from
  dh_movefiles to dh_install.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
# This is the debhelper compatibility version to use.
9
9
export DH_COMPAT=3
10
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
 
11
CFLAGS = -Wall 
 
12
 
 
13
 
 
14
# Support debian native 64-bit platforms
 
15
BIT := --enable-32-bit
 
16
ARCH := $(shell dpkg --print-installation-architecture)
 
17
 
 
18
ifeq ($(ARCH), amd64)
 
19
     BIT := --enable-64-bit
 
20
endif
 
21
 
 
22
ifeq ($(ARCH), ia64)
 
23
     BIT := --enable-64-bit
 
24
endif
 
25
 
 
26
ifeq ($(ARCH), alpha)
 
27
     BIT := --enable-64-bit
 
28
endif
 
29
 
 
30
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
31
        CFLAGS += -O0
 
32
else
 
33
        CFLAGS += -O2
19
34
endif
20
35
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
21
36
        INSTALL_PROGRAM += -s
22
37
endif
23
38
 
24
 
# shared library versions, option 1
25
 
version=0.0.0
26
 
major=0
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
 
39
configure: configure-stamp
 
40
configure-stamp:
34
41
        dh_testdir
35
42
        # Add here commands to configure the package.
36
 
        #./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
37
 
        bash ./configure
 
43
        ./configure $(BIT) --prefix=/usr --mandir=/usr/share/man
 
44
 
 
45
        touch configure-stamp
38
46
 
39
47
 
40
48
build: build-stamp
41
 
build-stamp:  config.status
 
49
 
 
50
build-stamp: configure-stamp 
42
51
        dh_testdir
43
52
 
44
53
        # Add here commands to compile the package.
49
58
clean:
50
59
        dh_testdir
51
60
        dh_testroot
52
 
        rm -f build-stamp 
 
61
        rm -f build-stamp configure-stamp
53
62
 
54
63
        # Add here commands to clean up after the build process.
55
64
        -$(MAKE) distclean
62
71
        dh_clean -k
63
72
        dh_installdirs
64
73
 
65
 
        # Add here commands to install the package into debian/tmp
66
 
ifeq (ia64-linux,$(DEB_BUILD_GNU_TYPE))
67
 
        cp -a src/linux_ipf/product/deliver debian/tmp
68
 
else
69
 
        cp -a src/linux_ia32/product/deliver debian/tmp
70
 
endif
71
 
        rm debian/tmp/usr/share/doc/Judy/COPYRIGHT
72
 
        mv debian/tmp/usr/share/doc/Judy \
73
 
           debian/tmp/usr/share/doc/libjudy-dev
74
 
        mv debian/tmp/usr/lib/libJudy.so \
75
 
           debian/tmp/usr/lib/libjudydebian.so.0.0.0
76
 
        ln -s libjudydebian.so.0.0.0 \
77
 
              debian/tmp/usr/lib/libjudydebian.so.0
78
 
        ln -s libjudydebian.so.0 \
79
 
              debian/tmp/usr/lib/libJudy.so
80
 
#       $(MAKE) install prefix=$(CURDIR)/debian/tmp/usr
81
 
 
 
74
        # Add here commands to install the package into debian/tmp.
 
75
        $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp DISTROS=debian
82
76
 
83
77
# Build architecture-independent files here.
84
78
binary-indep: build install
88
82
binary-arch: build install
89
83
        dh_testdir
90
84
        dh_testroot
91
 
        dh_movefiles
92
 
 
93
 
#       dh_installdebconf       
94
 
        dh_installdocs -v
95
 
        dh_installexamples -v
96
 
        dh_installcron -v
97
 
        dh_installman -v
98
 
        dh_installinfo -v
99
 
#       dh_undocumented
100
 
        dh_installchangelogs -v
101
 
        dh_link -v
102
 
        dh_strip -v
103
 
        dh_compress -v
104
 
        dh_fixperms -v
105
 
        rm -f debian/libjudydebian0/DEBIAN/shlibs
106
 
        install -d debian/libjudydebian0/DEBIAN
107
 
        install -m644 -o 0 -g 0 debian/shlibs debian/libjudydebian0/DEBIAN/shlibs
108
 
        install -o 0 -g 0 -d debian/libjudy-dev/DEBIAN
109
 
        sed s/#DEBHELPER#// < debian/postinst > debian/libjudy-dev/DEBIAN/postinst
110
 
        chown 0.0 debian/libjudy-dev/DEBIAN/postinst
111
 
        chmod 755 debian/libjudy-dev/DEBIAN/postinst
112
 
        sed s/#DEBHELPER#// < debian/postrm > debian/libjudy-dev/DEBIAN/postrm
113
 
        chown 0.0 debian/libjudy-dev/DEBIAN/postrm
114
 
        chmod 755 debian/libjudy-dev/DEBIAN/postrm
115
 
        dh_shlibdeps -v
116
 
        dh_gencontrol -v
117
 
        dh_md5sums -v
118
 
        dh_builddeb -v
 
85
        dh_install --sourcedir="debian/tmp"
 
86
        dh_installdocs
 
87
        dh_installexamples
 
88
        dh_installmenu
 
89
        dh_installinit
 
90
        dh_installcron
 
91
        dh_installman
 
92
        dh_installinfo
 
93
        dh_installchangelogs ChangeLog
 
94
        dh_link
 
95
        dh_strip
 
96
        dh_compress
 
97
        dh_fixperms
 
98
        dh_makeshlibs
 
99
        dh_installdeb
 
100
        dh_shlibdeps
 
101
        dh_gencontrol
 
102
        dh_md5sums
 
103
        dh_builddeb
119
104
 
120
105
binary: binary-indep binary-arch
121
 
.PHONY: build clean binary-indep binary-arch binary install 
 
106
.PHONY: build clean binary-indep binary-arch binary install configure