~ubuntu-branches/debian/squeeze/libgpg-error/squeeze

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Jose Carlos Garcia Sogo
  • Date: 2004-03-16 23:25:13 UTC
  • Revision ID: james.westby@ubuntu.com-20040316232513-j0772gcc0xnjh5i6
Tags: 0.7-1
* New upstream version. (Closes: #236802, #238161)
* Bumped Standars Versions. No changes.
* From Matthias Urlichs package:
    - Document gpg-error.
    - Fix installation.
    - Added postinst and prerm scripts for libgpg-error0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
# Sample 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 compatability version to use.
 
9
export DH_COMPAT=4
 
10
 
 
11
# C compiler information
 
12
CC              = gcc
 
13
CFLAGS          = -Wall -g
 
14
 
 
15
INSTALL         = install
 
16
 
 
17
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
 
18
        CFLAGS += -O0
 
19
else
 
20
        CFLAGS += -O2
 
21
endif
 
22
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 
23
        INSTALL += -s
 
24
endif
 
25
 
 
26
export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
27
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
28
 
 
29
ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
 
30
  confflags += --build $(DEB_HOST_GNU_TYPE)
 
31
else
 
32
  confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
 
33
endif
 
34
    
 
35
 
 
36
version=`ls libgpg-error/.libs/lib*.so.* | \
 
37
 awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
 
38
major=`ls libgpg-error/.libs/lib*.so.* | \
 
39
 awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
 
40
 
 
41
configure: configure-stamp
 
42
configure-stamp:
 
43
        dh_testdir
 
44
 
 
45
        chmod +x configure
 
46
        ./configure $(confflags) --enable-maintainer-mode \
 
47
                --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info 
 
48
        
 
49
        touch configure-stamp
 
50
 
 
51
build: configure-stamp build-stamp
 
52
build-stamp:
 
53
        dh_testdir
 
54
 
 
55
        $(MAKE)
 
56
 
 
57
        touch build-stamp
 
58
 
 
59
clean:
 
60
        dh_testdir
 
61
        dh_testroot
 
62
        rm -f build-stamp configure-stamp
 
63
 
 
64
        -test -r /usr/share/misc/config.sub && \
 
65
                cp -f /usr/share/misc/config.sub config.sub
 
66
        -test -r /usr/share/misc/config.guess && \
 
67
                cp -f /usr/share/misc/config.guess config.guess
 
68
                                                                                                
 
69
        -if test -f ltmain.sh ; then touch ltmain.sh; else libtoolize -c; fi
 
70
        -if test -f aclocal.m4 ; then touch aclocal.m4; else aclocal-1.8 -I m4 ; fi
 
71
        -if test -f config.h.in ; then touch config.h.in; else autoheader2.50; fi
 
72
        -if test -f Makefile.in ; then find . -name Makefile.in -exec touch {} \; ;\
 
73
                else automake-1.8 --copy --add-missing; fi
 
74
                                                                                                
 
75
        -if test -f configure ; then touch configure; else autoconf2.50; fi
 
76
 
 
77
        -$(MAKE) distclean
 
78
 
 
79
        dh_clean
 
80
 
 
81
install: build
 
82
        dh_testdir
 
83
        dh_testroot
 
84
        dh_clean -k
 
85
        dh_installdirs
 
86
 
 
87
        $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp/
 
88
 
 
89
binary-indep: build
 
90
 
 
91
binary-arch: build install
 
92
        dh_testdir
 
93
        dh_testroot
 
94
        dh_movefiles
 
95
 
 
96
        dh_installdocs
 
97
        dh_installman
 
98
        dh_installinfo
 
99
        dh_installchangelogs ChangeLog
 
100
        dh_link
 
101
        dh_strip
 
102
        dh_compress
 
103
        dh_fixperms
 
104
        dh_makeshlibs -V
 
105
        dh_installdeb
 
106
        dh_shlibdeps
 
107
        dh_gencontrol
 
108
        dh_md5sums
 
109
        dh_builddeb
 
110
 
 
111
binary: binary-arch
 
112
.PHONY: build clean binary-indep binary-arch binary install configure