-
-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Makefile and create copr_script.sh
- Loading branch information
Showing
3 changed files
with
37 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,3 @@ | ||
src := $(shell pwd)/.copr | ||
tag= | ||
|
||
srpm: dep | ||
pushd $(src) | ||
$(eval tag=$(shell git tag -l 'v*' --sort=-v:refname | head -n 1)) | ||
@echo $(tag) | ||
spectool -g artalk.spec | ||
./vendor-tarball.sh $(tag) | ||
git stash # make sure workspace is empty. | ||
cp changelog artalk.spec ../ | ||
git add ../changelog ../artalk.spec && git commit -m "for rpmautospec [skip changelog]" | ||
rpmautospec process-distgit ../artalk.spec artalk.spec | ||
git stash pop # pop it! | ||
rpkg srpm --spec artalk.spec --outdir=$(outdir) | ||
popd | ||
|
||
dep: | ||
dnf -y install git rpmdevtools golang rpmautospec rpkg | ||
srpm: | ||
# dnf -y install git rpmdevtools golang rpmautospec rpkg | ||
.copr/copr_script.sh $(outdir) |
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,33 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -euo pipefail | ||
|
||
outdir=$1 | ||
echo "Outdir: $outdir" | ||
|
||
tag=$(git tag -l 'v*' --sort=-v:refname | head -n 1) | ||
echo "Using tag: $tag" | ||
|
||
pushd .copr | ||
|
||
# Download source | ||
spectool -g artalk.spec | ||
|
||
rm -rf "artalk-${tag#v}-vendored.tar.gz" | ||
./vendor-tarball.sh $tag | ||
|
||
# Parse %autorelease and %autochangelog | ||
git stash | ||
cp changelog artalk.spec ../ | ||
git add ../changelog ../artalk.spec | ||
git commit -m "for rpmautospec [skip changelog]" | ||
rpmautospec process-distgit ../artalk.spec artalk.spec | ||
if git stash list | grep -q 'stash@'; then | ||
git stash pop | ||
fi | ||
|
||
# Generate srpm | ||
mkdir -p $outdir | ||
rpkg srpm --spec artalk.spec --outdir=$outdir | ||
|
||
popd |
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