2 # $MirOS: contrib/hosted/tg/deb/cvs/debian/rules,v 1.13 2011/12/04 14:51:06 tg Exp $
5 # Sample debian/rules that uses debhelper.
6 # This file was originally written by Joey Hess and Craig Small.
7 # As a special exception, when this file is copied by dh-make into a
8 # dh-make output file, you may use that output file without restriction.
9 # This special exception was added by Craig Small in version 0.37 of dh-make.
15 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
21 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
22 NUMJOBS= $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
23 MAKEFLAGS+= -j${NUMJOBS}
26 CPPFLAGS+= -D_GNU_SOURCE
27 CFLAGS+= -fno-strict-aliasing -Wformat
29 CPPFLAGS+= -DUSE_LIBBSD
32 CONFIGURE_ENV:= CC='${CC}'
33 CONFIGURE_ENV+= CFLAGS='${CFLAGS}'
34 CONFIGURE_ENV+= CPPFLAGS='${CPPFLAGS}'
35 CONFIGURE_ENV+= LIBS='${LIBS}'
36 CONFIGURE_ENV+= CSH=/bin/csh
38 # check takes forever, so assume the safe choice
39 CONFIGURE_ENV+= ac_cv_func_working_mktime=no
41 CONFIGURE_ARGS:= --prefix=/usr \
42 --infodir=/usr/share/info \
43 --mandir=/usr/share/man \
45 --disable-dependency-tracking \
46 --disable-maintainer-mode \
50 --enable-password-authenticated-client \
53 --enable-case-sensitivity \
55 --disable-lock-compatibility \
56 --disable-rootcommit \
57 --disable-old-info-format-support \
58 --enable-config-override=no \
61 --with-external-zlib \
63 --with-editor=/usr/bin/editor \
64 --with-tmpdir=/var/tmp \
66 --with-cvs-admin-group=_cvsadmin
68 MAKE_ARGS:= MAKEINFO=makeinfo
69 MAKE_ARGS+= MAKEINFOFLAGS=--no-split
71 CLEANFILES:= autom4te.cache debian/CVSTEMP debian/.*_stamp \
72 debian/builddir debian/stagedir \
73 build-aux/config.guess build-aux/config.sub \
74 doc/cvs.1 doc/cvs.info* doc/cvsclient.info* \
75 doc/cvs.pdf doc/cvsclient.pdf \
76 doc/getdate-cvs.texi \
77 vms/config.h windows-NT/config.h
79 debian/.configure_stamp:
82 cp /usr/share/misc/config.guess /usr/share/misc/config.sub build-aux/
83 mkdir debian/builddir debian/stagedir
84 cd debian/builddir && \
85 env ${CONFIGURE_ENV} ${SHELL} ../../configure ${CONFIGURE_ARGS}
88 build build-indep build-arch: debian/.build_stamp
90 debian/.build_stamp: debian/.configure_stamp
92 cd debian/builddir && ${MAKE} ${MAKE_ARGS}
93 cd debian/builddir && ${MAKE} -C doc ${MAKE_ARGS} doc html info pdf txt
101 debian/.install_stamp: debian/.build_stamp
104 if test -x "$$(which dh_prep)"; then dh_prep; else dh_clean -k; fi
105 -rm -rf debian/stagedir
106 mkdir -p debian/stagedir/clogs
107 cd debian/builddir && \
108 ${MAKE} ${MAKE_ARGS} DESTDIR=${CURDIR}/debian/stagedir install
109 cat ChangeLog ChangeLog.zoo >debian/stagedir/clogs/ChangeLog
110 cat doc/ChangeLog doc/ChangeLog.fsf >debian/stagedir/clogs/ChangeLog.doc
111 #cat lib/ChangeLog lib/ChangeLog.fsf >debian/stagedir/clogs/ChangeLog.lib
112 #cat src/ChangeLog src/ChangeLog-97 src/ChangeLog-96 src/ChangeLog-9395 \
113 # src/ChangeLog-9194 >debian/stagedir/clogs/ChangeLog.src
114 cp src/ChangeLog debian/stagedir/clogs/ChangeLog.src
115 cp contrib/ChangeLog debian/stagedir/clogs/ChangeLog.contrib
116 cp diff/ChangeLog debian/stagedir/clogs/ChangeLog.diff
117 #cp m4/ChangeLog debian/stagedir/clogs/ChangeLog.m4
118 #cp man/ChangeLog debian/stagedir/clogs/ChangeLog.man
119 #cp tools/ChangeLog debian/stagedir/clogs/ChangeLog.tools
120 nroff -man -Tascii contrib/cvshelp.man | \
121 col -b >debian/stagedir/cvshelp.txt
122 rm -f debian/stagedir/usr/share/cvs/contrib/rcslock
127 binary-arch: build debian/.install_stamp
130 dh_installchangelogs debian/stagedir/clogs/ChangeLog
138 cd debian/cvs/usr/share/cvs/contrib && chmod +x descend.sh rcs2sccs.sh
146 binary: binary-indep binary-arch
147 .PHONY: binary binary-arch binary-indep build build-arch build-indep clean