blob: 729a2c6f4c6fd37c22bd53685964b5f3b5ba6a85 (
plain)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
#!/usr/bin/make -f
NULL =
export CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
export CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
export CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
export LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
export LIBDIR = "/usr/lib/$(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)"
export INCLUDEDIR = "/usr/include/$(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)"
%:
CONFIGURE="./configure --with-symbols --prefix=/usr --libdir=$(LIBDIR) --includedir=$(INCLUDEDIR)" dh $@ --with quilt
override_dh_auto_clean:
rm -Rf nx-X11/.build-exports
dh_auto_clean
override_dh_clean:
rm -f nx*/configure
. ./replace.sh; set -x; ls debian/*.install.in | while read file; do rm -f $$(string_rep $$file .install.in .install); done
rm -f debian/nxagent.postinst
rm -fR .preserve/
dh_clean
override_dh_install:
# handle builds for Debian squeeze (non multi-arch)
. ./replace.sh; set -x; if [ -z "$(DEB_BUILD_MULTIARCH)" ]; then \
find debian/*.install.in | while read file; do \
cat $$file | sed -e 's#/\*/#/#g' > $$(string_rep $$file .install.in .install); \
done; \
else \
find debian/*.install.in | while read file; do \
cat $$file > $$(string_rep $$file .install.in .install); \
done; \
fi
# remove static libs
rm debian/tmp/usr/lib/$(DEB_BUILD_MULTIARCH)/libXcomp.a
rm debian/tmp/usr/lib/$(DEB_BUILD_MULTIARCH)/libXcompshad.a
# remove extras, GL, and other unneeded headers
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/GL/
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XInput.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XK*.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/*Xv*.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xtrap*.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XRes*.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/record*.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86vmode.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86vmstr.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86misc.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86dga1.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86dgastr.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86dga.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86dga1str.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86mscstr.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/bigreqstr.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xcmiscstr.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XIproto.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86bigfstr.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/xf86bigfont.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/extensions/XI.h
rm -R debian/tmp/usr/include/$(DEB_BUILD_MULTIARCH)/nx-X11/Xtrans/
dh_install --fail-missing
override_dh_auto_install:
PREFIX=/usr dh_auto_install -Smakefile
override_dh_auto_build:
# let's prep the nxagent.postinst script with the value of the build systems's DEB_BUILD_MULTIARCH variable
sed debian/nxagent.postinst.in -e 's/#DEB_BUILD_MULTIARCH#/$(DEB_BUILD_MULTIARCH)/' > debian/nxagent.postinst
LOCAL_LDFLAGS="$(LDFLAGS)" SHLIBGLOBALSFLAGS="$(LDFLAGS)" SHLIBDIR="$(LIBDIR)" PREFIX=/usr dh_auto_build --parallel
override_dh_strip:
dh_strip -plibnx-x11-6 --dbg-package=libnx-x11-6-dbg
dh_strip -plibnx-xau6 --dbg-package=libnx-xau6-dbg
dh_strip -plibnx-xext6 --dbg-package=libnx-xext6-dbg
dh_strip -plibnx-xinerama1 --dbg-package=libnx-xinerama1-dbg
dh_strip -plibnx-xrender1 --dbg-package=libnx-xrender1-dbg
dh_strip -plibxcomp3 --dbg-package=libxcomp3-dbg
dh_strip -plibxcompshad3 --dbg-package=libxcompshad3-dbg
dh_strip -plibxcompext3 --dbg-package=libxcompext3-dbg
dh_strip -pnxagent --dbg-package=nxagent-dbg
dh_strip -pnxproxy --dbg-package=nxproxy-dbg
dh_strip -pnxauth --dbg-package=nxauth-dbg
|