File: rules

package info (click to toggle)
xfig 1%3A3.2.8b-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 27,428 kB
  • sloc: ansic: 75,823; sh: 3,174; makefile: 303; javascript: 22; csh: 5
file content (134 lines) | stat: -rwxr-xr-x 4,376 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#!/usr/bin/make -f
#
# (C) 1999-2022 Roland Rosenfeld <roland@debian.org>, based on
# sample debian/rules that uses debhelper.
# This file is public domain software, originally written by Joey Hess.

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

INSTDIR=`pwd`/debian/xfig
DOCINSTDIR=`pwd`/debian/xfig-doc
LIBINSTDIR=`pwd`/debian/xfig-libs

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

%:
	dh $@

override_dh_autoreconf:
#       preserve files overwritten by dh_autoreconf:
	tar cf debian/autoreconf.tar Makefile.in aclocal.m4 ar-lib compile \
		configure depcomp doc/Makefile.in install-sh missing \
		src/Makefile.in tests/Makefile.in config.h.in
	dh_autoreconf

override_dh_auto_configure:
#	preserve some files from upstream tarball:
	tar cf debian/preserve.tar doc/xfig_man.html.in \
		doc/html/images/xfig-title.fig doc/html/images/xfig-title.png \
		src/splash.xpm src/splash.xbm \
		src/version.xbm version.m4 doc/xfig_ref_en.pdf

	dh_auto_configure -- --enable-splash --enable-tablet

override_dh_auto_build-arch:
	dh_auto_build
#	Build test programs, despite of "nocheck":
	(cd tests; make test1 test2 test3 test4)

override_dh_auto_build-indep:
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS)))
#	regenerate xfig-title.png:
	rm -f doc/html/images/xfig-title.png
	make -C doc html/images/xfig-title.png

#	regenerate xfig_man.html.in:
	rm -f doc/xfig_man.html.in

#	regenerate xfig_ref_en.pdf:
	rm -f doc/xfig_ref_en.pdf
	env TZ=UTC make -C doc xfig_ref_en.pdf
endif
	dh_auto_build

override_dh_clean:
	dh_clean

	rm -f doc/xfig_man.html

#       restore files overwritten by dh_autoreconf:
	[ ! -f debian/autoreconf.tar ] || tar xf debian/autoreconf.tar
	rm -f debian/autoreconf.tar

#	restore files from upstream tarball:
	[ ! -f debian/preserve.tar ] || tar xf debian/preserve.tar
	rm -f debian/preserve.tar

override_dh_install-indep:
	dh_install --indep

#	remove the just installed ERD/GUI license files, because they are
#	already in debian/copyright included:
	rm -f $(LIBINSTDIR)/usr/share/xfig/Libraries/ERD/LICENSE
	rm -f $(LIBINSTDIR)/usr/share/xfig/Libraries/GUI/LICENSE

#	move Libraries/README to share/doc/xfig-libs:
	mv $(LIBINSTDIR)/usr/share/xfig/Libraries/README \
	   $(LIBINSTDIR)/usr/share/doc/xfig-libs/README

#	remove assemble scripts, since they are only used on build:
	rm -f $(LIBINSTDIR)/usr/share/xfig/Libraries/Maps/Canada/assemble
	rm -f $(LIBINSTDIR)/usr/share/xfig/Libraries/Maps/USA/assemble

override_dh_install-arch:
	dh_install --arch

# 	install wrapper as xfig:
	install -m755 debian/xfig-wrapper $(INSTDIR)/usr/bin/xfig

#	install japanese app-defaults:
	install -m644 app-defaults/Fig \
		$(INSTDIR)/etc/X11/ja_JP.eucJP/app-defaults/Fig
	echo 'Fig.international: true' >> \
		$(INSTDIR)/etc/X11/ja_JP.eucJP/app-defaults/Fig
	echo 'Fig*international: false' >> \
		$(INSTDIR)/etc/X11/ja_JP.eucJP/app-defaults/Fig
	echo 'Fig.japanese: true' >> \
		$(INSTDIR)/etc/X11/ja_JP.eucJP/app-defaults/Fig
	echo 'Fig.inputStyle: OffTheSpot' >> \
		$(INSTDIR)/etc/X11/ja_JP.eucJP/app-defaults/Fig

	install -m644 app-defaults/Fig \
		$(INSTDIR)/etc/X11/ko_KR.eucKR/app-defaults/Fig
	echo 'Fig.international: true' >> \
		$(INSTDIR)/etc/X11/ko_KR.eucKR/app-defaults/Fig
	echo 'Fig*international: false' >> \
		$(INSTDIR)/etc/X11/ko_KR.eucKR/app-defaults/Fig
	echo 'Fig.korean: true' >> \
		$(INSTDIR)/etc/X11/ko_KR.eucKR/app-defaults/Fig
	echo 'Fig.inputStyle: OverTheSpot' >> \
		$(INSTDIR)/etc/X11/ko_KR.eucKR/app-defaults/Fig

# 	Scale and install PNG desktop icons:
	convert doc/html/images/xfig-logo.png -geometry 16x16 \
		$(INSTDIR)/usr/share/icons/hicolor/16x16/apps/xfig.png
	convert doc/html/images/xfig-logo.png -geometry 22x22 \
		$(INSTDIR)/usr/share/icons/hicolor/22x22/apps/xfig.png
	convert doc/html/images/xfig-logo.png -geometry 48x48 \
		$(INSTDIR)/usr/share/icons/hicolor/48x48/apps/xfig.png
	install -m644 doc/html/images/xfig-logo.png \
		$(INSTDIR)/usr/share/icons/hicolor/64x64/apps/xfig.png

#	Install autotest binaries to /usr/libexec/xfig:
	install -m755 tests/test1 $(INSTDIR)/usr/libexec/xfig/
	install -m755 tests/test2 $(INSTDIR)/usr/libexec/xfig/
	install -m755 tests/test3 $(INSTDIR)/usr/libexec/xfig/
	install -m755 tests/test4 $(INSTDIR)/usr/libexec/xfig/

override_dh_installchangelogs:
	dh_installchangelogs -k CHANGES

override_dh_compress:
	dh_compress -X.pdf