File: rules

package info (click to toggle)
manpages-ja 0.5.0.0.20161015%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 28,488 kB
  • ctags: 7
  • sloc: perl: 161; makefile: 99
file content (119 lines) | stat: -rwxr-xr-x 6,213 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#!/usr/bin/make -f

PKD   = $(abspath $(dir $(MAKEFILE_LIST)))
PKG   = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source))
UVER  = $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-\d+.*)};')
DTYPE = +dfsg
VER  ?= $(subst $(DTYPE),,$(UVER))

%:
	dh $@

override_dh_auto_build:
	( echo \$$DESTDIR/usr/share/man/ja; echo 0; echo; echo; echo y; yes c ) | $(MAKE) config

override_dh_auto_install:
	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
	# wall(1) is from util-linux (bsdutils)
	install -o root -g root -m 644 manual/util-linux/man1/wall.1 $(CURDIR)/debian/tmp/usr/share/man/ja/man1
	# find $(CURDIR)/debian/tmp/usr/share/man/ja/ -type f | xargs gzip -9

	# adduser(8) just includes .so line to useradd(8), which is quite confusing.
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/adduser.8
	# fastboot(8) and fasthalt(8) should not be included in the Debian distribution.
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/fastboot.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/fasthalt.8
	# overlapping manpages in login package
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man1/login.1
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man1/newgrp.1
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man1/sg.1
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man1/su.1
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man5/faillog.5
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man5/login.defs.5
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/faillog.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/lastlog.8
	# overlapping manpages in passwd package
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man1/chage.1
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man1/chfn.1
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man1/chsh.1
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man1/expiry.1
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man1/gpasswd.1
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man1/passwd.1
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man5/limits.5
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man5/login.access.5
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man5/passwd.5
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man5/porttime.5
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man5/shadow.5
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/chpasswd.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/dpasswd.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/groupadd.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/groupdel.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/groupmod.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/grpck.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/grpconv.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/grpunconv.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/mkpasswd.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/newusers.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/pwck.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/pwconv.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/pwunconv.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/shadowconfig.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/useradd.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/userdel.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/usermod.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/vigr.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/vipw.8
	# overlapping manpages in rpm package
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/rpmbuild.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/rpmcache.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/rpmgraph.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/rpm.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/rpm2cpio.8
	# suauth is no longer available
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man5/suauth.5
	# cal is not from bsdmainutils but from util-linux
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man1/cal.1
	# install-info is not from dpkg but from GNU texinfo
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man1/install-info.1
	# rename is not from util-linux (see #439935)
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man1/rename.1
	# overlapping manpages in dhcp3-common package
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man5/dhclient.conf.5
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man5/dhclient.leases.5
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man5/dhcp-options.5
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man5/dhcp-eval.5
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/dhclient-script.8
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man8/dhclient.8
	# overlapping manpages in cdparanoia package
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man1/cdparanoia.1
	# Install the translated pages as Japanese version
	# since jless-specific description is removed from them.
	install debian/jless.1 $(CURDIR)/debian/tmp/usr/share/man/ja/man1
	install debian/jlesskey.1 $(CURDIR)/debian/tmp/usr/share/man/ja/man1
	# Move tcpdump(1) to tcpdump(8).
	mv $(CURDIR)/debian/tmp/usr/share/man/ja/man1/tcpdump.1 $(CURDIR)/debian/tmp/usr/share/man/ja/man8/tcpdump.8
	# glibc doesn't implement setproctitle(3).
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man3/setproctitle.3
	# gasp is no longer available
	rm -f $(CURDIR)/debian/tmp/usr/share/man/ja/man1/gasp.1

get-orig-source: $(PKG)_$(VER)$(DTYPE).orig.tar.xz $(info I: $(PKG)_$(VER)$(DTYPE))
	@

$(PKG)_$(VER)$(DTYPE).orig.tar.xz:
	@echo "# Downloading..."
	uscan --noconf --verbose --rename --destdir=$(CURDIR) --check-dirname-level=0 --force-download --download-version $(VER) $(PKD)
	$(if $(wildcard $(PKG)-$(VER)),$(error $(PKG)-$(VER) exist, aborting..))
	@echo "# Extracting..."
	mkdir $(PKG)-$(VER) \
		&& tar -xf $(PKG)_$(VER).orig.tar.* --directory $(PKG)-$(VER) --strip-components 1 \
		|| $(RM) -r $(PKG)-$(VER)
	@echo "# Cleaning-up..."
	cd $(PKG)-$(VER) \
		&& $(RM) -r -v \
		manual/procps/man1/top.1 manual/LDP_man-pages/man7/uri.7
	#$(RM) -v $(PKG)_$(VER).orig.tar.*
	@echo "# Packing..."
	find -L "$(PKG)-$(VER)" -xdev -type f -print | sort \
		| XZ_OPT="-6v" tar -caf "$(PKG)_$(VER)$(DTYPE).orig.tar.xz" -T- --owner=root --group=root --mode=a+rX \
		&& $(RM) -r "$(PKG)-$(VER)"