~ubuntu-branches/ubuntu/trusty/libnss-db/trusty

« back to all changes in this revision

Viewing changes to debian/rules

  • Committer: Bazaar Package Importer
  • Author(s): Ben Collins
  • Date: 2002-04-12 13:12:29 UTC
  • Revision ID: james.westby@ubuntu.com-20020412131229-2sfdv2fix4sij8lf
Tags: 2.2-6
Rebuild with newer libdb3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/make -f
 
2
 
 
3
# Setup
 
4
CFLAGS          := -O2 -Wall
 
5
INSTALL_PROGRAM := install -m755 -s
 
6
INSTALL_DATA    := install -m644
 
7
 
 
8
# Some special build options
 
9
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
 
10
  CFLAGS += -g
 
11
  ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 
12
    INSTALL_PROGRAM := install -m755
 
13
  endif
 
14
endif
 
15
 
 
16
# the dbs rules
 
17
TAR_DIR := nss_db-2.2
 
18
include debian/scripts/dbs-build.mk
 
19
 
 
20
# dpkg-arch rules
 
21
ifeq (,$(DEB_BUILD_GNU_TYPE))
 
22
  include debian/scripts/dpkg-arch.mk
 
23
endif
 
24
 
 
25
config_options = --prefix=/usr
 
26
 
 
27
build: $(STAMP_DIR)/build
 
28
$(STAMP_DIR)/build: $(STAMP_DIR)/configure
 
29
        dh_testdir
 
30
        cd $(BUILD_TREE) && $(MAKE)
 
31
        touch $(STAMP_DIR)/build
 
32
 
 
33
$(BUILD_TREE)/configure: $(BUILD_TREE)/configure.in
 
34
        cd $(BUILD_TREE) && libtoolize -c -f && autoconf
 
35
 
 
36
configure: $(STAMP_DIR)/configure
 
37
$(STAMP_DIR)/configure: $(STAMP_DIR)/patch $(BUILD_TREE)/configure
 
38
        dh_testdir
 
39
        cd $(BUILD_TREE) && CFLAGS="$(CFLAGS)" ./configure $(config_options) \
 
40
                --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
 
41
        touch $(STAMP_DIR)/configure
 
42
 
 
43
clean:
 
44
        dh_testdir
 
45
        rm -rf $(STAMP_DIR) $(SOURCE_DIR)
 
46
        perl debian/scripts/dh_split clean
 
47
        dh_clean
 
48
 
 
49
install: build $(dh_mak_deps)
 
50
        dh_testdir
 
51
        dh_testroot
 
52
        dh_clean -k
 
53
        dh_installdirs
 
54
 
 
55
        cd $(BUILD_TREE) && $(MAKE) DESTDIR="$(shell pwd)/debian/tmp" \
 
56
                INSTALL_PROGRAM="$(INSTALL_PROGRAM)" install
 
57
 
 
58
ifeq ($(DEB_HOST_GNU_SYSTEM),linux)
 
59
        sed -e 's%/var/db%/var/lib/misc%' < debian/local/default \
 
60
                > debian/tmp/etc/default/libnss-db
 
61
        chmod 644 debian/tmp/etc/default/libnss-db
 
62
        $(INSTALL_DATA) -D debian/local/db-Makefile \
 
63
                debian/tmp/var/lib/misc/Makefile
 
64
else
 
65
        $(INSTALL_DATA) -D debian/local/default \
 
66
                debian/tmp/etc/default/libnss-db
 
67
        $(INSTALL_DATA) -D debian/local/db-Makefile \
 
68
                debian/tmp/var/db/Makefile
 
69
endif
 
70
        dh_movefiles
 
71
 
 
72
binary-indep: build install $(dh_mak_deps)
 
73
 
 
74
binary-arch: build install $(dh_mak_deps)
 
75
        dh_testdir
 
76
        dh_testroot
 
77
        dh_installchangelogs $(BUILD_TREE)/ChangeLog
 
78
        dh_installdocs $(BUILD_TREE)/{AUTHORS,NEWS,README}
 
79
        dh_installman debian/local/makedb.1
 
80
        dh_installdeb
 
81
        dh_strip
 
82
        dh_compress
 
83
        dh_fixperms
 
84
        dh_md5sums
 
85
        dh_makeshlibs
 
86
        dh_shlibdeps
 
87
        dh_gencontrol
 
88
        dh_builddeb
 
89
 
 
90
binary: binary-indep binary-arch