summaryrefslogtreecommitdiff
path: root/src/control.sh
blob: 370e64a8c29ee08e4167a009a906b606657b6b35 (plain)
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
#!/bin/sh
: ${VERSION:=$(TZ=UTC date -Is | tr -d :- | tr T . | sed 's/+.*//')}
: ${PKG:=$(basename $(pwd))}
: ${ARCH:=$(dpkg-architecture -q DEB_BUILD_ARCH)}
cat - "$@" <<END
Package: ${PKG}
Source: ${PKG}
Version: ${VERSION}
Architecture: ${ARCH}
Origin: local
Maintainer: root <root@localhost>
END

set --

[ "$exec_prefix" ] || exit 0
for f in bin/*
do
        [ -f "$f" ] || continue
        set -- "$@" "$f ${exec_prefix}"
done
[ $# -gt 0 ] || exit 0

printf 'Files:'
printf ' %s\n' "$@"