File: rules

package info (click to toggle)
dos2unix 7.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,644 kB
  • sloc: ansic: 3,889; makefile: 652; perl: 419; sh: 13
file content (44 lines) | stat: -rwxr-xr-x 1,040 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
#!/usr/bin/make -f

include /usr/share/dpkg/buildflags.mk

# From dpkg-dev
DPKG_EXPORT_BUILDFLAGS = 1

PACKAGE         = dos2unix
PKGDIR		= $(CURDIR)/debian/$(PACKAGE)
DOCROOTDIR      = $(PKGDIR)/usr/share/doc
PKGDOCDIR       = $(DOCROOTDIR)/$(PACKAGE)

export DEB_BUILD_MAINT_OPTIONS  = hardening=+all
export DEB_CFLAGS_MAINT_APPEND  = -Wall -pedantic
export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

PODCENTER    = $(shell date -u +"%Y-%m-%d" --date="$(SOURCE_DATE_EPOCH)")
export PODCENTER

override_dh_auto_build:
	env LANG=en_US.UTF-8 \
	dh_auto_build -- LDFLAGS_USER="$(LDFLAGS)" CFLAGS_USER="$(CPPFLAGS) $(CFLAGS)"

override_dh_clean:
	dh_clean
	rm -f man/es/man1/dos2unix.1

override_dh_auto_install:
	dh_auto_install

	# dos2unix-N.N/ => dos2unix/
	mv -v $(DOCROOTDIR)/$$( cd $(DOCROOTDIR) && ls ) $(PKGDOCDIR)

	# Remove files that are not needed. The PS and PDF are
	# copies of manual pages.

	rm -vf $(PKGDOCDIR)/COPYING.txt \
	       $(PKGDOCDIR)/INSTALL.txt \
	       $(PKGDOCDIR)/ChangeLog.txt \

%:
	dh $@

# End of file