Ship final spec file instead of template in release tarballs
This is easier to handle downstream, as the spec file can be used as-is, instead of having to get rebuilt. Adjust the clean rule to only remove the .spec if the .spec.in exists, so that it gets removed in the upstream git, but not in unpacked release tarball trees.
This commit is contained in:
parent
12f82a8b31
commit
9af00423f4
1 changed files with 5 additions and 3 deletions
8
Makefile
8
Makefile
|
|
@ -65,7 +65,7 @@ dist/index.js: $(NODE_MODULES_TEST) $(wildcard src/*) package.json webpack.confi
|
|||
|
||||
clean:
|
||||
rm -rf dist/
|
||||
rm -f $(PACKAGE_NAME).spec
|
||||
[ ! -e cockpit-$(PACKAGE_NAME).spec.in ] || rm -f cockpit-$(PACKAGE_NAME).spec
|
||||
|
||||
install: dist/index.js
|
||||
mkdir -p $(DESTDIR)/usr/share/cockpit/$(PACKAGE_NAME)
|
||||
|
|
@ -80,8 +80,10 @@ devel-install: dist/index.js
|
|||
|
||||
# when building a distribution tarball, call webpack with a 'production' environment
|
||||
dist-gzip: NODE_ENV=production
|
||||
dist-gzip: clean $(NODE_MODULES_TEST) all
|
||||
tar czf cockpit-$(PACKAGE_NAME)-$(VERSION).tar.gz --transform 's,^,cockpit-$(PACKAGE_NAME)/,' $$(git ls-files) dist/
|
||||
dist-gzip: $(NODE_MODULES_TEST) all cockpit-$(PACKAGE_NAME).spec
|
||||
tar czf cockpit-$(PACKAGE_NAME)-$(VERSION).tar.gz --transform 's,^,cockpit-$(PACKAGE_NAME)/,' \
|
||||
--exclude cockpit-$(PACKAGE_NAME).spec.in \
|
||||
$$(git ls-files) cockpit-$(PACKAGE_NAME).spec dist/
|
||||
|
||||
srpm: dist-gzip cockpit-$(PACKAGE_NAME).spec
|
||||
rpmbuild -bs \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue