-Dir::Bin::uncompressed \"/does/not/exist\";
-Dir::Bin::gzip \"/does/not/exist\";
-Dir::Bin::bzip2 \"/does/not/exist\";
-Dir::Bin::lzma \"/does/not/exist\";
-Dir::Bin::xz \"/does/not/exist\";" > "$CONFFILE"
- if [ -e "/bin/${COMPRESSOR}" ]; then
- echo "Dir::Bin::${COMPRESSOR} \"/bin/${COMPRESSOR}\";" >> "$CONFFILE"
- elif [ -e "/usr/bin/${COMPRESSOR}" ]; then
- echo "Dir::Bin::${COMPRESSOR} \"/usr/bin/${COMPRESSOR}\";" >> "$CONFFILE"
- elif [ "${COMPRESSOR}" = 'lzma' ]; then
- echo 'Dir::Bin::xz "/usr/bin/xz";' >> "$CONFFILE"
- COMPRESSOR_CMD='xz --format=lzma'
- else
- msgtest 'Test for availability of compressor' "${COMPRESSOR}"
- msgfail "${COMPRESSOR} not available"
- fi
-}
-
-setupsimplenativepackage() {
- local NAME="$1"
- local ARCH="$2"
- local VERSION="$3"
- local RELEASE="${4:-unstable}"
- local DEPENDENCIES="$5"
- local DESCRIPTION="${6:-"an autogenerated dummy ${NAME}=${VERSION}/${RELEASE}
- If you find such a package installed on your system,
- something went horribly wrong! They are autogenerated
- und used only by testcases and serve no other purpose…"}"
-
- local SECTION="${7:-others}"
- local DISTSECTION
- if [ "$SECTION" = "${SECTION#*/}" ]; then
- DISTSECTION="main"
- else
- DISTSECTION="${SECTION%/*}"
- fi
- local BUILDDIR=incoming/${NAME}-${VERSION}
- mkdir -p ${BUILDDIR}/debian/source
- cd ${BUILDDIR}
- echo "* most suckless software product ever" > FEATURES
- test -e debian/copyright || echo "Copyleft by Joe Sixpack $(date +%Y)" > debian/copyright
- test -e debian/changelog || echo "$NAME ($VERSION) $RELEASE; urgency=low
-
- * Initial release
-
- -- Joe Sixpack <joe@example.org> $(date -R)" > debian/changelog
- test -e debian/control || echo "Source: $NAME
-Section: $SECTION
-Priority: optional
-Maintainer: Joe Sixpack <joe@example.org>
-Build-Depends: debhelper (>= 7)
-Standards-Version: 3.9.1
-
-Package: $NAME" > debian/control
- if [ "$ARCH" = 'all' ]; then
- echo "Architecture: all" >> debian/control
- else
- echo "Architecture: any" >> debian/control
- fi
- test -z "$DEPENDENCIES" || echo "$DEPENDENCIES" >> debian/control
- echo "Description: $DESCRIPTION" >> debian/control
-
- test -e debian/compat || echo "7" > debian/compat
- test -e debian/source/format || echo "3.0 (native)" > debian/source/format
- test -e debian/rules || cp /usr/share/doc/debhelper/examples/rules.tiny debian/rules
- cd - > /dev/null