Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2
3 # Export DH_OPTIONS to save options for binary-common
4 export DH_OPTIONS
5
6 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
7 CFLAGS += -O0 -D_REENTRANT
8 else
9 CFLAGS += -O2 -D_REENTRANT
10 endif
11
12 CONFIGURATION_OPTIONS = --with-enhanced-ligand-tools --disable-static --with-gemmi=/usr/lib/$(DEB_HOST_MULTIARCH) --with-libdw
13 ifneq ($(DEB_HOST_ARCH),hurd-i386)
14 CONFIGURATION_OPTIONS += --with-sound
15 endif
16
17 # Link with libatomic on riscv64, mips64el and loong64
18 ifneq (,$(filter $(DEB_HOST_ARCH),riscv64 mips64el loong64))
19 export DEB_LDFLAGS_MAINT_APPEND += -Wl,--no-as-needed -latomic -Wl,--as-needed
20 endif
21
22 override_dh_auto_configure:
23 dh_auto_configure --buildsystem autoconf -- $(CONFIGURATION_OPTIONS)
24 dh_auto_configure --buildsystem cmake
25
26 execute_after_dh_auto_build:
27 dh_auto_build --buildsystem cmake
28
29 override_dh_auto_test:
30
31 override_dh_auto_install:
32 dh_auto_install
33 dh_auto_install --buildsystem cmake
34
35 dh_auto_install --sourcedirectory data
36 dh_auto_install --sourcedirectory rama-data
37 dh_auto_install --sourcedirectory python
38 dh_auto_install --sourcedirectory pyrogen
39
40 # Drop the remaining *.la files
41 find debian/tmp -name '*.la' | xargs --no-run-if-empty rm
42
43 # Adjust the LD_LIBRARY_PATH setting
44 sed -i 's/$${exec_prefix}\/libexec\/coot-1/LD_LIBRARY_PATH=$${prefix}\/lib\/'$(DEB_HOST_MULTIARCH)'\/coot $${exec_prefix}\/libexec\/coot-1/' \
45 debian/tmp/usr/bin/coot
46 sed -i 's/LD_LIBRARY_PATH=$$COOT_PREFIX\/lib/LD_LIBRARY_PATH=$$COOT_PREFIX\/lib\/'$(DEB_HOST_MULTIARCH)'\/coot/g' \
47 debian/tmp/usr/bin/*
48 sed -i 's/LD_LIBRARY_PATH=$$prfx\/lib/LD_LIBRARY_PATH=\/usr\/lib\/'$(DEB_HOST_MULTIARCH)'\/coot/g' \
49 debian/tmp/usr/bin/pyrogen
50
51 # Wrapper for layla (#1072618)
52 mkdir --parents debian/tmp/usr/libexec
53 mv debian/tmp/usr/bin/layla debian/tmp/usr/libexec
54 echo '#!/bin/sh' > debian/tmp/usr/bin/layla
55 echo LD_LIBRARY_PATH=/usr/lib/$(DEB_HOST_MULTIARCH)/coot /usr/libexec/layla >> debian/tmp/usr/bin/layla
56 chmod +x debian/tmp/usr/bin/layla
57
58 # decode image and convert to smaller sizes
59 # TODO: let us reuse pixmaps/coot-icon.png
60 uudecode < debian/coot-button-64x64.png.uu
61 for g in 22x22 24x24 32x32 48x48; do \
62 convert -geometry $$g coot-button-64x64.png coot-button-$$g.png;\
63 done
64
65 # install the newly generated png's in the hicolor theme
66 for g in 22x22 24x24 32x32 48x48 64x64; do \
67 install -D coot-button-$$g.png debian/tmp/usr/share/icons/hicolor/$$g/apps/coot.png;\
68 done
69
70 execute_after_dh_install-arch:
71 rm debian/coot/usr/lib/$(DEB_HOST_MULTIARCH)/coot/libcootapi.so*
72
73 override_dh_install-indep:
74 dh_install -i --exclude=scheme
75
76 override_dh_installdocs:
77 dh_installdocs RELEASE-NOTES # debian/citation.bib -- not available (?)
78
79 override_dh_shlibdeps:
80 dh_shlibdeps -l/usr/lib/$(DEB_HOST_MULTIARCH)/coot
81
82 execute_after_dh_auto_clean:
83 dh_auto_clean --buildsystem cmake
84
85 debian/copyright.hints:
86 mkdir debian/licensecheck
87 rsync -a --exclude .git --exclude debian --exclude '*.jpg' --exclude '*.png' --exclude '*.ogg' . debian/licensecheck/
88 sed -i 's/;;;;/ */g' debian/licensecheck/scheme/* # Fixup scheme comments which are not understood by licensecheck
89 (cd debian/licensecheck && licensecheck -r . --deb-machine --lines 100) > $@
90 rm -rf debian/licensecheck
91
92 %:
93 dh $@