Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 2 | Rev 8 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#!/usr/bin/make -f

include /usr/share/cdbs/1/class/autotools.mk
include /usr/share/cdbs/1/rules/debhelper.mk
#include /usr/share/cdbs/1/rules/simple-patchsys.mk
# Currently no patches
#include /usr/share/cdbs/1/rules/dpatch.mk

# the used configure parameters for ./configure
DEB_CONFIGURE_EXTRA_FLAGS := --enable-pam --enable-kerberos --enable-srp \
        --with-pty --enable-tcp-forward --enable-x11-forward \
        --enable-agent-forward --enable-ipv6 --enable-utmp \
        --with-zlib --with-tcpwrappers --with-sshd1=/usr/sbin/sshd \
        --with-x XAUTH_PROGRAM=/usr/bin/xauth

DEB_INSTALL_CHANGELOGS_ALL := $(DEB_SRCDIR)/ChangeLog
DEB_INSTALL_DOCS_ALL := $(DEB_SRCDIR)/README

# cdbs options for lsh-client
DEB_INSTALL_MANPAGES_lsh-client := $(DEB_SRCDIR)/doc/lsh.1 \
        $(DEB_SRCDIR)/doc/lshg.1 debian/mans/lshc.1
DEB_INSTALL_DIRS_lsh-client := usr/bin

# cdbs options for lsh-server
DEB_INSTALL_MANPAGES_lsh-server := debian/mans/lsh-execuv.8 \
        debian/mans/lsh-pam-checkpw.8 \
        debian/mans/lsh-krb-checkpw.8 \
        debian/mans/lsh-server-config.8 \
        $(DEB_SRCDIR)/src/sftp/sftp-server.lsh.8 \
        $(DEB_SRCDIR)/doc/lshd.8
DEB_INSTALL_DIRS_lsh-server := usr/sbin etc/default

# cdbs options for lsh-utils
DEB_INSTALL_MANPAGES_lsh-utils := $(DEB_SRCDIR)/src/sftp/lsftp.1 \
        $(DEB_SRCDIR)/doc/lsh-authorize.1 \
        $(DEB_SRCDIR)/doc/lsh-decode-key.1 \
        $(DEB_SRCDIR)/doc/lsh-decrypt-key.1 \
        $(DEB_SRCDIR)/doc/lsh-export-key.1 \
        $(DEB_SRCDIR)/doc/lsh-make-seed.1 \
        $(DEB_SRCDIR)/doc/lsh-upgrade.1 \
        $(DEB_SRCDIR)/doc/lsh-upgrade-key.1 \
        $(DEB_SRCDIR)/doc/ssh-conv.1 \
        $(DEB_SRCDIR)/doc/lsh-keygen.1 \
        $(DEB_SRCDIR)/doc/lsh-writekey.1 \
        debian/mans/sexp-conv.lsh-utils.1 \
        debian/mans/srp-gen.1 \
        debian/mans/lcp.1
DEB_INSTALL_DOCS_lsh-utils := $(DEB_SRCDIR)/AUTHORS
DEB_INSTALL_DIRS_lsh-utils := usr/bin

# cdbs options for lsh-doc
DEB_INSTALL_DOCS_lsh-doc := $(DEB_SRCDIR)/FAQ $(DEB_SRCDIR)/NEWS \
        $(DEB_SRCDIR)/ChangeLog.1 \
        $(DEB_SRCDIR)/doc/HACKING $(DEB_SRCDIR)/doc/NOTES \
        $(DEB_SRCDIR)/doc/PORTS $(DEB_SRCDIR)/doc/TASKLIST \
        $(DEB_SRCDIR)/doc/TODO $(DEB_SRCDIR)/doc/configuration.txt \
        $(DEB_SRCDIR)/ChangeLog.1
DEB_INSTALL_MANPAGES_lsh-doc := $(DEB_SRCDIR)/doc/DSA.5 \
        $(DEB_SRCDIR)/doc/SHA.5 \
        $(DEB_SRCDIR)/doc/SPKI.5 \
        $(DEB_SRCDIR)/doc/secsh.5
DEB_INSTALL_INFO_lsh-doc := $(DEB_SRCDIR)/doc/lsh.info

reverse-config::
#       make distclean misses this
        rm -f src/nettle/machine.m4

cleanbuilddir::
        rm -f src/sftp/sftp-server.lsh.8

# override the default 
install/lsh-utils::
        for i in \
                lsftp \
                lsh-authorize \
                lsh-decode-key \
                lsh-export-key \
                lsh-keygen \
                lsh-make-seed \
                lsh-writekey \
                srp-gen \
                ssh-conv \
                lsh-decrypt-key \
                lsh-upgrade \
                lsh-upgrade-key \
                lcp \
        ; do \
        mv debian/tmp/usr/bin/$$i debian/lsh-utils/usr/bin/$$i; done
#       Rename sexp-conv so that we can register it with the alternatives system
        mv debian/tmp/usr/bin/sexp-conv \
                debian/lsh-utils/usr/bin/sexp-conv.lsh-utils

install/lsh-server::
        for i in \
                lsh-execuv \
                lsh-pam-checkpw \
                lshd \
                lsh-krb-checkpw \
        ; do \
        mv debian/tmp/usr/sbin/$$i debian/lsh-server/usr/sbin/$$i; done
#       sftp-server has a name conflict with the program of the same name in
#       the "ssh" package. Maybe I should talk to the openssh maintainer about
#       using alternatives?
        mv debian/tmp/usr/sbin/sftp-server \
                debian/lsh-server/usr/sbin/sftp-server.lsh
        cp -a $(DEB_SRCDIR)/src/sftp/sftp-server.8 \
                $(DEB_SRCDIR)/src/sftp/sftp-server.lsh.8
        install -m755 debian/scripts/lsh-server-config \
                debian/lsh-server/usr/sbin

install/lsh-client::
        mv debian/tmp/usr/bin/lsh   debian/lsh-client/usr/bin
        mv debian/tmp/usr/bin/lshg  debian/lsh-client/usr/bin
        install -m755 debian/scripts/lshc debian/lsh-client/usr/bin