Debian Codegraph @

debian/rules

raw symbols SCIP
1 #!/usr/bin/make -f
2 # -*- makefile -*-
3 include /usr/share/dpkg/architecture.mk
4 include /usr/share/dpkg/buildtools.mk
5
6 export DEB_BUILD_MAINT_OPTIONS := hardening=+all
7
8 # The _DEFAULT_SOURCE workaround found in upstream CMakeLists.txt
9 # doesn't detect non-Linux systems properly, so manually add the
10 # define here as well.
11 export DEB_CPPFLAGS_MAINT_APPEND := -D_DEFAULT_SOURCE
12
13 BUILD_WAYLAND = $(if $(findstring $(DEB_HOST_ARCH_OS),linux),ON,OFF)
14
15 # glfw dynamically loads all its library dependencies using dlopen, so
16 # we need to add the library dependencies for the packaging manually.
17 #
18 # Use Depends for packages required for commonly used backends, and
19 # Suggests for extra packages.
20 LIBS_X11 = -lXi -lXrandr -lXcursor -lXinerama -lX11-xcb -lXrender -lXxf86vm -lXext -lX11 -lGLX -lOpenGL
21 LIBS_WAYLAND = -lwayland-client -lwayland-cursor -lwayland-egl -lxkbcommon -ldecor-0 -lEGL -lOpenGL
22 LIBS_EXTRA = -lEGL -lGLESv1_CM -lGLESv2
23 LIBS_VULKAN = -lvulkan
24
25 ifeq ($(BUILD_WAYLAND),ON)
26 LIBS_DEPENDS = $(LIBS_X11) $(LIBS_WAYLAND)
27 LIBS_SUGGESTS = $(LIBS_EXTRA) $(LIBS_VULKAN)
28 else
29 LIBS_DEPENDS = $(LIBS_X11)
30 LIBS_SUGGESTS = $(LIBS_EXTRA)
31 endif
32
33 %:
34 dh $@
35
36 override_dh_auto_configure:
37 dh_auto_configure -- -DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_WAYLAND=$(BUILD_WAYLAND)
38
39 override_dh_shlibdeps:
40 dh_shlibdeps
41 $(CC) $(LDFLAGS) -xc -shared -Wl,--no-as-needed -o debian/tmp/dummy-depends.so /dev/null $(LIBS_DEPENDS)
42 $(CC) $(LDFLAGS) -xc -shared -Wl,--no-as-needed -o debian/tmp/dummy-suggests.so /dev/null $(LIBS_SUGGESTS)
43 dpkg-shlibdeps -Tdebian/libglfw3.substvars \
44 -dDepends -edebian/tmp/dummy-depends.so \
45 -dSuggests -edebian/tmp/dummy-suggests.so
46
47 override_dh_installdocs:
48 dh_installdocs -plibglfw3-doc --doc-main-package=libglfw3-dev
49 dh_installdocs --remaining-packages
50
51 override_dh_installexamples:
52 dh_installexamples -plibglfw3-doc --doc-main-package=libglfw3-dev -XCMakeLists.txt
53 dh_installexamples --remaining-packages