Codebase list rs / d0a0807
begin modernising the packaging mirabilos authored 4 years ago mirabilos committed 4 years ago
7 changed file(s) with 48 addition(s) and 26 deletion(s). Raw diff Collapse all Expand all
0 rs (20200311) UNRELEASED; urgency=medium
0 rs (20181225-2) unstable; urgency=medium
11
22 * WIP
33
+0
-1
debian/compat less more
0 12
22 Priority: optional
33 Maintainer: Thorsten Glaser <tg@mirbsd.de>
44 # possibly works with older libbsd-dev, but haven’t tested how old
5 Build-Depends: debhelper (>= 12~), libbsd-dev (>= 0.2.0-1~), mksh
6 Standards-Version: 4.3.0
5 Build-Depends: debhelper-compat (= 12), libbsd-dev (>= 0.2.0-1~), mksh
6 Standards-Version: 4.5.0
77 Rules-Requires-Root: no
88 VCS-git: https://evolvis.org/anonscm/git/alioth/rs.git -b master
99 VCS-Browser: https://evolvis.org/plugins/scmgit/cgi-bin/gitweb.cgi?p=alioth/rs.git;a=shortlog;h=refs/heads/master
00 #!/usr/bin/make -f
11
2 ifeq (,$(findstring terse,${DEB_BUILD_OPTIONS}))
2 ifeq (,$(filter terse,${DEB_BUILD_OPTIONS}))
33 export DH_VERBOSE=1
44 export V=1
55 export VERBOSE=1
88 LC_ALL:=C
99 export LC_ALL
1010
11 shellescape='$(subst ','\'',$(1))'
12 shellexport=$(1)=$(call shellescape,${$(1)})
13
14 ifneq (,$(wildcard /usr/share/dpkg/buildtools.mk))
15 include /usr/share/dpkg/buildtools.mk
16 else
17 # is ${CC} defined anywhere (other than implicit rules?)
18 ifneq (,$(findstring $(origin CC),default undefined))
19 # no - then default to gcc (or cross-gcc)
1120 DEB_BUILD_ARCH?=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
1221 DEB_HOST_ARCH?=$(shell dpkg-architecture -qDEB_HOST_ARCH)
1322 ifneq (${DEB_BUILD_ARCH},${DEB_HOST_ARCH})
1423 DEB_HOST_GNU_TYPE?=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
24 CC= ${DEB_HOST_GNU_TYPE}-gcc
25 else
26 CC= gcc
1527 endif
16
17 # is ${CC} defined anywhere (other than implicit rules?)
18 ifneq (,$(findstring $(origin CC),default undefined))
19 # no - then default to gcc (or cross-gcc)
20 ifneq (${DEB_BUILD_ARCH},${DEB_HOST_ARCH})
21 CC= ${DEB_HOST_GNU_TYPE}-gcc
22 else
23 CC= gcc
2428 endif
2529 endif
2630
27 EXTRA_CFLAGS= -Wall -Wextra -Wformat
28 EXTRA_CPPFLAGS= -DUSE_LIBBSD
29 EXTRA_LDFLAGS= -Wl,--as-needed
31 OUR_CPPFLAGS:=
32 OUR_CFLAGS:=
33 OUR_LDFLAGS:= -Wl,--as-needed
34
35 ifneq (,$(filter debug,${DEB_BUILD_OPTIONS}))
36 OUR_CFLAGS+= -Og -g3
37 endif
38
39 OUR_CFLAGS+= -Wall -Wextra -Wformat
40 OUR_CPPFLAGS+= -DUSE_LIBBSD
3041
3142 ifneq (,$(wildcard /usr/share/dpkg/buildflags.mk))
3243 # dpkg-dev (>= 1.16.1~)
3344 dpkgbuildflagsmkescape=$(subst \,\\\,$(1))
34 DEB_CFLAGS_MAINT_APPEND=$(call dpkgbuildflagsmkescape,${EXTRA_CFLAGS})
35 DEB_CPPFLAGS_MAINT_APPEND=$(call dpkgbuildflagsmkescape,${EXTRA_CPPFLAGS})
36 DEB_LDFLAGS_MAINT_APPEND=$(call dpkgbuildflagsmkescape,${EXTRA_LDFLAGS})
37 DEB_BUILD_MAINT_OPTIONS=hardening=+all
45 export DEB_BUILD_MAINT_OPTIONS:=hardening=+all
46 export DEB_CPPFLAGS_MAINT_APPEND:=$(call dpkgbuildflagsmkescape,${OUR_CPPFLAGS})
47 export DEB_CFLAGS_MAINT_APPEND:=$(call dpkgbuildflagsmkescape,${OUR_CFLAGS})
48 export DEB_LDFLAGS_MAINT_APPEND:=$(call dpkgbuildflagsmkescape,${OUR_LDFLAGS})
3849 include /usr/share/dpkg/buildflags.mk
3950 else
4051 # old-fashioned way to determine build flags
41 CFLAGS= -O$(if $(findstring noopt,${DEB_BUILD_OPTIONS}),0,2) -g
42 CFLAGS+= ${EXTRA_CFLAGS}
43 CPPFLAGS+= ${EXTRA_CPPFLAGS}
44 LDFLAGS+= ${EXTRA_LDFLAGS}
52 CFLAGS= -O$(if $(findstring noopt,${DEB_BUILD_OPTIONS}),0,2) -g
53 CPPFLAGS+= ${OUR_CPPFLAGS}
54 CFLAGS+= ${OUR_CFLAGS}
55 LDFLAGS+= ${OUR_LDFLAGS}
4556 endif
4657
47 LDADD+= -lbsd
58 #include /usr/share/dpkg/pkg-info.mk
59
60 #ifneq (,$(filter parallel,${DEB_BUILD_OPTIONS}))
61 #MAKE_ARGS+= -j
62 #else ifneq (,$(filter parallel=%,${DEB_BUILD_OPTIONS}))
63 #MAKE_ARGS+= -j$(patsubst parallel=%,%,$(filter parallel=%,${DEB_BUILD_OPTIONS}))
64 #endif
65
66 LDADD+= -lbsd
4867
4968 build build-arch: rs
5069 build-indep:
0 1.0
0 3.0 (quilt)
0 single-debian-patch
0 Please review changes against upstream code using SCM,
1 see the Vcs-* tags in debian/control for its location.
2