File: rules

package info (click to toggle)
openstructure 2.9.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 205,228 kB
  • sloc: cpp: 188,129; python: 35,361; ansic: 34,298; fortran: 3,275; sh: 286; xml: 146; makefile: 29
file content (38 lines) | stat: -rwxr-xr-x 1,197 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
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

OPEN_MM_PLUGIN_DIR=/usr/lib/$(DEB_HOST_MULTIARCH)/openmm/plugins
CONFIGURE_OPTIONS = -DOPTIMIZE=ON -DUBUNTU_LAYOUT=ON

ifeq ($(shell test -e $(OPEN_MM_PLUGIN_DIR) && echo YES),YES)
	CONFIGURE_OPTIONS += -DENABLE_MM=ON -DOPEN_MM_PLUGIN_DIR=$(OPEN_MM_PLUGIN_DIR)
endif

ifeq (amd64,$(DEB_HOST_ARCH))
    CONFIGURE_OPTIONS += -DENABLE_PARASAIL=ON
endif

%:
	dh $@ --with python3

override_dh_auto_configure:
	dh_auto_configure -- $(CONFIGURE_OPTIONS)

execute_after_dh_auto_install:
	find debian/tmp/usr/lib -name '*.pyc' | xargs --no-run-if-empty rm

execute_after_dh_install:
	find debian/python3-ost/usr/lib/python3/dist-packages -type f \
		| xargs --no-run-if-empty chmod -x
	find debian/tmp/usr/lib -name 'libost_*.so.*' \
		| while read LIB; \
			do dh_install -p$$(echo $$LIB | cut -d / -f 5 | cut -d . -f 1 | sed 's/_/-/g')2.9 \
				$$LIB usr/lib/$(DEB_HOST_MULTIARCH); \
			done
	find debian/tmp/usr/lib -name 'libost_*.so' \
		| while read LIB; \
			do dh_install -p$$(echo $$LIB | cut -d / -f 5 | cut -d . -f 1 | sed 's/_/-/g')-dev \
				$$LIB usr/lib/$(DEB_HOST_MULTIARCH); \
			done
	chmod u+w debian/openstructure/usr/bin/*