Build quilt packages

This commit is contained in:
2015-09-23 21:21:30 +02:00
parent 5bd63ab0ef
commit 2cff8041dc
8 changed files with 47 additions and 14 deletions

View File

@ -22,7 +22,7 @@ else
tagbranch="build-tag-${BUILD_TAG}"
git checkout -b ${tagbranch}
set_opt "tag_branch" "${tag_branch}"
tags="${BUILD_TAG}"
local tags="${BUILD_TAG}"
fi
if [[ -z ${tags} ]]
@ -44,16 +44,31 @@ do
project_name=$(get_opt project_name)
version=${tag#*/} #$(get_opt version 0.0.0)
version=${version/_/-} #$(get_opt version 0.0.0)
distribution=$(get_opt distribution UNRELEASED)
urgency=$(get_opt urgency low)
commit_count=$(git rev-list --count --first-parent HEAD)
current_commit=$(git log -n 1 --pretty=format:"%h")
version_suffix=${commit_count}~${current_commit}
version_suffix=tamarin${commit_count}~${current_commit}
package_version=${version}-${version_suffix}
package_version=${version}.tamarin${version_suffix}
# Share computed package version
set_opt package_version ${package_version}
# Define package_version opt if not defined
if [ -z "$(get_opt package_version)" ]; then
# Share computed package version
set_opt package_version "${package_version}"
fi
# Define project_version opt if not defined
if [ -z "$(get_opt project_version)" ]; then
# Share computed package version
set_opt project_version "${version}"
fi
# Native packages should not have a revision number
if [ $(get_opt package_format) == 'native' ]; then
package_version=$(echo ${version} | grep -oE '^[0-9.]+')
fi
echo "${project_name} (${package_version}) ${distribution}; urgency=${urgency}" >> debian/changelog

View File

@ -0,0 +1,15 @@
#!/bin/bash
source "${TAMARIN_UTIL}"
if [ -f "debian/source/format" ]; then
format=$(cat debian/source/format)
case ${format} in
"3.0 (native)")
set_opt package_format "native"
;;
"3.0 (quilt)")
set_opt package_format "quilt"
;;
esac
fi

View File

@ -4,5 +4,5 @@ source "${TAMARIN_UTIL}"
if [ -f debian/control ]; then
info "Installing build dependencies..."
mk-build-deps -t "apt-get --force-yes -y" --install debian/control
mk-build-deps -r -t "apt-get --force-yes -y --no-install-recommends" --install debian/control
fi

View File

@ -1,9 +1,11 @@
#!/bin/bash
#!/usr/bin/env bash
source "${TAMARIN_UTIL}"
project_name=$(get_opt project_name)
src_tarball="../${project_name}_${package_version}.orig.tar.gz"
project_version=$(get_opt project_version)
src_tarball="../${project_name}_${project_version}.orig.tar.gz"
info "Creating sources tarball ${src_tarball}"

View File

@ -1,3 +1,3 @@
#!/usr/bin/env bash
echo "RUN apt-get install --yes --no-install-recommends git-core git-buildpackage" >> Dockerfile
echo "RUN apt-get install --yes --no-install-recommends git-core" >> Dockerfile