File: rules

package info (click to toggle)
juman 7.0-3.4
  • links: PTS
  • area: main
  • in suites: buster, sid, stretch
  • size: 40,228 kB
  • ctags: 1,474
  • sloc: sh: 10,168; ansic: 9,955; perl: 5,194; makefile: 745
file content (46 lines) | stat: -rwxr-xr-x 1,196 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
#!/usr/bin/make -f
#export DH_VERBOSE=1

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

ifndef PERL
PERL = /usr/bin/perl
endif
PERL_OPTIMIZE = -O2 -Wall
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
PERL_OPTIMIZE += -g
endif

%:
	dh $@ --with autoreconf

override_dh_auto_configure:
	dh_auto_configure -- --libexecdir=/usr/lib --datadir=/usr/lib
	cd perl && $(PERL) Makefile.PL INSTALLDIRS=vendor

override_dh_auto_build:
	dh_auto_build
	$(MAKE) -C perl OPTIMIZE="$(PERL_OPTIMIZE)" DICDIR=`pwd`/dic

override_dh_auto_install:
	dh_auto_install
	rm -rf debian/tmp/usr/lib/juman/doc
	dh_link -pjuman usr/share/doc/juman usr/lib/juman/doc
	for d in dic autodic wikipediadic ; do \
	  for f in $(dicprefix)/$${d}/* ; do \
	    dh_link -pjuman-dic \
		`echo $$f|sed s,debian/juman-dic/,,` \
		`echo $$f|sed s,debian/juman-dic/usr/share/,usr/lib/,` ;\
	  done ;\
	done
	$(MAKE) -C perl install DESTDIR=`pwd`/debian/libjuman-perl DICDIR=`pwd`/dic

override_dh_auto_clean:
	dh_auto_clean
	-$(MAKE) -C perl realclean
	-rm -f dic/*.int dic/jumandic.* dic/JUMAN.connect
	-rm -f autodic/*.int autodic/jumandic.*
	-rm -f wikipediadic/*.int wikipediadic/jumandic.* 

# Do no tests.
override_dh_auto_test: