File: rules

package info (click to toggle)
partclone 0.3.40%2Brepack-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,188 kB
  • sloc: ansic: 136,520; xml: 2,107; sh: 1,908; makefile: 515; asm: 383; perl: 106; sed: 16
file content (90 lines) | stat: -rwxr-xr-x 2,516 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
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

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


%:
	dh $@ --with autoreconf


FAILBOOTDIR = $(CURDIR)/debian/partclone/usr/share/partclone
MAN8DIR = $(CURDIR)/debian/partclone/usr/share/man/man8

# default configuration options
CONFIG_OPTS = \
	--prefix=/usr \
	--enable-ncursesw \
	--enable-xfs \
	--enable-extfs \
	--disable-reiserfs \
	--disable-reiser4 \
	--enable-hfsp \
	--enable-apfs \
	--enable-fat \
	--enable-exfat \
	--enable-ntfs \
	--disable-ufs \
	--disable-vmfs \
	--disable-jfs \
	--enable-btrfs \
	--enable-minix \
	--enable-f2fs \
	--disable-nilfs2

# isal support architectures
ISAL_ARCHES = amd64 arm64 ppc64el riscv64 s390x

override_dh_auto_configure:
	ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH); \
	if echo "$(ISAL_ARCHES)" | grep -w $$ARCH >/dev/null; then \
		dh_auto_configure -- $(CONFIG_OPTS) --enable-isal; \
	else \
		dh_auto_configure -- $(CONFIG_OPTS); \
	fi

override_dh_clean:
	dh_clean
	: # remove files generated by autogen and no removed by
	: # dh_clean
	rm -f depcomp missing compile
	rm -f Makefile.in
	rm -f aclocal.m4
	rm -f config.h.in
	rm -f configure
	rm -f config.log
	rm -f docs/Makefile.in
	rm -f ltmain.sh
	rm -rf m4/
	rm -f src/Makefile.in
	rm -f tests/Makefile.in
	: # those files are modified upon build, so debuilding twice fails
	rm -f docs/partclone.8 docs/partclone.info.8

override_dh_auto_test:
	echo Skipping tests.

override_dh_auto_install:
	dh_auto_install
	install -d $(FAILBOOTDIR)
	install -d $(MAN8DIR)
	cd $(MAN8DIR); \
	  ln -s partclone.fat.8.gz partclone.vfat.8.gz; \
	  ln -s partclone.fat.8.gz partclone.fat12.8.gz; \
	  ln -s partclone.fat.8.gz partclone.fat16.8.gz; \
	  ln -s partclone.fat.8.gz partclone.fat32.8.gz; \
	  ln -s partclone.hfsp.8.gz partclone.hfs+.8.gz; \
	  ln -s partclone.hfsp.8.gz partclone.hfsplus.8.gz; \
	  ln -s partclone.extfs.8.gz partclone.ext2.8.gz; \
	  ln -s partclone.extfs.8.gz partclone.ext3.8.gz; \
	  ln -s partclone.extfs.8.gz partclone.ext4.8.gz; \
	  ln -s partclone.extfs.8.gz partclone.ext4dev.8.gz
	# docs/partclone.dd.8 is a particular case, see bug #850623
	rm -rf $(CURDIR)/debian/partclone/usr/share/man/dd