Skip to content

Commit

Permalink
Simplify packit custom create archive command
Browse files Browse the repository at this point in the history
  • Loading branch information
psss committed Jun 8, 2020
1 parent 76bc49b commit d04bb9b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ synced_files:
upstream_project_name: tmt
downstream_package_name: tmt

current_version_command: ["make", "packit-version"]

actions:
create-archive:
- make packit-tarball
- make packit-path
- make tarball
get-current-version:
- make version

jobs:
- job: tests
Expand Down
14 changes: 4 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,24 @@ man: source
rst2man $(TMP)/man.rst > $(TMP)/$(PACKAGE)/tmt.1


# RPM packaging
# RPM packaging and Packit
source: clean tmp
mkdir -p $(TMP)/SOURCES
mkdir -p $(TMP)/$(PACKAGE)
cp -a $(FILES) $(TMP)/$(PACKAGE)
rm $(TMP)/$(PACKAGE)/tmt/steps/provision/{base,vagrant}.py
tarball: source man
cd $(TMP) && tar cfz SOURCES/$(PACKAGE).tar.gz $(PACKAGE)
@echo ./tmp/SOURCES/$(PACKAGE).tar.gz
version:
@echo "$(VERSION)"
rpm: tarball
rpmbuild --define '_topdir $(TMP)' -bb tmt.spec
srpm: tarball
rpmbuild --define '_topdir $(TMP)' -bs tmt.spec
packages: rpm srpm


# Packit stuff
packit-tarball: tarball
mv $(TMP)/SOURCES/$(PACKAGE).tar.gz .
packit-path:
@printf "$(PACKAGE).tar.gz"
packit-version:
@printf "$(VERSION)"


# Python packaging
wheel:
python setup.py bdist_wheel
Expand Down

0 comments on commit d04bb9b

Please sign in to comment.