File: create-manpages

package info (click to toggle)
python-biom-format 2.1.7%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 51,820 kB
  • sloc: python: 12,757; makefile: 155; sh: 79
file content (37 lines) | stat: -rwxr-xr-x 1,421 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh
# Create manpages using help2man
# When calling help2man at package build time this would require
# the following Build-Depends:

HELP2MANDEPENDS="help2man python-dateutil python-cogent"

# Specifically the last one does not come really cheap on slow
# architectures - so we build the manpages statically here

missingdepends=`dpkg -l ${HELP2MANDEPENDS} | \
    grep -v -e "^ii" -e "^|" -e "^++" -e "^ " -e "^..[^[:space:]]" | \
    sed 's/^[a-z][a-z][[:space:]]\+\([^[:space:]]\+\)[[:space:]]\+.*/\1/'`
if [ "$missingdepends" != "" ] ; then \
    echo "Please install the following packages to rebuild the upstream source tarball:" 
    echo $missingdepends
    exit 1
fi

mandir=`dirname $0`
bindir=`dirname ${mandir}`/scripts
codedir=`dirname ${mandir}`/python-code
version=`dpkg-parsechangelog -l${mandir}/changelog | grep Version: | cut -f2 -d' ' | cut -f1 -d- `

mkdir -p ${mandir}
# later we will strip .py extension - so we need to rename the scripts here as well
ln -s ${bindir}/biom_validator.py biom_validator
help2man --no-info --name='Test a biom file for adherence to the format specification' \
    --version-string="${version}" \
    biom_validator > ${mandir}/biom_validator.1
rm biom_validator

ln -s ${bindir}/convert_biom.py convert_biom
PYTHONPATH=${codedir} \
help2man --no-info --name='Script to convert biom formatted files' \
    convert_biom > ${mandir}/convert_biom.1
rm convert_biom