File: rules

package info (click to toggle)
zmat 0.9.8+ds-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 812 kB
  • sloc: ansic: 9,400; makefile: 185; cpp: 104; sh: 101; f90: 64
file content (43 lines) | stat: -rwxr-xr-x 1,379 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
#!/usr/bin/make -f
# export DH_VERBOSE =1

OCTDIR=$(shell octave-config --print LOCALOCTFILEDIR)

%:
	+dh $@

execute_before_dh_auto_clean:
	$(MAKE) -C src clean
	$(RM) -rf src/makefile test/c/makefile test/f90/makefile

override_dh_auto_configure:
	cp src/Makefile src/makefile
	cp test/c/Makefile test/c/makefile
	cp test/f90/Makefile test/f90/makefile
	sed -i -e 's/lz4\/lz4 lz4\/lz4hc//g' src/makefile
	sed -i -e 's/-lz$$/-lz -llz4/g' test/c/makefile test/f90/makefile

override_dh_auto_build:
	$(MAKE) -C src lib
	$(MAKE) -C src oct USERLINKOPT="-lz -llz4"
	$(MAKE) -C src dll USERLINKOPT="-lz -llz4"

override_dh_installchangelogs:
	dh_installchangelogs ChangeLog.txt

override_dh_auto_install:
	install -d debian/libzmat1-dev/usr/include;
	install include/zmatlib.h debian/libzmat1-dev/usr/include;
	install fortran90/zmatlib.f90 debian/libzmat1-dev/usr/include;

	set -e; arch=$$(dpkg-architecture -qDEB_HOST_MULTIARCH); \
	install -d debian/libzmat1/usr/lib/$$arch; \
	install -d debian/libzmat1-dev/usr/lib/$$arch; \
	mv lib/libzmat.so debian/libzmat1/usr/lib/$$arch/libzmat.so.1; \
	mv lib/libzmat.a debian/libzmat1/usr/lib/$$arch/libzmat.a; \
	ln -sf libzmat.so.1 debian/libzmat1-dev/usr/lib/$$arch/libzmat.so
	
	chmod -x zipmat.mex
	dh_install -poctave-zmat zipmat.mex $(OCTDIR)/zmat
	dh_install -poctave-zmat zmat.m $(OCTDIR)/zmat
	dh_octave_substvar -poctave-zmat