File: rules

package info (click to toggle)
libogg 1.2.0~dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,136 kB
  • ctags: 468
  • sloc: sh: 9,970; ansic: 2,410; makefile: 318
file content (84 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
83
84
#! /usr/bin/make -f

NUM_CPUS = $(shell getconf _NPROCESSORS_ONLN 2>/dev/null)
PARALLEL = $(subst parallel=,,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NJOBS    = -j$(or $(PARALLEL),$(NUM_CPUS),1)


export DH_OPTIONS

# Keep dpkg-buildpackage the hell out of messing with our compile flags,
# we should trust upstream to know better than it what to use here.
# We do append -g for release builds though, for the detached -dbg package.
CPPFLAGS =
CFLAGS   = -g
CXXFLAGS = -g
LDFLAGS  =

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS = -Wall -g -O0
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	INSTALL_PROGRAM += -s
endif

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


objdir = objs


clean:
	dh_testdir
	dh_testroot
	$(RM) build-stamp install-stamp
	$(RM) -r $(objdir)
	dh_clean


$(objdir)/config.status: configure
	dh_testdir
	mkdir -p $(objdir)
	cd $(objdir) && ../configure --host=$(DEB_HOST_GNU_TYPE)	\
				     --build=$(DEB_BUILD_GNU_TYPE)	\
				     --enable-static			\
				     --prefix=/usr

build: build-stamp
build-stamp: $(objdir)/config.status
	dh_testdir
	$(MAKE) $(NJOBS) -C $(objdir)
	touch $@


install: install-stamp
install-stamp:
	dh_testdir
	$(MAKE) -C $(objdir) install DESTDIR=$(CURDIR)/debian/tmp
	touch $@ 


binary: binary-arch

binary-arch: DH_OPTIONS = -a
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_install --sourcedir=debian/tmp
	dh_installdocs
	dh_installchangelogs CHANGES
	dh_strip --dbg-package=libogg-dbg
	dh_compress
	dh_fixperms
	dh_makeshlibs -V -- -c4
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-indep:


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