File: rules

package info (click to toggle)
cdparanoia 3.10.2%2Bdebian-11
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 1,904 kB
  • sloc: ansic: 8,026; sh: 2,642; makefile: 61
file content (82 lines) | stat: -rwxr-xr-x 1,769 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
#!/usr/bin/make -f

DEB_HOST_ARCH_OS	?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
DEB_HOST_GNU_TYPE	?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE	?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_MULTIARCH      ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

export CFLAGS += -Wall
export LDFLAGS += -Wl,--as-needed -Wl,-O1 -Wl,-z,defs


ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
	CROSS=CC=$(DEB_HOST_GNU_TYPE)-gcc
else
	CROSS=
endif

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	rm -f config.guess config.sub

	[ ! -f Makefile ] || $(MAKE) distclean

	dh_clean

config.status: configure
	dh_testdir

ifneq "$(wildcard /usr/share/misc/config.guess)" ""
	cp -f /usr/share/misc/config.guess configure.guess
endif
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
	cp -f /usr/share/misc/config.sub configure.sub
endif

	./configure $(CROSS) --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) --prefix=/usr --mandir=\$${prefix}/share/man CFLAGS="$(CFLAGS)"

build: build-stamp
build-stamp: config.status
	dh_testdir

	$(MAKE)

	touch build-stamp

install: build
	dh_testdir
	dh_testroot
	dh_prep

	$(MAKE) install prefix=$(CURDIR)/debian/tmp/usr

	install -D -m 644 cdparanoia.1.jp debian/cdparanoia/usr/share/man/ja/man1/cdparanoia.1

binary: binary-arch

binary-arch: install
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdocs
	dh_install --fail-missing --sourcedir=debian/tmp
	dh_lintian
	dh_strip --dbg-package=cdparanoia-dbg
	dh_compress
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
ifeq (kfreebsd,$(DEB_HOST_ARCH_OS))
	dh_gencontrol -- -Varch-os-dev="libcam-dev"
else
	dh_gencontrol
endif
	dh_md5sums
	dh_builddeb

binary-indep:

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