File: rules

package info (click to toggle)
wcd 6.0.3-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,760 kB
  • sloc: ansic: 12,032; makefile: 1,595; sh: 60; csh: 6
file content (87 lines) | stat: -rwxr-xr-x 1,677 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

PACKAGE = wcd
EXE	= .exec

export DEB_BUILD_MAINT_OPTIONS  = hardening=+all
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic

#  UCS; Activate unicode UTF-8 support
#  NLS; Enable international support
#  DOTWCD; Use ~/.wcd/ configuration directory
#  UNINORM; Enable Unicode normalization

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

MAKE_OPTIONS = \
 EXT=$(EXE) \
 UCS=1 \
 NLS=1 \
 DOTWCD=1 \
 UNINORM=1 \
 CPP_FLAGS_POD=-Dunix \
 LDFLAGS_USER="$(LDFLAGS)" \
 CFLAGS_USER="$(CPPFLAGS) $(CFLAGS)"

include debian/debian-vars.mk

override_dh_auto_build:
	dh_auto_build --sourcedirectory=src -- $(MAKE_OPTIONS) all

override_dh_auto_clean:
	$(MAKE) -C src $(MAKE_OPTIONS) clean

override_dh_auto_install:
	$(MAKE) -C src \
		DESTDIR=$(PKGDIR) \
		prefix=/usr \
		BINDIR=$(LIBDIR) \
		DOCDIR=$(PKGDOCDIR) \
		MANDIR1=$(MAN7DIR) \
		INSTALL_OBJS_DOC_INSTALL= \
		INSTALL_OBJS_DOC_COPYING= \
		$(MAKE_OPTIONS) \
		install install-profile

	# Remove /usr/share/doc/wcd-VERSION
	# Not used in Debian

	rm -rf $(PKGDOCDIR)-*/

	# Relocate scripts

	install -d -m 755 $(SHAREDIR)

	install -m 644 \
		$(PKGDIR)/etc/profile.d/wcd.csh \
		$(SHAREDIR)/wcd-include.csh

	install -m 644 \
		debian/wcd-include.sh \
		$(SHAREDIR)/wcd-include.sh

	rm -rf  debian/$(PACKAGE)/etc

man:
	# target: man
	install -d -m 755 $(MAN1DIR)

	# Create manual page redirection file
	man=$(MAN1DIR)/$(PACKAGE)$(EXE).1 ; \
	echo ".so man1/wcd.1.gz" > $$man ; \
	gzip --best $$man

override_dh_installchangelogs:
	dh_installchangelogs doc/whatsnew.txt

override_dh_installman: man
	dh_installman
	rm -f $(PKGDOCDIR)/wcd.txt*

%:
	dh $@

.PHONY: man

# End of file