Rebuild webpack during RPM build

This is necessary to comply with Fedora's packaging policy:
https://docs.fedoraproject.org/en-US/packaging-guidelines/JavaScript/

Include the node cache in the source rpm, unpack it into the main source
dir, and force a webpack rebuild in `%build`.
This commit is contained in:
Martin Pitt 2021-09-03 09:39:04 +02:00 committed by Katerina Koukiou
parent 4ca75f143c
commit 9574611768
3 changed files with 18 additions and 5 deletions

View file

@ -100,7 +100,7 @@ $(NODE_CACHE): $(NODE_MODULES_TEST)
node-cache: $(NODE_CACHE)
srpm: $(TARFILE) cockpit-$(PACKAGE_NAME).spec
srpm: $(TARFILE) $(NODE_CACHE) cockpit-$(PACKAGE_NAME).spec
rpmbuild -bs \
--define "_sourcedir `pwd`" \
--define "_srcrpmdir `pwd`" \
@ -108,7 +108,7 @@ srpm: $(TARFILE) cockpit-$(PACKAGE_NAME).spec
rpm: $(RPMFILE)
$(RPMFILE): $(TARFILE) cockpit-$(PACKAGE_NAME).spec
$(RPMFILE): $(TARFILE) $(NODE_CACHE) cockpit-$(PACKAGE_NAME).spec
mkdir -p "`pwd`/output"
mkdir -p "`pwd`/rpmbuild"
rpmbuild -bb \