File: rules

package info (click to toggle)
afnix 3.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 65,288 kB
  • sloc: cpp: 201,098; xml: 35,338; makefile: 4,973; sh: 992; lisp: 249
file content (45 lines) | stat: -rwxr-xr-x 1,268 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
45
#!/usr/bin/make -f
# -*- makefile -*-
#
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

DPKG_EXPORT_BUILDFLAGS=1
include /usr/share/dpkg/buildflags.mk
BUILD_DATE := $(shell date +"%Y-%m-%d")

%:
	dh $@

override_dh_auto_configure:
	./cnf/bin/afnix-setup -o --prefix=/usr
	@echo "Afnix build information"
	@echo "-----"
	@cat bld/cnf/afnix-plat.mak

override_dh_auto_build:
	$(MAKE) world

override_dh_auto_clean:
	[ ! -f Makefile ] || $(MAKE) clean
	rm -rf bld
	dh_clean

override_dh_auto_test:
	$(MAKE) test

override_dh_auto_install:
	$(MAKE) PREFIX=$(CURDIR)/debian/afnix/usr \
		SHRDIR=$(CURDIR)/debian/afnix/usr/share \
		DESTDIR=$(CURDIR)/debian/afnix LIBDIR=$(CURDIR)/debian/afnix/usr/lib/afnix \
		install publish
	find $(CURDIR)/debian/afnix -name "*.1" | xargs sed -i -e "s/$(BUILD_DATE) //g"
	find $(CURDIR)/debian/afnix -name "*.3" | xargs sed -i -e "s/$(BUILD_DATE) //g"
	find $(CURDIR)/debian/afnix -name "*.7" | xargs sed -i -e "s/$(BUILD_DATE) //g"

	# Separate documentation package.
	install -d $(CURDIR)/debian/afnix-doc/usr/share/doc
	mv $(CURDIR)/debian/afnix/usr/share/doc/afnix $(CURDIR)/debian/afnix-doc/usr/share/doc

override_dh_shlibdeps:
	LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$(CURDIR)/debian/afnix/usr/lib/afnix dh_shlibdeps