| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
pkg=csound-utils |
| 4 |
outdir="debian/_man/${pkg}" |
| 5 |
|
| 6 |
manpage() { |
| 7 |
cat <<EOF |
| 8 |
.TH ${pkg} 1 |
| 9 |
|
| 10 |
.SH NAME |
| 11 |
csound-utils \- Utilities for Csound |
| 12 |
|
| 13 |
.SH SYNOPSIS |
| 14 |
@binaries@ |
| 15 |
|
| 16 |
.SH DESCRIPTION |
| 17 |
Utilities from the \fBCsound\fP suite |
| 18 |
(a powerful and versatile sound synthesis system). |
| 19 |
Try the \fB--help\fP flag for more information on the actual command. |
| 20 |
|
| 21 |
.SH AUTHOR |
| 22 |
IOhannes m zmölnig for the Debian project. |
| 23 |
|
| 24 |
.SH SEE ALSO |
| 25 |
csound(1) |
| 26 |
EOF |
| 27 |
} |
| 28 |
|
| 29 |
binaries=$(grep "/bin/" debian/${pkg}.install | sed -e 's|.*/||') |
| 30 |
manbin=$(for b in ${binaries}; do echo -n ".B ${b}@.RI [ OPTIONS ]@.LP@@"; done) |
| 31 |
|
| 32 |
mantmp=$(mktemp --suffix .1) |
| 33 |
trap 'rm -rf "${mantmp}"' EXIT INT TERM |
| 34 |
|
| 35 |
manpage | sed -e "s|@binaries@|${manbin}|" -e 's|@|\n|g' > "${mantmp}" |
| 36 |
|
| 37 |
mkdir -p "${outdir}" |
| 38 |
cp "${mantmp}" "${outdir}/${pkg}.1" |
| 39 |
for b in ${binaries}; do |
| 40 |
cp "${mantmp}" "${outdir}/${b}.1" |
| 41 |
done |