File: rules

package info (click to toggle)
freebsd-manpages 12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 6,116 kB
  • sloc: makefile: 30
file content (43 lines) | stat: -rwxr-xr-x 1,498 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
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DESTDIR=$(CURDIR)/debian/freebsd-manpages
VER=12.0
#BETA=RC1

ifdef BETA
UPSVER=$(VER)-$(BETA)
DEBVER=$(VER)~$(BETA)
else
UPSVER=$(VER)-RELEASE
DEBVER=$(VER)
endif

b% i% c%:
	dh $@

override_dh_install:
	dh_install
	# Use i386 directory for architecture-dependent man pages
	mv $(DESTDIR)/usr/share/man/man4/i386/* $(DESTDIR)/usr/share/man/man4/
	rm -rf $(DESTDIR)/usr/share/man/man4/*/
	file-rename 's/\.(\d)($|\.gz)/.$${1}freebsd$${2}/' $(DESTDIR)/usr/share/man/man*/*

override_dh_installman:
	dh_installman
	hardlink -m -t $(DESTDIR)/usr/share/man

# make -f debian/rules get-orig-source
get-orig-source: ../freebsd-manpages_$(DEBVER).orig.tar.xz
../freebsd-manpages_$(DEBVER).orig.tar.xz: ../base-$(UPSVER).txz
	mkdir -pv debian/repack1 debian/repack2/usr/share/man/man7 debian/repack2/usr/share/man/man3
	cd debian/repack1; tar xvJ --no-xattrs -f ../../../base-$(UPSVER).txz
	mv -v debian/repack1/usr/share/man/man2 debian/repack1/usr/share/man/man4 debian/repack1/usr/share/man/man9 debian/repack2/usr/share/man/
	mv -v debian/repack1/usr/share/man/man3/sysctl.3.gz debian/repack2/usr/share/man/man3/
	mv -v debian/repack1/usr/share/man/man7/secur*.7.gz debian/repack2/usr/share/man/man7/
	cd debian/repack2; tar cvJf ../../../freebsd-manpages_$(DEBVER).orig.tar.xz ./usr/share/man
	rm -rf debian/repack?

../base-$(UPSVER).txz:
	wget -O $@ https://download.freebsd.org/ftp/releases/i386/$(UPSVER)/base.txz