2 # $MirOS: contrib/hosted/tg/deb/cvs/debian/rules,v 1.9 2011/07/28 11:23:54 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.
14 ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
20 ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
21 NUMJOBS= $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
22 MAKEFLAGS+= -j${NUMJOBS}
25 CPPFLAGS+= -D_GNU_SOURCE
26 CFLAGS+= -fno-strict-aliasing -Wformat
28 CPPFLAGS+= -DUSE_LIBBSD
31 CONFIGURE_ENV:= CC='${CC}'
32 CONFIGURE_ENV+= CFLAGS='${CFLAGS}'
33 CONFIGURE_ENV+= CPPFLAGS='${CPPFLAGS}'
34 CONFIGURE_ENV+= LIBS='${LIBS}'
35 CONFIGURE_ENV+= CSH=/bin/csh
37 # check takes forever, so assume the safe choice
38 CONFIGURE_ENV+= ac_cv_func_working_mktime=no
40 CONFIGURE_ARGS:= --prefix=/usr \
41 --infodir=/usr/share/info \
42 --mandir=/usr/share/man \
44 --disable-dependency-tracking \
45 --disable-maintainer-mode \
49 --enable-password-authenticated-client \
52 --enable-case-sensitivity \
54 --disable-lock-compatibility \
55 --disable-rootcommit \
56 --disable-old-info-format-support \
57 --enable-config-override=no \
60 --with-external-zlib \
62 --with-editor=/usr/bin/editor \
63 --with-tmpdir=/var/tmp \
65 --with-cvs-admin-group=_cvsadmin
67 MAKE_ARGS:= MAKEINFO=makeinfo
68 MAKE_ARGS+= MAKEINFOFLAGS=--no-split
70 CLEANFILES:= autom4te.cache debian/CVSTEMP debian/.*_stamp \
71 debian/builddir debian/stagedir \
72 build-aux/config.guess build-aux/config.sub \
73 doc/cvs.1 doc/cvs.info* doc/cvsclient.info* \
74 doc/cvs.pdf doc/cvsclient.pdf \
75 doc/getdate-cvs.texi \
76 vms/config.h windows-NT/config.h
78 debian/.configure_stamp:
81 cp /usr/share/misc/config.guess /usr/share/misc/config.sub build-aux/
82 mkdir debian/builddir debian/stagedir
83 cd debian/builddir && \
84 env ${CONFIGURE_ENV} sh ../../configure ${CONFIGURE_ARGS}
87 build: debian/.build_stamp
89 debian/.build_stamp: debian/.configure_stamp
91 cd debian/builddir && ${MAKE} ${MAKE_ARGS}
92 cd debian/builddir && ${MAKE} -C doc ${MAKE_ARGS} doc html info pdf txt
100 install: debian/.install_stamp
102 debian/.install_stamp: debian/.build_stamp
107 -rm -rf debian/stagedir
108 mkdir -p debian/stagedir/clogs
109 cd debian/builddir && \
110 ${MAKE} ${MAKE_ARGS} DESTDIR=${CURDIR}/debian/stagedir install
111 cat ChangeLog ChangeLog.zoo >debian/stagedir/clogs/ChangeLog
112 cat doc/ChangeLog doc/ChangeLog.fsf >debian/stagedir/clogs/ChangeLog.doc
113 #cat lib/ChangeLog lib/ChangeLog.fsf >debian/stagedir/clogs/ChangeLog.lib
114 #cat src/ChangeLog src/ChangeLog-97 src/ChangeLog-96 src/ChangeLog-9395 \
115 # src/ChangeLog-9194 >debian/stagedir/clogs/ChangeLog.src
116 cp src/ChangeLog debian/stagedir/clogs/ChangeLog.src
117 cp contrib/ChangeLog debian/stagedir/clogs/ChangeLog.contrib
118 cp diff/ChangeLog debian/stagedir/clogs/ChangeLog.diff
119 #cp m4/ChangeLog debian/stagedir/clogs/ChangeLog.m4
120 #cp man/ChangeLog debian/stagedir/clogs/ChangeLog.man
121 #cp tools/ChangeLog debian/stagedir/clogs/ChangeLog.tools
122 nroff -man -Tascii contrib/cvshelp.man | \
123 col -b >debian/stagedir/cvshelp.txt
126 # Build architecture-independent files here.
127 binary-indep: build install
128 # We have nothing to do by default.
130 # Build architecture-dependent files here.
131 binary-arch: build install
134 dh_installchangelogs debian/stagedir/clogs/ChangeLog
142 cd debian/cvs/usr/share/cvs/contrib && chmod +x descend.sh rcs2sccs.sh
150 binary: binary-indep binary-arch
151 .PHONY: build clean binary-indep binary-arch binary install check