File: rules

package info (click to toggle)
rulex 3.8.6-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 11,504 kB
  • sloc: ansic: 2,216; makefile: 131; lisp: 108; sh: 73
file content (42 lines) | stat: -rwxr-xr-x 1,055 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
#!/usr/bin/make -f
# -*- makefile -*-

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

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

%:
	dh $@

debian/locale/ru_RU.koi8r:
	mkdir -p debian/locale
	localedef -f KOI8-R -i ru_RU $@

ifneq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH))
override_dh_auto_configure: debian/locale/ru_RU.koi8r
	mkdir -p native_build
	cd native_build && ../configure --disable-shared CPPFLAGS= CFLAGS= LDFLAGS= && make db LOCPATH=$(CURDIR)/debian/locale
	cp native_build/data/lexicon data
	dh_auto_configure
endif

override_dh_auto_build-arch:
	dh_auto_build -- -e -C src

override_dh_auto_build-indep: debian/locale/ru_RU.koi8r
	dh_auto_build -- LOCPATH=$(CURDIR)/debian/locale

override_dh_auto_test: debian/locale/ru_RU.koi8r
ifneq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH))
	$(MAKE) -C native_build test LOCPATH=$(CURDIR)/debian/locale
else
	$(MAKE) test LOCPATH=$(CURDIR)/debian/locale
endif

override_dh_auto_clean:
ifneq ($(DEB_HOST_ARCH),$(DEB_BUILD_ARCH))
	rm -rf native_build
endif
	rm -rf debian/locale
	dh_auto_clean