-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #215 from xrelkd/ci/rpm
Support creating package for Fedora
- Loading branch information
Showing
3 changed files
with
71 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euxo pipefail | ||
|
||
PACKAGE_NAME="clipcat" | ||
VERSION=$(basename "$REF") | ||
DIST=$(pwd)/.rpmpkg | ||
|
||
echo "Packaging $PACKAGE_NAME $VERSION for $TARGET..." | ||
|
||
echo "Building $PACKAGE_NAME..." | ||
RUSTFLAGS="$TARGET_RUSTFLAGS" cargo build --target "$TARGET" --release | ||
|
||
mkdir -p "$DIST/usr/bin" | ||
mkdir -p "$DIST/usr/share/bash-completion/completions/" | ||
mkdir -p "$DIST/usr/share/zsh/site-functions/" | ||
mkdir -p "$DIST/usr/share/fish/vendor_completions.d/" | ||
|
||
for cmd in clipcatd clipcatctl clipcat-menu clipcat-notify; do | ||
cp -v "target/$TARGET/release/${cmd}" "$DIST/usr/bin" | ||
|
||
"$DIST/usr/bin/${cmd}" completions bash >"$DIST/usr/share/bash-completion/completions/${cmd}" | ||
chmod 644 "$DIST/usr/share/bash-completion/completions/${cmd}" | ||
|
||
"$DIST/usr/bin/${cmd}" completions zsh >"$DIST/usr/share/zsh/site-functions/_${cmd}" | ||
chmod 644 "$DIST/usr/share/zsh/site-functions/_${cmd}" | ||
|
||
"$DIST/usr/bin/${cmd}" completions fish >"$DIST/usr/share/fish/vendor_completions.d/${cmd}.fish" | ||
chmod 644 "$DIST/usr/share/fish/vendor_completions.d/${cmd}.fish" | ||
done |