also get rid of that csh script (tested only on ULTRIX and SunOS 3/4 õÕ)
[alioth/cvs.git] / debian / rules
index 941c896..a5dad22 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/make -f
-# $MirOS: contrib/hosted/tg/deb/cvs/debian/rules,v 1.7 2011/06/11 03:55:32 tg Exp $
+# $MirOS: contrib/hosted/tg/deb/cvs/debian/rules,v 1.14 2011/12/04 14:55:22 tg Exp $
 #-
 # -*- makefile -*-
 # Sample debian/rules that uses debhelper.
@@ -8,6 +8,7 @@
 # dh-make output file, you may use that output file without restriction.
 # This special exception was added by Craig Small in version 0.37 of dh-make.
 
+SHELL?=                sh
 CC?=           gcc
 CFLAGS=                -Wall -g
 
@@ -23,7 +24,6 @@ MAKEFLAGS+=   -j${NUMJOBS}
 endif
 
 CPPFLAGS+=     -D_GNU_SOURCE
-CPPFLAGS+=     -include ${CURDIR}/debian/port.h
 CFLAGS+=       -fno-strict-aliasing -Wformat
 
 CPPFLAGS+=     -DUSE_LIBBSD
@@ -60,7 +60,7 @@ CONFIGURE_ARGS:=      --prefix=/usr \
                        --with-gssapi \
                        --with-external-zlib \
                        --with-rsh=ssh \
-                       --with-editor=/bin/ed \
+                       --with-editor=/usr/bin/editor \
                        --with-tmpdir=/var/tmp \
                        --with-umask=002 \
                        --with-cvs-admin-group=_cvsadmin
@@ -82,10 +82,10 @@ debian/.configure_stamp:
        cp /usr/share/misc/config.guess /usr/share/misc/config.sub build-aux/
        mkdir debian/builddir debian/stagedir
        cd debian/builddir && \
-           env ${CONFIGURE_ENV} sh ../../configure ${CONFIGURE_ARGS}
+           env ${CONFIGURE_ENV} ${SHELL} ../../configure ${CONFIGURE_ARGS}
        @:>$@
 
-build: debian/.build_stamp
+build build-indep build-arch: debian/.build_stamp
 
 debian/.build_stamp: debian/.configure_stamp
        dh_testdir
@@ -98,13 +98,10 @@ clean:
        -rm -rf ${CLEANFILES}
        dh_clean
 
-install: debian/.install_stamp
-
 debian/.install_stamp: debian/.build_stamp
        dh_testdir
        dh_testroot
-       dh_clean -k
-       dh_installdirs
+       if test -x "$$(which dh_prep)"; then dh_prep; else dh_clean -k; fi
        -rm -rf debian/stagedir
        mkdir -p debian/stagedir/clogs
        cd debian/builddir && \
@@ -122,14 +119,15 @@ debian/.install_stamp: debian/.build_stamp
        #cp tools/ChangeLog debian/stagedir/clogs/ChangeLog.tools
        nroff -man -Tascii contrib/cvshelp.man | \
            col -b >debian/stagedir/cvshelp.txt
+       # uses csh
+       rm -f debian/stagedir/usr/share/cvs/contrib/sccs2rcs
+       # unsafe
+       rm -f debian/stagedir/usr/share/cvs/contrib/rcslock
        @:>$@
 
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
+binary-indep:
 
-# Build architecture-dependent files here.
-binary-arch: build install
+binary-arch: build debian/.install_stamp
        dh_testdir
        dh_testroot
        dh_installchangelogs debian/stagedir/clogs/ChangeLog
@@ -149,4 +147,4 @@ binary-arch: build install
        dh_builddeb
 
 binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install check
+.PHONY: binary binary-arch binary-indep build build-arch build-indep clean