2626 qubes-component-branch :
2727 required : false
2828 type : string
29+ qubes-component-spec-in :
30+ required : false
31+ type : string
2932
3033jobs :
3134 build-and-package :
@@ -82,17 +85,18 @@ jobs:
8285 PKG_DIR : ${{ inputs.qubes-pkg-src-dir }}
8386 PKG_REV : ${{ inputs.qubes-pkg-revision }}
8487 PKG_VER : ${{ inputs.qubes-pkg-version }}
88+ BRANCH : ${{ inputs.qubes-component-branch }}
89+ SPEC_IN : ${{ inputs.qubes-component-spec-in }}
8590 # Following 2 variables are used in double expansion '${${{ github.ref_type }}}',
8691 # do not change these names even though they don't follow the convention.
87- branch_strict : ${{ inputs.qubes-component-branch }}
8892 branch : ${{ github.head_ref }}
8993 tag : ${{ github.ref_name }}
9094 run : |
9195 cp example-configs/qubes-os-r4.2.yml builder.yml
9296 # Switch from Qubes to Docker executor
9397 sed -i "/^executor:$/,+4d; /^#executor:$/,+3s/#//" builder.yml
9498
95- branch_name="${branch_strict }"
99+ branch_name="${BRANCH }"
96100 if [ -z "$branch_name" ]; then
97101 branch_name=${${{ github.ref_type }}}
98102 if [ -z "$branch_name" ]; then
@@ -115,6 +119,11 @@ jobs:
115119 clone_dir=qubesbuilder/$rel_clone_dir
116120 git clone --depth 1 --branch "$branch_name" "${URL/git:/https:}" "$clone_dir"
117121
122+ if [ -n "${SPEC_IN}" ]; then
123+ spec_in_file="${SPEC_IN}.spec.in"
124+ else
125+ spec_in_file="${COMPONENT}.spec.in"
126+ fi
118127 # qubes-builderv2 expects top directory of extracted sources to
119128 # follow "name-version" naming scheme and will fail if other
120129 # naming is used
@@ -123,10 +132,10 @@ jobs:
123132 # naming scheme from `Source0`, which inevitably leads to a
124133 # failure if it's not what qubes-builderv2 expects.
125134 sed '/^Source0:/s/\t.*/\t%{name}-%{version}.tar.gz/' \
126- "$clone_dir/$PKG_DIR/$COMPONENT.spec.in " \
127- > "$clone_dir/$COMPONENT.spec.in .tmp"
135+ "$clone_dir/$PKG_DIR/${spec_in_file} " \
136+ > "$clone_dir/${spec_in_file} .tmp"
128137 # Temporary file handles case when qubes-pkg-src-dir is set to '.'
129- mv "$clone_dir/$COMPONENT.spec.in. tmp" "$clone_dir/$COMPONENT.spec.in "
138+ mv "$clone_dir/${spec_in_file}. tmp" "$clone_dir/${spec_in_file} "
130139
131140 if [ -z "$PKG_REV" ]; then
132141 PKG_REV=1
0 commit comments