#!/bin/bash BUILD_DIR=/tmp/epd VERSION="0.1" NAME="epd-fuse" PACKAGE_SOURCE_NAME="${NAME}-${VERSION}" PACKAGE_BINARY_NAME="${NAME}-v230-g2-${VERSION}" ORIG_TARBALL="${NAME}_${VERSION}.orig.tar.gz" SCRIPT_ROOT=$(dirname `dirname $0`) set -e if [ -d "${BUILD_DIR}" ]; then rm -R "${BUILD_DIR}" fi echo "Installing dependencies" sudo apt-get install debhelper lsb-release dh-python dh-systemd python-all python3-all python-all-dbg python3-all-dbg python-setuptools python3-setuptools python-support python-pil echo "Preparebuild environment" mkdir "${BUILD_DIR}" cp -a "${SCRIPT_ROOT}/repaper/PlatformWithOS" "${BUILD_DIR}/${PACKAGE_SOURCE_NAME}" echo " Create source tarball" tar -czf "${BUILD_DIR}/${ORIG_TARBALL}" -C "${BUILD_DIR}" "${PACKAGE_SOURCE_NAME}" echo " Copy debian folder into sources" cp -a "${SCRIPT_ROOT}/debian" "${BUILD_DIR}/${PACKAGE_SOURCE_NAME}/" echo "Building the package" cd "${BUILD_DIR}/${PACKAGE_SOURCE_NAME}" dpkg-buildpackage echo "Checking the package" set +e for entry in "${BUILD_DIR}"/*.deb; do echo " Running lintian for package ${entry}" lintian "$entry" done set -e exit 0