File: rules

package info (click to toggle)
dmapi 2.2.10-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 1,376 kB
  • ctags: 755
  • sloc: sh: 9,404; ansic: 3,009; makefile: 317
file content (72 lines) | stat: -rwxr-xr-x 1,601 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
#!/usr/bin/make -f

package = dmapi
develop = libdm0-dev
library = libdm0

dirdev = debian/$(develop)
dirlib = debian/$(library)
pkgdev = DIST_ROOT=`pwd`/$(dirdev); export DIST_ROOT;
pkglib = DIST_ROOT=`pwd`/$(dirlib); export DIST_ROOT;
stdenv = @GZIP=-q; export GZIP;

options = export DEBUG=-DNDEBUG DISTRIBUTION=debian \
	  INSTALL_USER=root INSTALL_GROUP=root ;
checkdir = test -f debian/rules
checkver = rm -f debian/compat && echo 7 > debian/compat

build: built
built: config
	@echo "== dpkg-buildpackage: build" 1>&2
	$(MAKE) default
	touch built

config: .census
.census:
	@echo "== dpkg-buildpackage: configure" 1>&2
	$(checkdir)
	$(options) $(MAKE) configure
	touch .census

clean:
	@echo "== dpkg-buildpackage: clean" 1>&2
	$(checkdir)
	$(checkver)
	-rm -f built .census
	$(MAKE) distclean
	-rm -rf $(dirdev) $(dirlib)
	-rm -f debian/*substvars debian/files* debian/*.debhelper

binary-indep:

binary-arch: checkroot built
	@echo "== dpkg-buildpackage: binary-arch" 1>&2
	$(checkdir)
	$(checkver)
	-rm -rf $(dirdev) $(dirlib)
	$(pkgdev) $(MAKE) -C . install-dev
	$(pkglib) $(MAKE) -C . install
	$(pkglib) $(MAKE) -C build src-manifest

	sed "s/^libdir='\/lib'$$/libdir='\/usr\/lib'/" $(dirdev)/usr/lib/libdm.la > $(dirdev)/usr/lib/libdm.la.new
	mv $(dirdev)/usr/lib/libdm.la.new $(dirdev)/usr/lib/libdm.la

	dh_installdocs
	dh_installchangelogs
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol

	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch

checkroot:
	test 0 -eq `id -u`

.PHONY: binary binary-arch binary-indep clean checkroot