From dfb7068305ee9027495132b2f4a0da7c7a2183ad Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Sat, 14 Sep 2024 17:42:51 +0200 Subject: [PATCH] pkg/fedora: Clean up build scripts --- pkg/fedora/makerpm | 6 +----- pkg/fedora/surface-control | 1 - pkg/fedora/surface-control.spec | 14 ++++---------- 3 files changed, 5 insertions(+), 16 deletions(-) delete mode 120000 pkg/fedora/surface-control diff --git a/pkg/fedora/makerpm b/pkg/fedora/makerpm index d123c23..e551a3f 100755 --- a/pkg/fedora/makerpm +++ b/pkg/fedora/makerpm @@ -81,10 +81,7 @@ for file in $FILES; do [ "$file" = "$DIR/$BUILD" ] && continue [ "$file" = "$DIR/$RPMS" ] && continue - # this three-step process is required to properly handle symlinks to source root - mkdir -p "/tmp/makerpm/$(dirname "$file")" - cp -rH "$file" "/tmp/makerpm/$file" - mv "/tmp/makerpm/$file" "$DIR/$BUILD" + cp -r "$file" "$DIR/$BUILD" done spectool \ @@ -118,4 +115,3 @@ for file in $(find out/ -name '*.rpm'); do rpm --resign $file --define "_gpg_name $KEY" 2>&1 > /dev/null fi done - diff --git a/pkg/fedora/surface-control b/pkg/fedora/surface-control deleted file mode 120000 index 6581736..0000000 --- a/pkg/fedora/surface-control +++ /dev/null @@ -1 +0,0 @@ -../../ \ No newline at end of file diff --git a/pkg/fedora/surface-control.spec b/pkg/fedora/surface-control.spec index 519635e..208fca7 100644 --- a/pkg/fedora/surface-control.spec +++ b/pkg/fedora/surface-control.spec @@ -19,8 +19,6 @@ devices. %prep %build -cd surface-control - export CARGO_TARGET_DIR="$PWD/target" export CARGO_INCREMENTAL=0 @@ -29,16 +27,12 @@ strip --strip-all "target/release/surface" %install rm -rf %{buildroot} -install -D -m755 "surface-control/target/release/surface" "%{buildroot}/usr/bin/surface" -install -D -m644 "surface-control/target/surface.bash" "%{buildroot}/usr/share/bash-completion/completions/surface" -install -D -m644 "surface-control/target/_surface" "%{buildroot}/usr/share/zsh/site-functions/_surface" -install -D -m644 "surface-control/target/surface.fish" "%{buildroot}/usr/share/fish/vendor_completions.d/surface.fish" - -%pre -%sysusers_create_package %{name} "surface-control/etc/sysusers/surface-control.conf" +install -D -m755 "target/release/surface" "%{buildroot}/usr/bin/surface" +install -D -m644 "target/surface.bash" "%{buildroot}/usr/share/bash-completion/completions/surface" +install -D -m644 "target/_surface" "%{buildroot}/usr/share/zsh/site-functions/_surface" +install -D -m644 "target/surface.fish" "%{buildroot}/usr/share/fish/vendor_completions.d/surface.fish" %files -%license surface-control/LICENSE /usr/bin/surface /usr/share/bash-completion/completions/surface /usr/share/zsh/site-functions/_surface