Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2 # -*- makefile-gmake -*-
3 #
4 # Uncomment this to turn on verbose mode.
5 #export DH_VERBOSE=1
6 # This has to be exported to make some magic below work.
7 export DH_OPTIONS
8 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
9 DPKG_EXPORT_BUILDFLAGS = 1
10 include /usr/share/dpkg/buildflags.mk
11 include /usr/share/dpkg/architecture.mk
12
13 GRN_WITH_OPTIONS :=
14
15 # aklomp-base64
16 ifneq (,$(filter $(DEB_HOST_ARCH),amd64 arm64 armhf i386 loong64 ppc64el riscv64 ppc64))
17 GRN_WITH_OPTIONS += -DGRN_WITH_BASE64=ON
18 else
19 GRN_WITH_OPTIONS += -DGRN_WITH_BASE64=no
20 endif
21
22 # apache-arrow
23 ifneq (,$(filter $(DEB_HOST_ARCH),amd64 arm64 loong64 ppc64el riscv64))
24 GRN_WITH_OPTIONS += -DGRN_WITH_APACHE_ARROW=ON
25 else
26 GRN_WITH_OPTIONS += -DGRN_WITH_APACHE_ARROW=OFF
27 endif
28
29 # llama.cpp
30 ifneq (,$(filter $(DEB_HOST_ARCH),amd64 arm64 loong64 ppc64el riscv64 s390x))
31 GRN_WITH_OPTIONS += -DGRN_WITH_LLAMA_CPP=system
32 else
33 GRN_WITH_OPTIONS += -DGRN_WITH_LLAMA_CPP=no
34 endif
35
36 # c-blosc2
37 ifneq (,$(filter $(DEB_HOST_ARCH),amd64 arm64 loong64 ppc64el riscv64 alpha m68k sh4 x32))
38 GRN_WITH_OPTIONS += -DGRN_WITH_BLOSC=system
39 else
40 GRN_WITH_OPTIONS += -DGRN_WITH_BLOSC=no
41 endif
42
43 # zeromq
44 ifeq (sh4,$(DEB_HOST_ARCH))
45 GRN_WITH_OPTIONS += -DGRN_WITH_ZEROMQ=no
46 else
47 GRN_WITH_OPTIONS += -DGRN_WITH_ZEROMQ=yes
48 endif
49
50 %:
51 dh $@ --buildsystem=cmake+ninja --without=autoreconf
52
53 override_dh_auto_configure:
54 dh_auto_configure \
55 --buildsystem=cmake+ninja \
56 -- \
57 -DFETCHCONTENT_FULLY_DISCONNECTED=ON \
58 -DGRN_WITH_BASE64=system \
59 -DGRN_WITH_CURL=system \
60 -DGRN_WITH_DOC=ON \
61 -DGRN_WITH_EXAMPLES=ON \
62 -DGRN_WITH_FAISS=system \
63 -DGRN_WITH_H3=system \
64 -DGRN_WITH_LIBEDIT=system \
65 -DGRN_WITH_LIBEVENT=yes \
66 -DGRN_WITH_LIBSTEMMER=yes \
67 -DGRN_WITH_LZ4=system \
68 -DGRN_WITH_MESSAGE_PACK=system \
69 -DGRN_WITH_MRUBY=ON \
70 -DGRN_WITH_MUNIN_PLUGINS=ON \
71 -DGRN_WITH_OPENZL=no \
72 -DGRN_WITH_PCRE=ON \
73 -DGRN_WITH_RAPIDJSON=system \
74 -DGRN_WITH_ROARING_BITMAPS=system \
75 -DGRN_WITH_SIMDJSON=system \
76 -DGRN_WITH_XXHASH=system \
77 -DGRN_WITH_XSIMD=system \
78 -DGRN_WITH_USEARCH=no \
79 -DGRN_WITH_SIMSIMD=OFF \
80 -DGRN_WITH_ZSTD=system \
81 -DGRN_WITH_TOOLS=ON \
82 -Dllama_DIR=/usr/lib/$(DEB_HOST_MULTIARCH)/llama/cmake-private \
83 $(GRN_WITH_OPTIONS)
84
85 # disable 'make check'.
86 override_dh_auto_test:
87
88 override_dh_shlibdeps:
89 ifneq (,$(filter $(DEB_HOST_ARCH),amd64 arm64 loong64 ppc64el riscv64 s390x))
90 dh_shlibdeps -Llibgroonga0t64 -l/usr/lib/$(DEB_HOST_MULTIARCH)/llama/
91 else
92 dh_shlibdeps
93 endif
94
95 override_dh_install:
96 find $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/ -name *.la -delete
97 find $(CURDIR)/debian/tmp/usr/share/doc/ -name 'underscore*.js' -delete
98 find $(CURDIR)/debian/tmp/usr/share/doc/ -name 'jquery*.js' -delete
99 find $(CURDIR)/debian/tmp/usr/share/doc/ -name 'pydata-sphinx-theme.js' -delete
100 install -d debian/tmp/etc/munin/plugin-conf.d/
101 install -m 0644 debian/groonga-munin-plugins.conf \
102 debian/tmp/etc/munin/plugin-conf.d/groonga
103 mv debian/tmp/usr/share/doc/groonga/ \
104 debian/tmp/usr/share/doc/groonga-doc/
105 # remove privacy-breach-generic issue
106 find debian/tmp/usr/share/doc/groonga-doc/ -name '*.html' | xargs sed -i '\|www.googletagmanager.com/gtag/js|d'
107 dh_install
108
109 override_dh_clean:
110 find $(CURDIR) -name *.o -delete
111 find $(CURDIR) -name *.la -delete
112 find $(CURDIR) -name *.a -delete
113 find $(CURDIR) -name *.lai -delete
114 find $(CURDIR) -name *.lo -delete
115 dh_clean