File: rules

package info (click to toggle)
libcdk 4.9.9-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 5,008 kB
  • ctags: 2,239
  • sloc: ansic: 28,664; sh: 334; makefile: 275; cpp: 42
file content (86 lines) | stat: -rwxr-xr-x 1,855 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/usr/bin/make -f

include /usr/share/dpatch/dpatch.make

DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
  confflags += --build $(DEB_HOST_GNU_TYPE)
else
  confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif

CFLAGS = -g

ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
    CFLAGS += -O2
else
    CFLAGS += -O0
endif


config.status: patch-stamp
	dh_testdir
	./configure CFLAGS="$(CFLAGS)" $(confflags) --disable-dependency-tracking \
	  --prefix=/usr --mandir=/usr/share/man --includedir=/usr/include/cdk

# Patch the generated libtool to avoid passing -rpath when linking,
# and to explicitly link libraries against the libraries they depend
# on. (thanks Richard Braakman <dark@xs4all.nl>)

	sed < libtool > libtool-2 \
		-e 's/^\(hardcode_libdir_flag_spec\).*$$/\1=" -D__LIBTOOL_IS_A_FOOL__ "/' \
		-e '/^archive_cmds="/s/"$$/ \\$$deplibs"/'
	mv libtool-2 libtool
	chmod 755 libtool


build: build-stamp
build-stamp: config.status
	dh_testdir
	$(MAKE)
	touch $@


clean: clean-patched unpatch
clean-patched:
	dh_testdir
	dh_testroot
	rm -f *-stamp 
	-$(MAKE) distclean
	dh_clean


install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp


binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs CHANGES
	dh_installdocs -A README TODO NOTES
	dh_installexamples
	dh_installman
	dh_movefiles
	find debian/libcdk-dev \( -name Makefile.in -or -name configure.in \) -print0 | xargs -0r rm -f
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb


binary:	binary-indep binary-arch


.PHONY: build clean install binary binary-indep binary-arch