1
0
mirror of https://github.com/FrodoVDR/channellogos.git synced 2023-10-10 13:36:54 +02:00

update debian

This commit is contained in:
FrodoVDR 2017-01-31 21:49:31 +01:00
parent 75763f7242
commit 4e49c19c1f
3 changed files with 883 additions and 146 deletions

923
debian/changelog vendored

File diff suppressed because it is too large Load Diff

2
debian/control vendored
View File

@ -9,6 +9,6 @@ Homepage: https://github.com/FrodoVDR/svg-channellogos.git
Package: skindesigner-logos Package: skindesigner-logos
Architecture: all Architecture: all
Depends: ${misc:Depends}, vdr-plugin-skindesigner (>= 0.1.2~) Depends: ${misc:Depends}
Description: svg logos for skindesigner Description: svg logos for skindesigner

View File

@ -1,80 +1,56 @@
echo Downloading latest from git repository... #!/bin/bash
# set -x # set -x
BUILDDISTRIBUTION=$1 DISTRIBUTION=trusty
GITSOURCE='https://github.com/FrodoVDR/svg-channellogos.git' GITSOURCE='https://github.com/FrodoVDR/channellogos.git'
BUILDPREFIX=yavdr
FORCEVERSION=''
DEB_SOURCE_PACKAGE=`egrep '^Source: ' debian/control | cut -f 2 -d ' '` DEB_SOURCE_PACKAGE=$(egrep '^Source: ' debian/control | cut -f 2 -d ' ')
DISTRIBUTION=`dpkg-parsechangelog | grep ^Distribution: | sed -e 's/^Distribution:\s*//'`
VERSION_UPSTREAM=`dpkg-parsechangelog | grep ^Version: | sed -e 's/^Version:\s*//' -e s/-[^-]*$// -e s/\.git.*//`
GIT_SHA_OLD=`git show --pretty=format:"%h" --quiet | head -1 || true`
if [ -d ${DEB_SOURCE_PACKAGE} ] ; then PKGVERSION=$(dpkg-parsechangelog | sed -n 's/^Version: \(.*\)-.*/\1/p')
rm -rf ${DEB_SOURCE_PACKAGE} SUBVERSION=$(dpkg-parsechangelog | grep ^Version: | sed -e 's/^Version:\s*//' -e 's/~.*//g' | awk -F'-' '{ print $4 }' | sed -e "s/${BUILDPREFIX}.*//g")
if [ "$SUBVERSION" = '' ] ; then
SUBVERSION=$(dpkg-parsechangelog | grep ^Version: | sed -e 's/^Version:\s*//' -e 's/~.*//g' | awk -F'-' '{ print $2 }' | sed -e "s/${BUILDPREFIX}.*//g")
fi fi
if [ -d ".git" ] ; then git pull origin
git pull CHANGES=$(git log --pretty=format:"%h: %s" -1)
fi
VERSION_DATE=`/bin/date --utc +%0Y%0m%0d` UPSTREAMVERSION="$(git describe --tags)"
GITHEAD=`git rev-list HEAD | wc -l`
GITBUILD="$(printf '%04d' "$GITHEAD")"
BUILD=`/bin/date --utc +%H%M`
VERSION_FULL="${VERSION_UPSTREAM}.git${VERSION_DATE}.${BUILD}" GIT_SHA=$(git show --pretty=format:"%h" --quiet | head -1 || true)
test=$(grep ${GIT_SHA} debian/changelog)
git clone --depth 1 ${GITSOURCE} ${DEB_SOURCE_PACKAGE} if [ $? -eq 0 ] ; then
SUBVERSION=$((SUBVERSION +1))
cd ${DEB_SOURCE_PACKAGE}
GIT_SHA=`git show --pretty=format:"%h" --quiet | head -1 || true`
cd ..
CHKMAKE="/tmp/${DEB_SOURCE_PACKAGE}.make"
CHKFILE="/tmp/${DEB_SOURCE_PACKAGE}.exist"
[ -f ${CHKFILE} ] && rm ${CHKFILE}
if [ "x${GIT_SHA_OLD}" == "x${GIT_SHA}" ] ; then
echo "Keine neue Version von ${DEB_SOURCE_PACKAGE} gefunden: ${GIT_SHA_OLD} = ${GIT_SHA}" | tee ${CHKFILE}
if [ -f ${CHKMAKE} ] ; then
# exit 1
echo
fi
fi
if [ $DISTRIBUTION != 'trusty' ] ; then
DISTRIBUTION='trusty'
else else
DISTRIBUTION='precise' SUBVERSION=0
fi fi
if [ ! -z $BUILDDISTRIBUTION ] ; then NEWVERSION=${UPSTREAMVERSION}-${SUBVERSION}${BUILDPREFIX}0~${DISTRIBUTION}
DISTRIBUTION=$BUILDDISTRIBUTION
if [ ! -f ../${DEB_SOURCE_PACKAGE}_${VERSION_FULL}.orig.tar.xz ] ; then
test=$(git config -l | grep xz)
if [ $? -ne 0 ] ; then
git config tar.tar.xz.command "xz -c"
fi
git archive --format=tar.xz --prefix=${DEB_SOURCE_PACKAGE}-${UPSTREAMVERSION}/ --output=../${DEB_SOURCE_PACKAGE}_${UPSTREAMVERSION}.orig.tar.xz origin/master
fi fi
dch -v ${FORCEVERSION}${NEWVERSION} -u medium -D ${DISTRIBUTION} --force-distribution "new upstream snapshot"
[ $? -ne 0 ] && exit 1
while read -r line ; do dch -a "${line}" ; done <<< "${CHANGES}"
debuild -S -sa
ARCHTYPEN="xz:J bz2:j gz:z" OTHERDISTRIBUTION=precise
for archtyp in ${ARCHTYPEN} OTHERVERSION=${UPSTREAMVERSION}-${SUBVERSION}${BUILDPREFIX}0~${OTHERDISTRIBUTION}
do dch -v ${FORCEVERSION}${OTHERVERSION} --force-bad-version -u medium -D ${OTHERDISTRIBUTION} --force-distribution "rebuild for ${OTHERDISTRIBUTION}"
arch=`echo $archtyp | cut -d: -f1` while read -r line ; do dch -a "${line}" ; done <<< "${CHANGES}"
pack=`echo $archtyp | cut -d: -f2` debuild -S -sa
DEBSRCPKGFILE="../${DEB_SOURCE_PACKAGE}_${VERSION_FULL}.orig.tar.${arch}"
DEBSRCPKGFILEBAK="${DEBSRCPKGFILE}.1"
if [ -f ${DEBSRCPKGFILE} ] ; then OTHERDISTRIBUTION=xenial
mv ${DEBSRCPKGFILE} ${DEBSRCPKGFILEBAK} OTHERVERSION=${UPSTREAMVERSION}-${SUBVERSION}${BUILDPREFIX}0~${OTHERDISTRIBUTION}
fi dch -v ${FORCEVERSION}${OTHERVERSION} --force-bad-version -u medium -D ${OTHERDISTRIBUTION} --force-distribution "rebuild for ${OTHERDISTRIBUTION}"
while read -r line ; do dch -a "${line}" ; done <<< "${CHANGES}"
if [ -f ${DEBSRCPKGFILE} -o -f ${DEBSRCPKGFILEBAK} ] ; then debuild -S -sa
echo "$DEBSRCPKGFILE or $DEBSRCPKGFILEBAK exists";
continue;
else
echo $DEBSRCPKGFILE
tar --exclude=.git --exclude=debian -c${pack}f ${DEBSRCPKGFILE} ${DEB_SOURCE_PACKAGE}
rm -rf ${DEB_SOURCE_PACKAGE}
dch -b -D ${DISTRIBUTION} -v "${VERSION_FULL}-0frodo0~${DISTRIBUTION}" "New upstream snapshot (commit ${GIT_SHA}), build ${GITBUILD}"
break;
fi
done
exit 0 exit 0