File: rules

package info (click to toggle)
datamash 1.9-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,600 kB
  • sloc: ansic: 65,320; sh: 8,982; perl: 5,127; makefile: 250; sed: 16
file content (38 lines) | stat: -rwxr-xr-x 1,358 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
#!/usr/bin/make -f
DPKG_EXPORT_BUILDFLAGS = 1
DEB_BUILD_MAINT_OPTIONS = hardening=+all
include /usr/share/dpkg/default.mk

PACKAGE := $(shell dh_listpackages)
TMP     := $(CURDIR)/debian/$(PACKAGE)

# I disable autopoint. Not clear on why this is needed, but otherwise the
# package build says
#   configure:18339: error: possibly undefined macro: gl_PTHREADLIB
#   configure:18452: error: possibly undefined macro: gl_WEAK_SYMBOLS
#   configure:23056: error: possibly undefined macro: gl_TYPE_WINT_T_PREREQ
# Workaround from the nano package:
#   https://lists.nongnu.org/archive/html/nano-devel/2024-05/msg00017.html
export AUTOPOINT := true

%:
	dh $@

# Disabling auto-clean to work-around this build error:
#
#   dh clean
#      dh_auto_clean
#           make -j20 distclean
#   make[1]: Entering directory '/home/dima/debianstuff/datamash'
#   There seems to be no Makefile in this directory.
#   You must run ./configure before running 'make'.
override_dh_auto_clean:

execute_after_dh_auto_install:
	mkdir -p $(TMP)/usr/share/bash-completion/completions
	mv $(TMP)/usr/share/datamash/bash-completion.d/datamash $(TMP)/usr/share/bash-completion/completions
	rmdir $(TMP)/usr/share/datamash/bash-completion.d

	mkdir -p $(TMP)/usr/share/doc/datamash
	mv $(TMP)/usr/share/datamash/examples $(TMP)/usr/share/doc/datamash
	rmdir $(TMP)/usr/share/datamash