File: rules

package info (click to toggle)
hercules 3.13-7
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye
  • size: 14,392 kB
  • sloc: ansic: 175,124; sh: 8,792; makefile: 758; perl: 149
file content (58 lines) | stat: -rwxr-xr-x 2,132 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
#!/usr/bin/make -f

%:
	dh $@ --with autoreconf

# We divert the shared libraries (which are all internal to
# Hercules) into /usr/lib/hercules, which in turn means the plugins would
# normally go in /usr/lib/hercules/hercules.
#
# However, Hercules will actually look in ${prefix}/lib/hercules for
# plugins (and that path makes more sense anyway), so we override it
# at build/install time by changing the make arguments.
#
# Hopefully this will become unnecessary if upstream add a --with-modexecdir
# option or something. It might need changing in new upstream releases if
# they stop hard-coding ${prefix}/lib/hercules.

CONFIGURE_ARGS := --prefix=/usr --enable-optimization="$(CFLAGS)" \
	--libdir=/usr/lib/hercules \
	--mandir=/usr/share/man/ --enable-cckd-bzip2 --enable-het-bzip2 \
	--enable-custom=Debian --enable-capabilities \
	--enable-external-gui --without-included-ltdl
MAKE_ARGS := modexecdir=/usr/lib/hercules

export DEB_LDFLAGS_MAINT_APPEND = -lltdl

override_dh_autoreconf:
	dh_autoreconf autoreconf -- -fvi -Im4 -Iautoconf

override_dh_auto_configure:
	dh_auto_configure -- $(CONFIGURE_ARGS)

override_dh_auto_build:
	dh_auto_build -- $(MAKE_ARGS)
	/usr/bin/docbook-to-man debian/hercules.sgml > hercules.1

override_dh_auto_install:
	$(MAKE) install DESTDIR=$(CURDIR)/debian/hercules $(MAKE_ARGS)
	sed -i "/dependency_libs/ s/'.*'/''/" `find $(CURDIR)/debian/hercules -name '*.la'`
	rm $(CURDIR)/debian/hercules/usr/bin/bldlvlck
	rm $(CURDIR)/debian/hercules/usr/bin/herclin
	install -m 644 hercules.1 $(CURDIR)/debian/hercules/usr/share/man/man1
	mkdir -p $(CURDIR)/debian/hercules/usr/libexec/hercules
	mv $(CURDIR)/debian/hercules/usr/bin/hercifc \
		$(CURDIR)/debian/hercules/usr/libexec/hercules/hercifc
	mkdir -p $(CURDIR)/debian/hercules/usr/share/doc/hercules
	mv -t $(CURDIR)/debian/hercules/usr/share/doc/hercules \
		$(CURDIR)/debian/hercules/usr/share/hercules/images \
		$(CURDIR)/debian/hercules/usr/share/hercules/*.css \
		$(CURDIR)/debian/hercules/usr/share/hercules/*.html

override_dh_auto_clean:
	dh_auto_clean
	rm -f hercules.1

override_dh_link:
	dh_link
	jdupes -rl debian/hercules/usr