ci: udapt to changes for apkg

This commit is contained in:
Daniel Salzman 2021-05-26 18:17:24 +02:00
parent fd92cb8f72
commit da5eef1e8f
4 changed files with 12 additions and 10 deletions

View file

@ -128,8 +128,9 @@ docker:knot-dns:fedora:
.pkg_symbols: &pkg_symbols
stage: test
script:
- ln -s distro/deb debian
- sed -i "s/__VERSION__/99/g" distro/deb/changelog
- ln -s distro/pkg/deb debian
- sed -i "s/{{ version }}/99/g" distro/pkg/deb/changelog
- sed -i "s/{{ release }}/1/g" distro/pkg/deb/changelog
- dpkg-gensymbols -c4 -esrc/.libs/$LIB_NAME.so.$LIB_ABI -P. -p$LIB_NAME$LIB_ABI
allow_failure: true
except:

View file

@ -65,6 +65,6 @@ package() {
mv "${pkgdir}"/etc/knot/{knot.sample.conf,knot.conf}
install -Dm644 distro/common/${pkgname}.service -t "${pkgdir}"/usr/lib/systemd/system/
install -Dm644 distro/arch/${pkgname}.tmpfiles.arch "${pkgdir}"/usr/lib/tmpfiles.d/${pkgname}.conf
install -Dm644 distro/arch/${pkgname}.sysusers "${pkgdir}"/usr/lib/sysusers.d/${pkgname}.conf
install -Dm644 distro/pkg/arch/${pkgname}.tmpfiles.arch "${pkgdir}"/usr/lib/tmpfiles.d/${pkgname}.conf
install -Dm644 distro/pkg/arch/${pkgname}.sysusers "${pkgdir}"/usr/lib/sysusers.d/${pkgname}.conf
}

View file

@ -21,9 +21,9 @@ fi
osc co "${project}" "${package}"
pushd "${project}/${package}"
osc del * ||:
cp -L ../../*.orig.tar.xz ../../*.debian.tar.xz ../../*.dsc ./
cp -rL ../../distro/rpm/* ./
cp -rL ../../distro/arch/* ./
cp -L ../../*.tar.xz ../../*.dsc ./
cp -rL ../../distro/pkg/rpm/* ./
cp -rL ../../distro/pkg/arch/* ./
osc addremove
osc ci -n
popd

View file

@ -27,9 +27,10 @@ if [[ $(echo "${version}" | grep '^[[:alnum:].]$') -ne 0 ]]; then
fi
# Fill in VERSION field in distribution specific files
files="distro/rpm/${package}.spec distro/deb/changelog distro/arch/PKGBUILD"
files="distro/pkg/rpm/${package}.spec distro/pkg/deb/changelog distro/pkg/arch/PKGBUILD"
for file in ${files}; do
sed -i "s/__VERSION__/${version}/g" "${file}"
sed -i "s/{{ version }}/${version}/g" "${file}"
sed -i "s/{{ release }}/1/g" "${file}"
done
# Rename archive to debian format
@ -40,7 +41,7 @@ ln -s "${pkgname}.tar.xz" "${debname}.tar.xz"
# Prepare clean debian-specific directory
tar -xf "${debname}.tar.xz"
pushd "${pkgname}" > /dev/null
cp -arL ../distro/deb debian
cp -arL ../distro/pkg/deb debian
# Optionally remove symbols file
if [ "$withsymbols" = false ]; then