| 1 |
|
| 2 |
|
| 3 |
ifeq (,$(filter terse,${DEB_BUILD_OPTIONS})) |
| 4 |
export DH_VERBOSE=1 |
| 5 |
export V=1 |
| 6 |
export VERBOSE=1 |
| 7 |
endif |
| 8 |
|
| 9 |
LC_ALL:=C |
| 10 |
export LC_ALL |
| 11 |
|
| 12 |
shellescape='$(subst ','\'',$(1))' |
| 13 |
shellexport=$(1)=$(call shellescape,${$(1)}) |
| 14 |
|
| 15 |
include /usr/share/dpkg/architecture.mk |
| 16 |
DPKG_EXPORT_BUILDTOOLS:=1 |
| 17 |
include /usr/share/dpkg/buildtools.mk |
| 18 |
|
| 19 |
OUR_CPPFLAGS:= |
| 20 |
OUR_CFLAGS:= |
| 21 |
OUR_LDFLAGS:= |
| 22 |
|
| 23 |
ifneq (,$(filter debug,${DEB_BUILD_OPTIONS})) |
| 24 |
OUR_CFLAGS+= -Og -g3 |
| 25 |
endif |
| 26 |
|
| 27 |
OUR_CFLAGS+= -Wall -Wformat |
| 28 |
OUR_CPPFLAGS+= -D_GNU_SOURCE |
| 29 |
OUR_CPPFLAGS+= -DUSE_LIBBSD |
| 30 |
OUR_CFLAGS+= -fno-strict-aliasing |
| 31 |
|
| 32 |
OUR_CFLAGS+= -std=gnu11 |
| 33 |
|
| 34 |
OUR_CFLAGS+= -fwrapv |
| 35 |
|
| 36 |
OUR_CFLAGS+= -Wno-unused-result |
| 37 |
|
| 38 |
dpkgbuildflagsmkescape=$(subst \,\\\,$(1)) |
| 39 |
export DEB_BUILD_MAINT_OPTIONS:=hardening=+all optimize=-lto |
| 40 |
export DEB_CPPFLAGS_MAINT_APPEND:=$(call dpkgbuildflagsmkescape,${OUR_CPPFLAGS}) |
| 41 |
export DEB_CFLAGS_MAINT_APPEND:=$(call dpkgbuildflagsmkescape,${OUR_CFLAGS}) |
| 42 |
export DEB_LDFLAGS_MAINT_APPEND:=$(call dpkgbuildflagsmkescape,${OUR_LDFLAGS}) |
| 43 |
include /usr/share/dpkg/default.mk |
| 44 |
|
| 45 |
%: |
| 46 |
dh $@ -Snone |
| 47 |
|
| 48 |
LIBS+= -lbsd |
| 49 |
|
| 50 |
CONFIGURE_ENV:= $(foreach i,CC CPPFLAGS CFLAGS LDFLAGS LIBS,$(call shellexport,$i)) |
| 51 |
CONFIGURE_ENV+= CSH=/bin/csh |
| 52 |
CONFIGURE_ENV+= ac_cv_path_MKTEMP=/bin/mktemp |
| 53 |
|
| 54 |
CONFIGURE_ARGS:= --build=${DEB_BUILD_GNU_TYPE} \ |
| 55 |
--host=${DEB_HOST_GNU_TYPE} \ |
| 56 |
--prefix=/usr \ |
| 57 |
--infodir=/usr/share/info \ |
| 58 |
--mandir=/usr/share/man \ |
| 59 |
--sysconfdir=/etc \ |
| 60 |
--disable-dependency-tracking \ |
| 61 |
--disable-maintainer-mode \ |
| 62 |
--disable-pam \ |
| 63 |
--disable-nls \ |
| 64 |
--enable-client \ |
| 65 |
--enable-password-authenticated-client \ |
| 66 |
--enable-server \ |
| 67 |
--enable-proxy \ |
| 68 |
--enable-case-sensitivity \ |
| 69 |
--enable-encryption \ |
| 70 |
--disable-lock-compatibility \ |
| 71 |
--enable-rootcommit \ |
| 72 |
--enable-config-override=no \ |
| 73 |
--without-krb4 \ |
| 74 |
--with-gssapi \ |
| 75 |
--with-external-zlib \ |
| 76 |
--with-rsh=/usr/bin/ssh \ |
| 77 |
--with-editor=/usr/bin/editor \ |
| 78 |
--with-tmpdir=/var/tmp \ |
| 79 |
--with-umask=002 \ |
| 80 |
--with-cvs-admin-group=_cvsadmin |
| 81 |
|
| 82 |
MAKE_ARGS:= MAKEINFO=makeinfo |
| 83 |
MAKE_ARGS+= MAKEINFOFLAGS=--no-split |
| 84 |
|
| 85 |
MAKE_ARGS+= ARFLAGS=rc |
| 86 |
|
| 87 |
CLEANFILES:= autom4te.cache build-aux/config.guess \ |
| 88 |
build-aux/config.sub cvs.spec debian/.*_stamp \ |
| 89 |
debian/CVSTEMP debian/builddir debian/stagedir \ |
| 90 |
doc/cvs-paper.pdf doc/cvs.1 doc/cvs.info* \ |
| 91 |
doc/cvs.pdf doc/cvsclient.info* doc/cvsclient.pdf \ |
| 92 |
doc/getdate-cvs.texi emx/Makefile os2/Makefile \ |
| 93 |
vms/config.h windows-NT/config.h |
| 94 |
|
| 95 |
execute_before_dh_auto_clean: |
| 96 |
dh_testdir |
| 97 |
dh_autoreconf_clean |
| 98 |
-rm -rf ${CLEANFILES} |
| 99 |
|
| 100 |
override_dh_auto_configure: |
| 101 |
dh_testdir |
| 102 |
-rm -rf ${CLEANFILES} |
| 103 |
cp /usr/share/misc/config.guess /usr/share/misc/config.sub build-aux/ |
| 104 |
dh_autoreconf |
| 105 |
mkdir debian/builddir debian/stagedir |
| 106 |
cd debian/builddir && \ |
| 107 |
env ${CONFIGURE_ENV} sh ../../configure ${CONFIGURE_ARGS} |
| 108 |
|
| 109 |
ln -s ../../../build-aux/texinfo.tex debian/builddir/doc/texinfo-r.tex |
| 110 |
printf '%s\n' \ |
| 111 |
'\pdfminorversion4\relax\pdfobjcompresslevel0\relax%' \ |
| 112 |
'\input texinfo-r.tex' \ |
| 113 |
>debian/builddir/doc/texinfo.tex |
| 114 |
|
| 115 |
override_dh_auto_build: |
| 116 |
dh_testdir |
| 117 |
cd debian/builddir && ${MAKE} ${MAKE_ARGS} |
| 118 |
ifeq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) |
| 119 |
cd debian/builddir && ${MAKE} -C doc ${MAKE_ARGS} doc html info pdf txt |
| 120 |
endif |
| 121 |
|
| 122 |
override_dh_auto_test: |
| 123 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
| 124 |
|
| 125 |
buildd |
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
|
| 130 |
set +e; \ |
| 131 |
cd debian/builddir && \ |
| 132 |
env DISABLE_ANY_RSH=1 ${MAKE} ${MAKE_ARGS} check; \ |
| 133 |
rv=$$?; \ |
| 134 |
echo; \ |
| 135 |
test $$rv = 0 || for f in lib/getdate.log \ |
| 136 |
src/check.plog~ src/check.plog src/check.log; do \ |
| 137 |
echo; \ |
| 138 |
if test -e "$$f"; then \ |
| 139 |
echo === "$$f" ===; \ |
| 140 |
echo; \ |
| 141 |
cat "$$f"; \ |
| 142 |
else \ |
| 143 |
echo ::: "$$f" not found :::; \ |
| 144 |
fi; \ |
| 145 |
echo; \ |
| 146 |
done; \ |
| 147 |
echo === CVS testsuite finished with errorlevel $$rv; \ |
| 148 |
exit $$rv |
| 149 |
endif |
| 150 |
|
| 151 |
override_dh_auto_install: |
| 152 |
-rm -rf debian/stagedir |
| 153 |
mkdir -p debian/stagedir/clogs |
| 154 |
cd debian/builddir && \ |
| 155 |
${MAKE} ${MAKE_ARGS} DESTDIR=${CURDIR}/debian/stagedir install |
| 156 |
cat ChangeLog ChangeLog.zoo >debian/stagedir/clogs/ChangeLog |
| 157 |
cat doc/ChangeLog doc/ChangeLog.fsf >debian/stagedir/clogs/ChangeLog.doc |
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
cp src/ChangeLog debian/stagedir/clogs/ChangeLog.src |
| 162 |
cp contrib/ChangeLog debian/stagedir/clogs/ChangeLog.contrib |
| 163 |
cp diff/ChangeLog debian/stagedir/clogs/ChangeLog.diff |
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
rm -f debian/stagedir/usr/share/cvs/contrib/rcs-5.7-commitid.patch |
| 169 |
|
| 170 |
rm -f debian/stagedir/usr/share/cvs/contrib/sccs2rcs |
| 171 |
|
| 172 |
rm -f debian/stagedir/usr/share/cvs/contrib/commit_prep |
| 173 |
rm -f debian/stagedir/usr/share/cvs/contrib/cvs_acls |
| 174 |
rm -f debian/stagedir/usr/share/cvs/contrib/log |
| 175 |
rm -f debian/stagedir/usr/share/cvs/contrib/log_accum |
| 176 |
rm -f debian/stagedir/usr/share/cvs/contrib/mfpipe |
| 177 |
rm -f debian/stagedir/usr/share/cvs/contrib/rcslock |
| 178 |
|
| 179 |
rm -f debian/stagedir/usr/share/cvs/contrib/newcvsroot |
| 180 |
ifneq (,$(filter nodoc,$(DEB_BUILD_OPTIONS))) |
| 181 |
|
| 182 |
endif |
| 183 |
|
| 184 |
override_dh_installchangelogs: |
| 185 |
dh_installchangelogs debian/stagedir/clogs/ChangeLog |
| 186 |
|
| 187 |
execute_after_dh_installdocs: |
| 188 |
mv debian/cvs/usr/share/cvs/contrib/intro.doc \ |
| 189 |
debian/cvs/usr/share/doc/cvs/intro.txt |
| 190 |
|
| 191 |
override_dh_compress: |
| 192 |
dh_compress -X.pdf |
| 193 |
|
| 194 |
execute_before_dh_fixperms: |
| 195 |
cd debian/cvs/usr/share/cvs/contrib && chmod +x descend.sh rcs2sccs.sh |
| 196 |
|
| 197 |
override_dh_builddeb: |
| 198 |
dh_builddeb -- -Zgzip -z9 |