Debian Codegraph @

debian/rules

raw
1 #!/usr/bin/make -f
2
3 NULL =
4
5 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
6 DPKG_EXPORT_BUILDFLAGS = 1
7 include /usr/share/dpkg/buildflags.mk
8
9 include /usr/share/dpkg/architecture.mk
10
11 export LIBDIR = "/usr/lib/$(DEB_HOST_MULTIARCH)"
12 export LIBEXECDIR = "$(LIBDIR)/nx/bin"
13 export INCLUDEDIR = "/usr/include/$(DEB_HOST_MULTIARCH)"
14
15 %:
16 CONFIGURE="./configure --disable-silent-rules \
17 --prefix=/usr \
18 --libdir=$(LIBDIR) \
19 --includedir=$(INCLUDEDIR) \
20 --libexecdir=$(LIBEXECDIR) \
21 --build=$(DEB_BUILD_GNU_TYPE) \
22 --host=$(DEB_HOST_GNU_TYPE)" dh $@ --no-parallel
23
24 override_dh_auto_clean:
25 rm -Rf nx-X11/.build-exports
26 dh_auto_clean --no-parallel
27
28 override_dh_clean:
29 dh_clean
30 rm -f nx-X11/config/cf/date.def
31 rm -f nxproxy/m4/lt*.m4 nxproxy/m4/libtool.m4
32 rm -f nx-X11/lib/include/Makefile
33 rm -f nxcomp/test/Makefile.in
34
35 override_dh_install:
36
37 # strip static libs and remove .la files
38 rm debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libXcomp.la
39 strip --strip-debug --remove-section=.comment --remove-section=.note debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libXcomp.a
40 rm debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libXcompshad.la
41 strip --strip-debug --remove-section=.comment --remove-section=.note debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libXcompshad.a
42 rm debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libNX_X11.la
43 strip --strip-debug --remove-section=.comment --remove-section=.note debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libNX_X11.a
44
45 # remove extras, GL, and other unneeded headers
46 rm -R debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/GL/
47 rm -R debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/nx-X11/extensions/XK*.h
48 rm -R debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/nx-X11/extensions/*Xv*.h
49 rm -R debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/nx-X11/extensions/XRes*.h
50 rm -R debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/nx-X11/extensions/XIproto.h
51 rm -R debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/nx-X11/extensions/XI.h
52 rm -R debian/tmp/usr/include/$(DEB_HOST_MULTIARCH)/nx-X11/Xtrans/
53
54 dh_install
55
56 override_dh_missing:
57 dh_missing --fail-missing
58
59 override_dh_auto_install:
60 PREFIX='/usr' dh_auto_install --no-parallel -Smakefile
61
62 override_dh_auto_build:
63
64 PREFIX='/usr' dh_auto_build --no-parallel -- CDEBUGFLAGS="$(CPPFLAGS) $(CFLAGS)" LOCAL_LDFLAGS="$(LDFLAGS)" SHLIBGLOBALSFLAGS='$(filter-out -pie,$(LDFLAGS))' IMAKE_DEFINES="-DUseTIRPC=1"
65
66 override_dh_makeshlibs:
67 dh_makeshlibs -n
68
69 # Needed for the libX11 RUNPATH/RPATH link-time hack.
70 # dh_shlibdeps will follow dependencies within binaries and choke
71 # on the libX11 dependency, since the SONAME (libX11.*) used while linking
72 # does not match the later detected SONAME (libNX_X11.*) obtained through
73 # the libX11 -> libNX_X11 compat symlink.
74 override_dh_shlibdeps:
75 dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
76
77 get-orig-source:
78 uscan --noconf --force-download --rename --download-current-version --destdir=..