#1808 Update Makefile
Opened 5 months ago by lsedlar. Modified 4 months ago
lsedlar/pungi update-makefile  into  master

file modified
+1 -31
@@ -1,13 +1,8 @@ 

  .PHONY: all clean doc log test

  

  PKGNAME=pungi

- VERSION=$(shell rpm -q --qf "%{VERSION}\n" --specfile ${PKGNAME}.spec | head -n1)

- RELEASE=$(shell rpm -q --qf "%{RELEASE}\n" --specfile ${PKGNAME}.spec | head -n1)

+ VERSION=$(shell grep "^\s*version=" setup.py | cut -d\" -f2)

  GITTAG=${PKGNAME}-$(VERSION)

- PKGRPMFLAGS=--define "_topdir ${PWD}" --define "_specdir ${PWD}" --define "_sourcedir ${PWD}/dist" --define "_srcrpmdir ${PWD}" --define "_rpmdir ${PWD}" --define "_builddir ${PWD}"

- 

- RPM="noarch/${PKGNAME}-$(VERSION)-$(RELEASE).noarch.rpm"

- SRPM="${PKGNAME}-$(VERSION)-$(RELEASE).src.rpm"

  

  PYTEST=pytest

  
@@ -32,10 +27,6 @@ 

  	@echo " archive                 create source tarball"

  	@echo " log                     display changelog for spec file"

  	@echo " tag                     create a git tag according to version and release from spec file"

- 	@echo " rpm                     build rpm"

- 	@echo " srpm                    build srpm"

- 	@echo " rpminstall              build rpm and install it"

- 	@echo " release                 build srpm and create git tag"

  

  

  tag:
@@ -60,24 +51,6 @@ 

  	@echo "The archive is in dist/${PKGNAME}-$(VERSION).tar.bz2"

  

  

- srpm: archive

- 	@rm -f $(SRPM)

- 	@rpmbuild -bs ${PKGRPMFLAGS} ${PKGNAME}.spec

- 	@echo "The srpm is in $(SRPM)"

- 

- 

- rpm: archive

- 	@rpmbuild --clean -bb ${PKGRPMFLAGS} ${PKGNAME}.spec

- 	@echo "The rpm is in $(RPM)"

- 

- 

- rpminstall: rpm

- 	@rpm -ivh --force $(RPM)

- 

- 

- release: tag srpm

- 

- 

  install:

  	@python setup.py install

  
@@ -106,8 +79,5 @@ 

  test-compose:

  	cd tests && ./test_compose.sh

  

- test-multi-compose:

- 	PYTHONPATH=$$(pwd) PATH=$$(pwd)/bin:$$PATH pungi-orchestrate --debug start tests/data/multi-compose.conf

- 

  doc:

  	cd doc; make html

The version should be obtained from setup.py, as we no longer have a spec file. The targets to build RPM or install it have been removed.

Oh, I didn't realize there is a functionality depending on the removed specfile. Do you think that anybody was using it (after replacing the specfile with the up-to-date file) and this won't be missed?

I very much hope no one was doing anything involving rpm --force :sweat_smile:
In my opinion only make tag is somewhat useful (when it works). make test is kinda useful too, but it's not easy to set up the environment for it to work.

Metadata