[Gambas-user] gambas dinamic packagin.. for debian

PICCORO McKAY Lenz mckaygerhard at gmail.com
Thu Dec 21 14:09:23 CET 2017


i started a script that based n daily builds can dinamically make debian
packages

for now i have fixed static control file and a script that retrieve the
sourcesand then create the 3 necesary files for made debian packages
dinamically

the idea its the we run a script that search the modules of gambas in
directory structure and then create the control file..


here firts lines:


#!/bin/sh

GAMVER=3.10.0
DEBNAM=gambas3
DEBVER=`grep '^Version' ${DEBNAM}.dsc | tr -cd '[0-9\.\-]'`
DEBTAR="${DEBNAM}_${DEBVER}.debian.tar.xz"

echo "Creating ${DEBTAR}:"

tar -cvJf "${DEBTAR}" --exclude='*.ex' debian

echo "downloading the gambas sources"


wget https://gitlab.com/gambas/gambas/repository/v${GAMVER}/archive.tar.gz
-O ${DEBNAM}-${GAMVER}.tar.gz

echo "Updating checksums..."

ORIGVER=`echo ${DEBVER} | cut -d- -f1`
ORIGTAR="${DEBNAM}-${GAMVER}.tar.gz"
ORIGSIZE=`stat -c %s ${ORIGTAR}`

DEBSIZE=`stat -c %s ${DEBTAR}`

echo " `sha256sum ${ORIGTAR} | cut -d' ' -f1` ${ORIGSIZE}
${DEBNAM}_${ORIGVER}.orig.tar.gz" > checksums.txt
echo " `sha256sum ${DEBTAR} | cut -d' ' -f1` ${DEBSIZE} ${DEBTAR}" >>
checksums.txt
echo "Checksums-Sha1:" >> checksums.txt
echo " `sha1sum ${ORIGTAR} | cut -d' ' -f1` ${ORIGSIZE}
${DEBNAM}_${ORIGVER}.orig.tar.gz" >> checksums.txt
echo " `sha1sum ${DEBTAR} | cut -d' ' -f1` ${DEBSIZE} ${DEBTAR}" >>
checksums.txt
echo "Files:" >> checksums.txt
echo " `md5sum ${ORIGTAR} | cut -d' ' -f1` ${ORIGSIZE}
${DEBNAM}_${ORIGVER}.orig.tar.gz" >> checksums.txt
echo " `md5sum ${DEBTAR} | cut -d' ' -f1` ${DEBSIZE} ${DEBTAR}" >>
checksums.txt

lead='^Checksums-Sha256:$'
sed -i "/$lead/,$ { /$lead/{p; r checksums.txt
        }; d }"  ${DEBNAM}.dsc

rm checksums.txt
cp "${DEBNAM}-${ORIGVER}.tar.gz" "${DEBNAM}_${ORIGVER}.orig.tar.gz"


here now we can do normally debian procedures like "dpkg -x" and then
"debuild"

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20171221/df4cc317/attachment.html>


More information about the User mailing list