fix: build RPM contained in spec definitions

The spec-build.sh was necessary for a proper build, but it is not
correct to depend on external scripts to generate the correct
RPM_BUILD_ROOT files. Now everything is contained in the spec file. The
spec-build.sh can be used in the future to automate the process of
copying sources to the specified directory and signing, but not
modifying the sources contents on a per file basis.

For: https://github.com/ben-grande/qusal/issues/59
This commit is contained in:
Ben Grande 2024-06-24 08:24:48 +02:00
parent f5528fec2e
commit e2791139ee
No known key found for this signature in database
GPG key ID: 00C64E14F51F9E56
59 changed files with 1182 additions and 542 deletions

View file

@ -34,15 +34,9 @@ build_rpm(){
"${build_dir}/BUILD/${group}-${project}/LICENSES/" \
"${build_dir}/SOURCES/${group}-${project}/LICENSES"
cp -r "salt/${project}/"* "${build_dir}/BUILD/${group}-${project}/"
cp -r "salt/${project}/"* "${build_dir}/SOURCES/${group}-${project}/"
for license in $(echo "${license_csv}" | tr "," " "); do
license_dir="LICENSES"
if test -d "salt/${project}/LICENSES"; then
license_dir="salt/${project}/LICENSES"
fi
cp "${license_dir}/${license}.txt" "${build_dir}/BUILD/${group}-${project}/LICENSES/"
done
## TODO: generate tarball to sources.
cp -r . "${build_dir}/BUILD/${group}-${project}/"
cp -r . "${build_dir}/SOURCES/${group}-${project}/"
## TODO: use qubes-builderv2 with mock or qubes executor
rpmbuild -ba --quiet --clean -- "${spec}"