File: rules

package info (click to toggle)
attr 1:2.4.47-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-backports, jessie-kfreebsd, stretch, stretch-proposed-updates
  • size: 1,820 kB
  • sloc: sh: 10,380; ansic: 2,360; makefile: 505; perl: 246
file content (112 lines) | stat: -rwxr-xr-x 3,012 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#!/usr/bin/make -f

export DH_VERBOSE=1

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 DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

package = attr
develop = lib$(package)1-dev
library = lib$(package)1
udeb    = $(package)-udeb
libudeb = $(library)-udeb

dirme  = debian/$(package)
dirdev = debian/$(develop)
dirlib = debian/$(library)
diru   = debian/$(udeb)
dirlu  = debian/$(libudeb)
pkgme  = DIST_ROOT=`pwd`/$(dirme);  export DIST_ROOT;
pkgdev = DIST_ROOT=`pwd`/$(dirdev); export DIST_ROOT;
pkglib = DIST_ROOT=`pwd`/$(dirlib); export DIST_ROOT;
pkgu   = DIST_ROOT=`pwd`/$(diru);   export DIST_ROOT;
pkglu  = DIST_ROOT=`pwd`/$(dirlu);  export DIST_ROOT;
stdenv = @GZIP=-q; export GZIP;

options = export DEBUG=-DNDEBUG DISTRIBUTION=debian \
	  INSTALL_USER=root INSTALL_GROUP=root \
	  CONFIG_SHELL=/bin/sh ;
checkdir = test -f debian/rules

ifneq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
        LOCAL_CONFIGURE_OPTIONS += --host $(DEB_HOST_GNU_TYPE) --build $(DEB_BUILD_GNU_TYPE)
endif

LOCAL_CONFIGURE_OPTIONS += \
		--libdir=/lib/$(DEB_HOST_MULTIARCH) \
		--libexecdir=/usr/lib/$(DEB_HOST_MULTIARCH)

build-arch: build
build-indep: build
build: built
built: config
	@echo "== dpkg-buildpackage: build" 1>&2
	$(MAKE) default
	rm -f po/attr.pot
	$(MAKE) -C po attr.pot
	touch built

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

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

binary-indep:

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

	rm -f $(dirdev)/usr/lib/$(DEB_HOST_MULTIARCH)/libattr.la
	rm -f $(dirdev)/lib/$(DEB_HOST_MULTIARCH)/libattr.la

	-rm -rf $(dirdev)/usr/share/doc/attr
	-rm -rf $(dirlib)/usr/share/doc/attr
	-rm -rf $(dirlib)/usr/share/locale
	-rm -rf $(dirlib)/usr/share/man
	-rm -rf $(dirlib)/usr/bin
	-rm -rf $(diru)/usr/share
	-rm -rf $(dirlu)/usr

	dh_installdocs
	dh_installchangelogs
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs -N $(library)
	dh_makeshlibs -p $(library) -V 'libattr1 (>= 1:2.4.46-8)' --add-udeb libattr1-udeb
	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