37 lines
899 B
Bash
37 lines
899 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
set -exo pipefail
|
||
|
|
||
|
|
||
|
ROOT=$(pwd)
|
||
|
|
||
|
function prepare() {
|
||
|
mkdir -p \
|
||
|
"${PKGDIR}/DEBIAN" \
|
||
|
"${PKGDIR}/etc/default" \
|
||
|
"${PKGDIR}/lib/systemd/system"
|
||
|
cp "${ROOT}/mumble-web.defaults" "${PKGDIR}/etc/default/mumble-web"
|
||
|
cp "${ROOT}/mumble-web.service" "${PKGDIR}/lib/systemd/system/mumble-web.service"
|
||
|
cp "${ROOT}/debian.control" "${PKGDIR}/DEBIAN/control"
|
||
|
cp "${ROOT}/debian.conffiles" "${PKGDIR}/DEBIAN/conffiles"
|
||
|
sed -re "s/__MAINTAINER__/${MAINTAINER}/g" -i "${PKGDIR}/DEBIAN/control"
|
||
|
find "${PKGDIR}" -exec touch -m -d "${ISODATE}" {} \;
|
||
|
}
|
||
|
|
||
|
function package() {
|
||
|
cd "${BUILDDIR}"
|
||
|
dpkg-deb --build "${PKGDIR}" "${BUILDDIR}"
|
||
|
}
|
||
|
|
||
|
function build() {
|
||
|
export BUILDDIR=${ROOT}/build
|
||
|
export SRCDIR=${ROOT}/build/srcdir
|
||
|
export PKGDIR=${ROOT}/build/pkgdir
|
||
|
mkdir -p ${SRCDIR} ${PKGDIR}
|
||
|
prepare
|
||
|
package
|
||
|
}
|
||
|
|
||
|
|
||
|
build
|