Changeset 420


Ignore:
Timestamp:
Nov 25, 2019, 9:21:53 AM (5 years ago)
Author:
g7moreau
Message:
  • Add everything to build a Debian package
Location:
trunk/tssh
Files:
1 added
4 copied

Legend:

Unmodified
Added
Removed
  • trunk/tssh/Makefile

    r414 r420  
    33BINDIR=/usr/bin
    44MANDIR=/usr/share/man/man1
    5 SHAREDIR=/usr/share/ddt
     5SHAREDIR=/usr/share/tssh
    66COMPDIR=/etc/bash_completion.d
    77
     
    99
    1010all:
    11         pod2man ddt | gzip > ddt.1.gz
    12         pod2html ddt > ddt.html
     11        pod2man  tssh | gzip > tssh.1.gz
     12        pod2html tssh        > tssh.html
    1313
    1414install: update
     
    1919        @install -d -m 0755 -o root -g root $(DESTDIR)/$(COMPDIR)
    2020
    21         install    -m 0755 -o root -g root ddt $(DESTDIR)/$(BINDIR)
     21        install    -m 0755 -o root -g root tssh $(DESTDIR)/$(BINDIR)
    2222
    23         install    -m 0644 -o root -g root ddt.1.gz $(DESTDIR)/$(MANDIR)
     23        install    -m 0644 -o root -g root tssh.1.gz $(DESTDIR)/$(MANDIR)
    2424
    2525        install    -m 0644 -o root -g root config.sample.yml $(DESTDIR)/$(SHAREDIR)
    2626
    27         install    -m 0644 -o root -g root ddt.bash_completion $(DESTDIR)/$(COMPDIR)/ddt
     27        install    -m 0644 -o root -g root tssh.bash_completion $(DESTDIR)/$(COMPDIR)/tssh
    2828
    2929sync:
     
    5353ignore: svnignore.txt
    5454        svn propset svn:ignore -F svnignore.txt .
    55         svn propset svn:keywords "Id" ddt
     55        svn propset svn:keywords "Id" tssh
  • trunk/tssh/make-package-debian

    r414 r420  
    11#!/bin/bash
    22#
    3 # 2018/06/19 Gabriel Moreau <Gabriel.Moreau@univ-grenoble-alpes.fr>
     3# 2019/11/25 Gabriel Moreau <Gabriel.Moreau@univ-grenoble-alpes.fr>
    44
    55trap '[ -n "${tmp_folder}" -a -d "${tmp_folder}" ] && rm -rf "${tmp_folder}"' QUIT
     
    88export LANG=C
    99
    10 tmp_folder=$(mktemp --directory /tmp/ddt-XXXXXX)
     10tmp_folder=$(mktemp --directory /tmp/tssh-XXXXXX)
    1111[ -n "${tmp_folder}" -a -d "${tmp_folder}" ] || exit 1
    1212
    1313# Set Name and Version
    14 PKG_NAME=ddt
    15 CODE_VERSION=$(grep 'version->declare' ddt | cut -f 2 -d "'") #'
     14PKG_NAME=tssh
     15CODE_VERSION=$(grep '^VERSION=' tssh | cut -f 2 -d "'") # '
    1616PKG_VERSION=1
    1717
     
    1919mkdir -p ${tmp_folder}/usr/bin
    2020mkdir -p ${tmp_folder}/usr/share/man/man1
    21 mkdir -p ${tmp_folder}/usr/share/ddt
     21mkdir -p ${tmp_folder}/usr/share/tssh
    2222mkdir -p ${tmp_folder}/etc/bash_completion.d
    23 cp ddt                  ${tmp_folder}/usr/bin/
    24 cp ddt.1.gz             ${tmp_folder}/usr/share/man/man1/
    25 cp LICENSE.txt          ${tmp_folder}/usr/share/ddt/
    26 cp config.sample.yml    ${tmp_folder}/usr/share/ddt/
    27 cp ddt.bash_completion  ${tmp_folder}/etc/bash_completion.d/
    28 (cd ${tmp_folder}/usr/bin;            ln -s ddt      dhcp-dns-tools)
    29 (cd ${tmp_folder}/usr/share/man/man1; ln -s ddt.1.gz dhcp-dns-tools.1.gz)
    30 chmod -R a+rx        ${tmp_folder}/usr/bin/ddt
     23cp tssh                 ${tmp_folder}/usr/bin/
     24cp tssh.1.gz            ${tmp_folder}/usr/share/man/man1/
     25cp LICENSE.txt          ${tmp_folder}/usr/share/tssh/
     26cp config.sample.sh     ${tmp_folder}/usr/share/tssh/
     27cp tssh.bash_completion ${tmp_folder}/etc/bash_completion.d/
     28chmod -R a+rx        ${tmp_folder}/usr/bin/tssh
    3129chmod -R a+rX,go-w   ${tmp_folder}/usr
    3230chmod -R a+rX,go-w   ${tmp_folder}/etc
     
    4139Version: ${CODE_VERSION}-${PKG_VERSION}
    4240Section: utils
    43 Tag: implemented-in::perl, interface::commandline, role::program
     41Tag: implemented-in::bash, interface::commandline, role::program
    4442Priority: optional
    45 Depends: perl, perl-base, perl-modules, libyaml-syck-perl, libnet-netmask-perl, libreadonly-perl, libfile-touch-perl, libtext-table-perl, libnetaddr-ip-perl
    46 Suggests: libyaml-shell-perl | yamllint, perl-doc, isc-dhcp-server, bind9
     43Depends: tmux, openssh-client, ncurses-bin, findutils, grep
     44Suggests: nmap, parallel
    4745Architecture: all
    4846Installed-Size: $(du -ks ${tmp_folder}|cut -f 1)
    4947Maintainer: Gabriel Moreau <Gabriel.Moreau@univ-grenoble-alpes.fr>
    50 Description: dhcp-dns-tools management of computer names and IP addresses
    51  DDT is an acronym for DHCP-DNS-Tools.
    52  In practise, DDT is an IP Address Management (IPAM) service.
    53  It has been used in the LEGI laboratory for over 10 years.
    54  ddt (dhcp-dns-tools) is a small tool to maintain a set of computers/IP.
    55  In order to help you in this task, ddt command has a set of action
    56  to generated DHCP and DNS configuration files.
     48Description: tmux cluster ssh
     49 tssh is an acronym for tmux ssh.
     50 In practise, tssh is an ncurve version of cluster-ssh.
     51 It has been used in the LEGI laboratory for over 5 years.
     52 tssh is a small tool to luanch command over many computers.
    5753 .
    58  The tool is quite effective and tries to keep things simple
    59  but easily configurable for your site like a swiss army knife.
    60  Everything is saved in a YAML database
    61  and entries could be added, deleted, or modified by the command line.
    62 Homepage: http://servforge.legi.grenoble-inp.fr/projects/soft-trokata/wiki/SoftWare/DDT
     54 The tool is quite effective and tries to keep things simple.
     55Homepage: http://servforge.legi.grenoble-inp.fr/projects/soft-trokata/wiki/SoftWare/tssh
    6356END
    6457
     
    8174echo "( cd /srv/www/debian/ ; reprepro includedeb jessie   ~/jessie/${PKG_NAME}_${CODE_VERSION}-${PKG_VERSION}_all.deb )"
    8275echo "( cd /srv/www/debian/ ; reprepro includedeb stretch ~/stretch/${PKG_NAME}_${CODE_VERSION}-${PKG_VERSION}_all.deb )"
    83 echo "( cd /srv/www/debian/ ; reprepro dumpreferences ) | grep -i ddt"
     76echo "( cd /srv/www/debian/ ; reprepro dumpreferences ) | grep -i tssh"
  • trunk/tssh/svnignore.txt

    r414 r420  
    1 ddt.1.gz
    2 ddt.html
    3 ddt_*_all.deb
     1tssh.1.gz
     2tssh.html
     3tssh_*_all.deb
  • trunk/tssh/tssh.bash_completion

    r414 r420  
    1 # bash completion for ddt
     1# bash completion for tssh
    22
    3 have ddt &&
    4 _ddt() {
     3have tssh &&
     4_tssh() {
    55   local cur prev
    66
     
    1010   prev="${COMP_WORDS[COMP_CWORD-1]}"
    1111
    12    case $prev in
    13       -b|--bootp)
    14          local showlist=$(ddt show-pxe --no-header|awk '{print $1}')
    15          COMPREPLY=($(compgen -W "${showlist}" -- "$cur"))
    16          return 0
    17          ;;
    18       -d|-s|--sector)
    19          local showlist=$(ddt show-sector --no-header|awk '{print $1}')
    20          COMPREPLY=($(compgen -W "${showlist}" -- "$cur"))
    21          return 0
    22          ;;
    23       -p|--pool)
    24          local showlist=$(ddt show-pool --no-header|awk '{print $1}')
    25          COMPREPLY=($(compgen -W "${showlist}" -- "$cur"))
    26          return 0
    27          ;;
    28       -k|--kind)
    29          COMPREPLY=($(compgen -W "dhcp pool-dhcp fix-address" -- "$cur"))
    30          return 0
    31          ;;
    32       -t|--tag)
    33          local showlist=$(ddt show-tag --no-header|awk '{print $1}')
    34          COMPREPLY=($(compgen -W "${showlist}" -- "$cur"))
    35          return 0
    36          ;;
    37    esac
    38 
    3912   if [[ "$cur" == '-*' || $COMP_CWORD -gt 1 ]]
    4013   then
    41       COMPREPLY=($(compgen -W "$(ddt help|grep "^ ddt ${COMP_WORDS[1]}"|sed -e 's/[\[]/\n/g;'|grep -- '^-'|cut -f 1 -d ']'|cut -f 1 -d ' '|sed -e 's/|/ /g;'|xargs echo -n)" -- "$cur"))
     14      COMPREPLY=($(compgen -W "$(tssh -h|grep '^ tssh'|sed -e 's/[\[]/\n/g;'|grep -- '^-'|cut -f 1 -d ']'|cut -f 1 -d ' '|sed -e 's/|/ /g;'|xargs echo -n)" -- "$cur"))
    4215   else
    43       COMPREPLY=($(compgen -W "$($(which ddt||echo /usr/local/bin/ddt) help|grep '^ ddt'|awk '{print $2}'|xargs echo -n)" -- "$cur"))
     16      COMPREPLY=($(compgen -W "$(tssh -h|grep '^ tssh'|sed -e 's/[\[]/\n/g;'|grep -- '^-'|cut -f 1 -d ']'|cut -f 1 -d ' '|sed -e 's/|/ /g;'|xargs echo -n)" -- "$cur"))
    4417   fi
    4518
    46    } && complete -F _ddt ddt
    47 
    48 have dhcp-dns-tools && complete -F _ddt dhcp-dns-tools
     19   } && complete -F _tssh tssh
Note: See TracChangeset for help on using the changeset viewer.