Makefile: dist-rpm: copy in RPM sources dir instead of automatically creating rpm
This commit is contained in:
parent
b4e0e036f2
commit
1281bc4a90
33
Makefile
33
Makefile
@ -150,14 +150,6 @@ uninstall:
|
|||||||
done
|
done
|
||||||
|
|
||||||
dist: clean
|
dist: clean
|
||||||
@for f in ChangeLog NEWS; do\
|
|
||||||
case `sed 15q $$f` in \
|
|
||||||
*"$(VERSION)"*) : ;; \
|
|
||||||
*) \
|
|
||||||
echo "$$f not updated; not releasing" 1>&2;\
|
|
||||||
exit 1;; \
|
|
||||||
esac; \
|
|
||||||
done
|
|
||||||
@rm -f history/$(dist_archive)
|
@rm -f history/$(dist_archive)
|
||||||
@$(INSTALL_DIR) history
|
@$(INSTALL_DIR) history
|
||||||
@echo "Creating a temporary copy of the entire repository..."
|
@echo "Creating a temporary copy of the entire repository..."
|
||||||
@ -178,27 +170,10 @@ dist: clean
|
|||||||
popd >/dev/null;\
|
popd >/dev/null;\
|
||||||
rm -fr $$tmpdir
|
rm -fr $$tmpdir
|
||||||
|
|
||||||
dist-rpm: dist $(PACKAGE).spec
|
dist-rpm: dist
|
||||||
@rpm_name=$(PACKAGE)-$(VERSION)-$(RELEASE);\
|
@rpm_sourcedir=`rpm --eval=%{_sourcedir}`;\
|
||||||
rpm_sourcedir=`rpm --eval=%{_sourcedir} 2>/dev/null`;\
|
mv -f history/$(dist_archive) $$rpm_sourcedir;\
|
||||||
rpm_specdir=`rpm --eval=%{_specdir} 2>/dev/null`;\
|
echo "and saved as \`$$rpm_sourcedir/$(dist_archive)'"
|
||||||
for d in $$rpm_sourcedir $$rpm_specdir; do\
|
|
||||||
[ -d "$$d" ] || \
|
|
||||||
{ echo "not found: $$d" 1>&2; exit 1; };\
|
|
||||||
done;\
|
|
||||||
echo "Copying $(dist_archive) to $$rpm_sourcedir...";\
|
|
||||||
(cp -p history/$(dist_archive) $$rpm_sourcedir &&\
|
|
||||||
mv -f $(PACKAGE).spec $$rpm_specdir &&\
|
|
||||||
echo "Creating rpm and srpm packages..." &&\
|
|
||||||
rpmbuild --clean -ba $$rpm_specdir/$(PACKAGE).spec) || exit 1
|
|
||||||
@echo "All done. Enjoy using $(PACKAGE)..."
|
|
||||||
|
|
||||||
dist-rpm-install: dist-rpm
|
|
||||||
@echo "Installing rpm packages..."
|
|
||||||
@rpm_pckdir=`rpm --eval=%{_rpmdir} 2>/dev/null`;\
|
|
||||||
sudo rpm -hUv --force\
|
|
||||||
$$rpm_pckdir/noarch/$(PACKAGE)-*${VERSION}-${RELEASE}.noarch.rpm\
|
|
||||||
|| exit 1
|
|
||||||
|
|
||||||
clean: mostlyclean
|
clean: mostlyclean
|
||||||
rm -f history/$(dist_archive)
|
rm -f history/$(dist_archive)
|
||||||
|
Loading…
Reference in New Issue
Block a user