File: rules

package info (click to toggle)
dds 2.5.2%2Bddd105-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, stretch
  • size: 1,456 kB
  • sloc: cpp: 8,945; ansic: 281; python: 89; makefile: 87
file content (74 lines) | stat: -rwxr-xr-x 1,921 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/make -f

PYVERSIONS:=$(shell pyversions -vr)

build-indep:

build build-arch: build-stamp
build-stamp:
	# libdds
	$(MAKE)
	# dds
	$(MAKE) -C ddd
	sed -ne '/^\/\* =/,/^\*\//p' ddd/giblib.h > ddd/giblib.txt
	# pydds
	-ln -s ../dll.h ../dds.cpp python
	cd python && set -ex && for v in $(PYVERSIONS) ; do python$$v setup.py build ; done
	touch $@

install: build-stamp
	dh_testroot
	dh_prep
	# libdds
	$(MAKE) install PREFIX=/usr DESTDIR=$(CURDIR)/debian/libdds-dev
	# dds
	$(MAKE) -C ddd install PREFIX=/usr DESTDIR=$(CURDIR)/debian/dds
	# pydds
	cd python && set -ex && for v in $(PYVERSIONS) ; do python$$v setup.py install --root $(CURDIR)/debian/python-pydds --install-layout=deb ; done

test-ddd: build-stamp
	@echo Running ddd test ...
	ddd/ddd -giblib=1-100 ddd/test.gib
	@echo ddd test passed.

test-python: build-stamp
	@echo Running pydds test ...
	cd python && set -ex && for v in $(PYVERSIONS) ; do set $(CURDIR)/python/build/lib.*$$v ; PYTHONPATH=$$1 python$$v trydds.py ; done
	@echo pydds test passed.

binary-indep:

binary binary-arch: install test-ddd test-python
	dh_installchangelogs -a release_notes.txt
	dh_installdocs -a -A debian/README.Debian
	dh_installman -a
	dh_installexamples -a
	dh_strip -a
	dh_compress -a
	dh_python2 -p'python-pydds'
	dh_fixperms -a
	dh_shlibdeps -a
	dh_installdeb -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

clean:
	dh_testdir
	$(MAKE) clean
	$(MAKE) -C ddd clean
	rm -rf python/build
	dh_clean build-stamp ddd/giblib.txt python/dll.h python/dds.cpp

VERSION:=$(shell head -n1 debian/changelog | sed -e 's/dds .//' -e 's/-.*//')

origtgz:
	test ! -e ../dds_$(VERSION).orig.tar.gz
	test ! -d dds-$(VERSION)
	test ! -d .pc
	svn export . dds-$(VERSION)
	rm -rf dds-$(VERSION)/debian
	tar -czf ../dds_$(VERSION).orig.tar.gz dds-$(VERSION)
	rm -rf dds-$(VERSION)

.PHONY: build build-indep build-arch clean binary binary-indep binary-arch install configure