Skip to content

Commit 968ccb1

Browse files
committed
COPR, spec
- `.copr`: - Update `Makefile` based on contributions from @pemensik - Skip prerequisites installation if already installed - Possible to reuse `rpmbuild` and checked out `dist-tools` - Add support for submodules if present - Overwrite existing source tarball - Update `dist-tools` - Quote all shell variables - Remove `autobuild` branch checkout - `spec`: Update source based on contributions from @pemensik - Possible to obtain source file with `spectool -g rpm/*.spec`
1 parent 7b21840 commit 968ccb1

File tree

2 files changed

+23
-10
lines changed

2 files changed

+23
-10
lines changed

.copr/Makefile

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
1-
srpm:
2-
dnf -y install git rpm-build
3-
git checkout -b autobuild
4-
git clone https://github.com/jelu/dist-tools.git ../dist-tools
5-
nosign=yes ../dist-tools/create-source-packages rpm
6-
mkdir -p ../rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
7-
cp ../*.orig.tar.gz ../rpmbuild/SOURCES/
8-
rpmbuild -bs --define "%_topdir ../rpmbuild" --undefine=dist "$(spec)"
9-
cp ../rpmbuild/SRPMS/*.src.rpm "$(outdir)"
1+
top=..
2+
3+
all: srpm
4+
5+
prereq: $(top)/rpmbuild
6+
rpm -q git rpm-build >/dev/null || dnf -y install git rpm-build
7+
8+
update-dist-tools: $(top)/dist-tools
9+
( cd "$(top)/dist-tools" && git pull )
10+
11+
$(top)/dist-tools:
12+
git clone https://github.com/jelu/dist-tools.git "$(top)/dist-tools"
13+
14+
$(top)/rpmbuild:
15+
mkdir -p "$(top)"/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
16+
17+
srpm: prereq update-dist-tools
18+
test -f .gitmodules && git submodule update --init || true
19+
overwrite=yes nosign=yes "$(top)/dist-tools/create-source-packages" rpm
20+
cp ../*.orig.tar.gz "$(top)/rpmbuild/SOURCES/"
21+
rpmbuild -bs --define "%_topdir $(top)/rpmbuild" --undefine=dist "$(spec)"
22+
cp "$(top)"/rpmbuild/SRPMS/*.src.rpm "$(outdir)"

rpm/dsc-datatool.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ License: BSD-3-Clause
88
URL: https://www.dns-oarc.net/oarc/data/dsc
99
# Source needs to be generated by dist-tools/create-source-packages, see
1010
# https://github.com/jelu/dist-tools
11-
Source0: %{name}_%{version}.orig.tar.gz
11+
Source0: https://github.com/DNS-OARC/dsc-datatool/archive/v%{version}.tar.gz?/%{name}_%{version}.orig.tar.gz
1212

1313
BuildArch: noarch
1414

0 commit comments

Comments
 (0)