Skip to content

Commit

Permalink
pkg/fedora: Clean up build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
qzed committed Sep 14, 2024
1 parent 5276c1c commit dfb7068
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
6 changes: 1 addition & 5 deletions pkg/fedora/makerpm
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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

1 change: 0 additions & 1 deletion pkg/fedora/surface-control

This file was deleted.

14 changes: 4 additions & 10 deletions pkg/fedora/surface-control.spec
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ devices.
%prep

%build
cd surface-control

export CARGO_TARGET_DIR="$PWD/target"
export CARGO_INCREMENTAL=0

Expand All @@ -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
Expand Down

0 comments on commit dfb7068

Please sign in to comment.