summaryrefslogtreecommitdiff
path: root/debian/rules
blob: 1806f30344aeff759ddf915fbdc8e9e376fe84aa (plain)
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

CFLAGS = -g -Wall

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

DESTDIR=$(CURDIR)/debian/tmp

conf_args = --prefix=/usr --disable-rpath-install --disable-rpath --bundled-libraries=NONE 
conf_args += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)

configure: configure-stamp
configure-stamp:
	dh_testdir
	./autogen-waf.sh
	CFLAGS="$(CFLAGS)" ./configure $(conf_args)
	touch configure-stamp

build: configure build-stamp
build-stamp:
	dh_testdir
	$(MAKE) all
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	LD_LIBRARY_PATH=bin/shared ./bin/talloc_testsuite
endif
	touch build-stamp

get-orig-source:
	./debian/build-orig.sh

clean: 
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	[ ! -f Makefile ] || $(MAKE) distclean
	rm -f buildtools/wafsamba/*.pyc
	rm -rf buildtools/bin/.waf*
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	mkdir -p $(DESTDIR)`swig -swiglib`
	$(MAKE) install DESTDIR=$(DESTDIR)
	# Waf really should be doing this:
<<<<<<< TREE
	ar -rc libtalloc.a bin/default/talloc_*.o
=======
	ar -rc libtalloc.a bin/default/talloc_?.o
>>>>>>> MERGE-SOURCE
	cp libtalloc.a $(DESTDIR)/usr/lib
	dh_install --list-missing --fail-missing --sourcedir=$(DESTDIR)

# Build architecture-dependent files here.
# Pass -a to all debhelper commands in this target to reduce clutter.
binary-arch: DH_OPTIONS=-a
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installdocs
	dh_installchangelogs 
	dh_strip
	dh_link
	dh_compress
	dh_fixperms
	dh_makeshlibs -- -c4
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary-indep:

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