diff --git a/.gitea/workflows/build-publish-rpm.yaml b/.gitea/workflows/build-publish-rpm.yaml index 8efeed1..e27e511 100644 --- a/.gitea/workflows/build-publish-rpm.yaml +++ b/.gitea/workflows/build-publish-rpm.yaml @@ -24,9 +24,19 @@ jobs: mkdir -p ~/rpmbuild/{SOURCES,SPECS,BUILD,RPMS,SRPMS} echo "%_topdir %(echo $HOME)/rpmbuild" > ~/.rpmmacros - - name: Create source archive + - name: Check if hello.sh exists run: | - tar -czf hello-0.0.1.tar.gz hello.sh + if [ ! -f hello.sh ]; then + echo "ERROR: hello.sh file not found in repository" + exit 1 + fi + + - name: Create source archive with proper directory structure + run: | + # Create a proper directory structure for the tarball + mkdir -p hello-0.0.1 + cp hello.sh hello-0.0.1/ + tar -czf hello-0.0.1.tar.gz hello-0.0.1 - name: Copy spec file and source run: | diff --git a/hello.spec b/hello.spec index c568e69..dac6365 100644 --- a/hello.spec +++ b/hello.spec @@ -19,10 +19,10 @@ A demo RPM build %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/%{_bindir} -cp hello.sh $RPM_BUILD_ROOT/%{_bindir} +cp hello.sh $RPM_BUILD_ROOT/%{_bindir}/hello %files -%{_bindir}/hello.sh +%{_bindir}/hello %changelog * Wed Jul 09 2025 Lukas Greve - 0.0.1