Switch to unified view

a/packaging/debian/rules b/packaging/debian/rules
1
#!/usr/bin/make -f
1
#!/usr/bin/make -f
2
# -*- makefile -*-
3
# Sample debian/rules that uses debhelper.
4
#
5
# This file was originally written by Joey Hess and Craig Small.
6
# As a special exception, when this file is copied by dh-make into a
7
# dh-make output file, you may use that output file without restriction.
8
# This special exception was added by Craig Small in version 0.37 of dh-make.
9
#
10
# Modified to make a template file for a multi-binary package with separated
11
# build-arch and build-indep targets  by Bill Allombert 2001
12
2
13
# Uncomment this to turn on verbose mode.
3
# Uncomment this to turn on verbose mode.
14
#export DH_VERBOSE=1
4
#export DH_VERBOSE=1
15
5
16
# This has to be exported to make some magic below work.
6
# This has to be exported to make some magic below work.
...
...
19
# These are used for cross-compiling and for saving the configure script
9
# These are used for cross-compiling and for saving the configure script
20
# from having to guess our platform (since we know it already)
10
# from having to guess our platform (since we know it already)
21
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
11
DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
22
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
12
DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
23
13
24
25
CFLAGS = -Wall -g
14
CFLAGS = -Wall -g
26
15
27
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
16
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
28
    CFLAGS += -O0
17
    CFLAGS += -O0
29
else
18
else
30
    CFLAGS += -O2
19
    CFLAGS += -O2
31
endif
20
endif
32
21
33
config.status: configure
22
config.status: configure
34
    dh_testdir
23
    dh_testdir
35
  # Add here commands to configure the package.
24
  ./configure CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" \
36
  ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
25
  --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
26
  --prefix=/usr --mandir=\$${prefix}/share/man
37
27
38
39
#Architecture 
40
build: build-arch
28
build: build-stamp
41
42
build-arch: build-arch-stamp
43
build-arch-stamp:  config.status
29
build-stamp:  config.status
30
  dh_testdir
44
    $(MAKE)
31
    $(MAKE)
45
    touch $@
32
    touch $@
46
33
47
clean:
34
clean:
48
    dh_testdir
35
    dh_testdir
49
    dh_testroot
36
    dh_testroot
50
  rm -f build-arch-stamp #CONFIGURE-STAMP#
37
  rm -f build-stamp
51
  # Add here commands to clean up after the build process.
52
    -$(MAKE) distclean
38
    -$(MAKE) distclean
53
    dh_clean 
39
    dh_clean 
54
40
55
install: install-arch
56
57
install-arch:
41
install:
58
    dh_testdir
42
    dh_testdir
59
    dh_testroot
43
    dh_testroot
60
    dh_clean -k -s 
44
    dh_clean -k
61
    dh_installdirs -s
45
    dh_installdirs
62
  $(MAKE) install prefix=$(CURDIR)/debian/recoll/usr
63
46
64
  dh_install -s
47
  $(MAKE) prefix=$(CURDIR)/debian/recoll/usr install
65
# Must not depend on anything. This is to be called by
48
66
# binary-arch/binary-indep
49
binary-arch: build install
67
# in another 'make' thread.
68
binary-common:
69
    dh_testdir
50
    dh_testdir
70
    dh_testroot
51
    dh_testroot
71
    dh_installchangelogs ChangeLog
52
    dh_installchangelogs ChangeLog
72
    dh_installdocs
53
    dh_installdocs
73
  dh_installexamples
74
    dh_installmenu
54
    dh_installmenu
75
    dh_installman
55
    dh_installman
76
    dh_link
56
    dh_link
77
    dh_strip
57
    dh_strip
78
    dh_compress 
58
    dh_compress
79
    dh_fixperms
59
    dh_fixperms
80
    dh_installdeb
60
    dh_installdeb
81
    dh_shlibdeps
61
    dh_shlibdeps
82
    dh_gencontrol
62
    dh_gencontrol
83
    dh_md5sums
63
    dh_md5sums
84
    dh_builddeb
64
    dh_builddeb
85
65
86
# Build architecture dependant packages using the common target.
66
binary-indep: build install
87
binary-arch: build-arch install-arch
88
  $(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
89
67
90
binary: binary-arch 
68
binary: binary-indep binary-arch
91
.PHONY: build clean binary-arch binary install install-arch 
69
.PHONY: build clean binary-indep binary-arch binary install