File: rules

package info (click to toggle)
kdrill 6.5deb2-12
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,340 kB
  • sloc: ansic: 7,636; makefile: 47
file content (44 lines) | stat: -rwxr-xr-x 1,201 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

SPECIALFLAGS=DICTLOCATION=/usr/share/edict/kanjidic EDICTLOCATION=/usr/share/edict/edict RADLOCATION=/var/lib/xjdic/radkfile
PKGDIR=$(CURDIR)/debian/tmp

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

export MODULE_CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
export MODULE_DEFINES=$(shell dpkg-buildflags --get CPPFLAGS)
export LOCAL_LDFLAGS=-Wl,--as-needed $(shell dpkg-buildflags --get LDFLAGS)

override_dh_auto_configure:
	xmkmf -a

override_dh_auto_build:
	$(MAKE) $(SPECIALFLAGS)
	$(MAKE) -C makedic

override_dh_auto_test:
	# nothing

override_dh_auto_clean:
	[ ! -f Makefile ] || make distclean
	rm -f KDrill.ad
	make -C makedic clean

override_dh_auto_install:
	# kdrill
	$(MAKE) install DESTDIR=$(PKGDIR) $(SPECIALFLAGS)
	$(MAKE) install.man DESTDIR=$(PKGDIR)
	mkdir -p $(PKGDIR)/usr/share/pixmaps/
	cp kdrill.xpm $(PKGDIR)/usr/share/pixmaps/
	# makedic
	cp makedic/makeedict makedic/makedic $(PKGDIR)/usr/bin
	mkdir -p $(PKGDIR)/usr/share/man/man1
	cp makedic/*.1 $(PKGDIR)/usr/share/man/man1
	# kanadic
	mkdir -p $(PKGDIR)/usr/share/edict
	cp makedic/*.edic $(PKGDIR)/usr/share/edict
	gzip -9nv $(PKGDIR)/usr/share/edict/*.edic

%:
	dh $@ --parallel