Commit 51a7d13a authored by Sten Spans's avatar Sten Spans

more updates to the release scripting to simplify

creating multiple package flavours from one set of sources.
parent 4ccf5d83
#!/usr/bin/env bash
[ -n "${BASE}" ] || . scripts/_init.sh
[ -f ${RELEASE}/*tar.gz ] || . scripts/_tarball.sh
[ -d ${RELEASE}/debian ] || mkdir -p ${RELEASE}/debian
cd ${RELEASE}/debian
[ -d ${RELEASE}/debian_osc ] || mkdir -p ${RELEASE}/debian_osc
tgz=$(basename ${RELEASE}/*tar.gz)
ver=$(echo ${tgz%.tar.gz}| sed s/${NAME}-//)
# create debian sources
tgz=$(basename ../*tar.gz)
cp ../${tgz} $(echo ${tgz%.tar.gz}| tr - _).orig.tar.gz
tar xf *tar.gz
cd ${NAME}-*
# create regular debian sources
cd ${RELEASE}/debian
cp ${RELEASE}/${tgz} ${NAME}_${ver}.orig.tar.gz
tar xf ${NAME}_${ver}.orig.tar.gz
cd ${NAME}-${ver}
rsync -av ${BASE}/debian .
dpkg-buildpackage -S -sa
cd ${RELEASE}/debian
rm -rf ${NAME}-*
rm -rf ${NAME}-${ver}*
# and now osc hackjobs
cd ${RELEASE}/debian_osc
cp ${RELEASE}/${tgz} ${NAME}_${ver}.orig.tar.gz
cp ${RELEASE}/${tgz} ${NAME}-unstable_${ver}.orig.tar.gz
cp ${RELEASE}/${tgz} ${NAME}-static_${ver}.orig.tar.gz
tar xf ${NAME}_${ver}.orig.tar.gz
cd ${NAME}-${ver}
rsync -av ${BASE}/debian .
dpkg-buildpackage -S -sa -us -uc
# create unstable sources
sed -ie "s/^${NAME}/${NAME}-unstable/" debian/changelog
sed -ie "s/${NAME}\$/${NAME}-unstable/" debian/control
dpkg-buildpackage -S -sa -us -uc
# create static sources
sed -ie "s/^${NAME}-unstable/${NAME}-static/" debian/changelog
sed -ie "s/${NAME}-unstable\$/${NAME}-static/" debian/control
sed -ie "s/CFLAGS/--enable-static-libevent CFLAGS/" debian/rules
dpkg-buildpackage -S -sa -us -uc
cd ${RELEASE}/debian_osc
rm -rf ${NAME}-${ver}*
for dsc in *dsc; do
flavour=${dsc/_*}
sed -i 's/^Format:.*/Format: 1.0/' ${dsc}
sed -i '/^Build-Depends/q' ${dsc}
echo Debtransform-Files-Tar: debian.tar.gz >> ${dsc}
echo Debtransform-Tar: ${tgz} >> ${dsc}
rm ${flavour}_${ver}.orig.tar.gz
done
cd ${BASE}
......@@ -11,6 +11,8 @@ hg pull -u
hg log --style=changelog > ${BASE}/doc/ChangeLog
# create release dir
[ -d ${RELEASE} ] && rm -rf ${RELEASE}
mkdir -p ${RELEASE}
if [ -n "${CLEAN}" ]; then
[ -d ${RELEASE} ] && rm -rf ${RELEASE}
mkdir -p ${RELEASE}
fi
#!/usr/bin/env bash
[ -n "${BASE}" ] || . scripts/_init.sh
[ -f ${RELEASE}/*tar.gz ] || . scripts/_tarball.sh
# create osc repository
mkdir ${RELEASE}/osc.$$
......@@ -8,10 +9,17 @@ cd ${RELEASE}/osc.$$
osc checkout home:sten-blinkenlights
mv home\:sten-blinkenlights ${RELEASE}/osc
rm -rf ${RELEASE}/osc.$$
cp ${RELEASE}/*.tar.gz ${RELEASE}/osc/${NAME}-unstable
cp ${BASE}/rpm/* ${RELEASE}/osc/${NAME}-unstable
[ -d ${RELEASE}/debian ] && \
cp ${RELEASE}/debian/* ${RELEASE}/osc/${NAME}-unstable
[ -d ${RELEASE}/debian_osc ] || return
for flavour in "" "-unstable" "-static"; do
cp ${RELEASE}/debian_osc/${NAME}${flavour}_*dsc \
${RELEASE}/osc/${NAME}${flavour}/${NAME}.dsc
cp ${RELEASE}/debian_osc/${NAME}${flavour}_*debian.tar.gz \
${RELEASE}/osc/${NAME}${flavour}/debian.tar.gz
done
cd ${BASE}
#!/usr/bin/env bash
CLEAN=1
. scripts/_init.sh
. scripts/_tarball.sh
. scripts/_debian.sh
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment