File: rules

package info (click to toggle)
stimfit 0.16.7-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,164 kB
  • sloc: cpp: 53,875; ansic: 32,115; sh: 5,609; python: 1,784; makefile: 760
file content (113 lines) | stat: -rwxr-xr-x 3,169 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# This file is public domain software, originally written by Joey Hess.
#
# This version is for packages that are architecture independent.

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

DEBPREFIX=$(CURDIR)/debian/tmp/usr
PYVER   := $(shell py3versions -vd)
# Whenever libwxgtk3.0-gtk3-dev installed and wx-config present, need custom opts
WXCONFIG_OPTS=$(shell wx-config --toolkit=gtk3 2>/dev/null 1>&2 && echo '--with-wx-config="wx-config --toolkit=gtk3"' || echo '')

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
	NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
	MAKEFLAGS += -j$(NUMJOBS)
endif

ifneq ($(wildcard /usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial/libhdf5.so),)
  export DEB_CPPFLAGS_MAINT_APPEND := -I/usr/include/hdf5/serial
  export DEB_LDFLAGS_MAINT_APPEND := -Wl,-L/usr/lib/$(DEB_HOST_MULTIARCH)/hdf5/serial
endif

build: build-arch build-indep
build-arch: build-stamp
build-indep: build-stamp
build-stamp:
	dh_testdir

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp

#       Add here commands to clean up after the build process.
	rm -rf ./.libs ./_libs ./.deps ./.stimfit
	rm -rf $(CURDIR)/man
	find -name '*.o' | xargs -r rm -f
	find -name '*.lo' | xargs -r rm -f
	find -name '*.a' | xargs -r rm -f
	find -name '*.la' | xargs -r rm -f
	find -name '*.so' | xargs -r rm -f
	rm -f $(CURDIR)/test.h5
	dh_clean

install: build
	PYTHON=/usr/bin/python$(PYVER) PYTHON_VERSION=$(PYVER) ./configure --enable-python --enable-debian --with-biosig --prefix=$(DEBPREFIX) $(WXCONFIG_OPTS)
	$(MAKE)
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	$(MAKE) check
endif
	$(MAKE) install

	PYTHON=/usr/bin/python$(PYVER) PYTHON_VERSION=$(PYVER) ./configure --enable-module --enable-debian --with-biosig --prefix=$(DEBPREFIX) $(WXCONFIG_OPTS)
	$(MAKE)
	$(MAKE) install

	mkdir $(CURDIR)/man && \
	  cp ./debian/stimfit.1 ./man/stimfit.1

	touch build-stamp

	dh_testroot
#       dh_prep
	dh_installdirs

# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs -X./ChangeLog
	dh_installdocs
	dh_installexamples
	dh_installmenu -pstimfit
#	dh_installdebconf
#	dh_installlogrotate
#	dh_installemacsen
#	dh_installcatalogs
#	dh_installpam
	dh_installmime -pstimfit
#	dh_installinit
#	dh_installcron
#	dh_installinfo
#	dh_installwm
#	dh_installudev
	dh_lintian
#	dh_bugfiles
#	dh_undocumented
	dh_python3
	dh_installman $(CURDIR)/man/stimfit.1
	dh_install --sourcedir=$(CURDIR)/debian/tmp
	dh_link
	dh_compress
	dh_strip --dbg-package=stimfit-dbg
	dh_fixperms
	dh_icons
	#	dh_perl
	[ -x /usr/bin/dh_python3 ] && dh_python3 -V$(PYVER) --no-ext-rename || :
	[ -x /usr/bin/dh_numpy ] && dh_numpy || :
	dh_makeshlibs
	# https://stackoverflow.com/questions/11238134/dpkg-shlibdeps-error-no-dependency-information-found-for
	dh_shlibdeps  --dpkg-shlibdeps-params=--ignore-missing-info
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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