File: rules

package info (click to toggle)
libxcrypt 1%3A2.4-4
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 1,740 kB
  • ctags: 357
  • sloc: sh: 8,532; ansic: 2,904; makefile: 89
file content (98 lines) | stat: -rwxr-xr-x 1,848 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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

D = $(CURDIR)/debian/tmp

DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
DEB_CFLAGS_MAINT_PREPEND = -Wall

include /usr/share/dpkg/default.mk

ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE))
	confflags += --build $(DEB_HOST_GNU_TYPE)
else
	confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
endif

configure: configure.in
	dh_testdir
	dh_autoreconf

config.status: configure
	dh_testdir

	./configure \
	  CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
	  $(confflags) \
	  --prefix=/usr \
	  --mandir=\$${prefix}/share/man \
	  --infodir=\$${prefix}/share/info

build-indep:
build-arch: config.status
	dh_testdir

	$(MAKE)

build: build-indep build-arch

clean:
	dh_testdir
	dh_testroot

	rm -f configure

	[ ! -f Makefile ] || $(MAKE) distclean

	dh_autoreconf_clean
	dh_clean

.PHONY: build-indep build-arch build clean

install-arch: build-arch
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs

	$(MAKE) install DESTDIR=$(D)

	# Fix the libxcrypt.so symlink to point to /lib/libxcrypt.so.x.x.x
	# rather than being relative & pointing to the current directory
	@(cd $(D)/usr/lib; ln -sf /lib/`readlink libxcrypt.so` libxcrypt.so)

	# Remove libtool .la file
	rm $(D)/usr/lib/*.la

	# Make sure the shared libs are in /lib
	mkdir -p $(D)/lib
	mv $(D)/usr/lib/*.so.* $(D)/lib

	dh_install --fail-missing

binary-indep: build-indep
# We have nothing to do by default.

binary-arch: install-arch
	dh_testdir
	dh_testroot
	dh_installchangelogs ChangeLog
	dh_installdocs -A
	dh_installexamples
	dh_installman
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch

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