summaryrefslogtreecommitdiff
path: root/packaging/debian/rules
blob: 771e7c065cba83860dea248582ab798735b888f9 (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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/usr/bin/make -f
# By Jelmer Vernooij <jelmer@samba.org>
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.

SOURCEPATH=../source

package=samba4

configure: configure-stamp
configure-stamp:
	dh_testdir
	cd $(SOURCEPATH) && ./autogen.sh
	cd $(SOURCEPATH) && ./configure --with-fhs \
		--prefix=/usr \
		--mandir=/usr/share/man \
		--enable-shared \
		--enable-static \
		--sysconfdir=/etc \
		--libdir=/etc/samba4 \
		--with-configdir=/etc/samba4 \
		--with-privatedir=/etc/samba4 \
		--with-piddir=/var/run/samba4 \
		--localstatedir=/var \
		--with-pam \
		--with-syslog \
		--with-readline \
		--with-ldap 
	cd $(SOURCEPATH)/pidl && perl Makefile.PL verbose INSTALLDIRS=vendor PREFIX=/usr
	touch $@

build: build-stamp
build-stamp: configure
	dh_testdir
	$(MAKE) -C $(SOURCEPATH) proto 
	-$(MAKE) -C $(SOURCEPATH) pch
	$(MAKE) -C $(SOURCEPATH) all
	$(MAKE) -C $(SOURCEPATH)/pidl all
	touch $@

clean:
	dh_testdir
	dh_testroot
	dh_clean
	$(RM) debian/tmp
	-$(MAKE) -C $(SOURCEPATH) clean
	$(RM) build-stamp configure-stamp

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_install -i --sourcedir=debian/tmp
	dh_installdocs -i
	dh_installchangelogs -i
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

install: build
	dh_clean -k
	dh_installdirs
	mkdir -p $(CURDIR)/debian/tmp/usr/share/man/man1
	mkdir -p $(CURDIR)/debian/tmp/etc/samba4
	$(MAKE) -C $(SOURCEPATH) install DESTDIR=$(CURDIR)/debian/tmp
	$(MAKE) -C $(SOURCEPATH) manpages installman DESTDIR=$(CURDIR)/debian/tmp
	cp $(SOURCEPATH)/setup/provision $(CURDIR)/debian/tmp/usr/lib/samba/setup
	$(MAKE) -C $(SOURCEPATH)/pidl install DESTDIR=$(CURDIR)/debian/tmp

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_install -a --sourcedir=debian/tmp
	dh_installdocs -a
	dh_installchangelogs -a
	dh_strip -a
	dh_perl -a
	dh_compress -a
	dh_fixperms -a
	dh_makeshlibs -a
	dh_installinit -a --name=samba4
	dh_installdebconf -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary: binary-arch binary-indep 

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