aboutsummaryrefslogtreecommitdiffstats
path: root/src/Makefile
diff options
context:
space:
mode:
authorastokes <astokes@ef72aa8b-4018-0410-8976-d6e080ef94d8>2008-10-01 13:29:33 +0000
committerastokes <astokes@ef72aa8b-4018-0410-8976-d6e080ef94d8>2008-10-01 13:29:33 +0000
commit5ea9880b4312acef636926e6454bb3d136ce44ae (patch)
tree4a85c1d76e10cecafd0ca44df7604d153cd26cf4 /src/Makefile
parent6f1e13198edb22c3d47d4c151dbe1d4b7e0fc4c6 (diff)
downloadsos-5ea9880b4312acef636926e6454bb3d136ce44ae.tar.gz
revert
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@525 ef72aa8b-4018-0410-8976-d6e080ef94d8
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile34
1 files changed, 30 insertions, 4 deletions
diff --git a/src/Makefile b/src/Makefile
index 942e4776..37c384bc 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -59,7 +59,7 @@ release: clean
@echo " "
@echo "The final archive is ./$(NAME)-$(VERSION).tar.bz2."
-install:mo
+install:mo gpgkey
python setup.py install
@rm -rf build/lib
@@ -67,18 +67,40 @@ version:
@echo "The version is $(NAME)-$(VERSION)"
clean:
- @rm -fv *~ .*~ changenew ChangeLog.old $(NAME)-$(VERSION).tar.bz2 sosreport.1.gz
+ @rm -fv *~ .*~ changenew ChangeLog.old $(NAME)-$(VERSION).tar.bz2 sosreport.1.gz gpgkeys/rhsupport.*
@rm -rfv build/*
-rpm: mo
- @test -f sos.spec
+internal-rpm: gpgkey
+ @test -f sos-internal.spec
+ @mkdir -p $(TOPDIR)/SOURCES $(TOPDIR)/SRPMS $(TOPDIR)/RPMS $(TOPDIR)/BUILD $(SRCDIR)/dist
+ cp gpgkeys/rhsupport.pub gpgkeys/rhsupport.key $(TOPDIR)/SOURCES
+
+# this builds an RPM from the current working copy
+ @cd $(TOPDIR)/BUILD ; \
+ rm -rf $(NAME)-$(VERSION) ; \
+ ln -s $(SRCDIR) $(NAME)-$(VERSION) ; \
+ tar --gzip --exclude=.svn --exclude=svn-commit.tmp --exclude=$(NAME)-$(VERSION)/build --exclude=$(NAME)-$(VERSION)/dist \
+ --exclude gpgkeys/rhsupport.pub --exclude gpgkeys/rhsupport.key \
+ -chSpf $(TOPDIR)/SOURCES/$(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION) ; \
+ rm -f $(NAME)-$(VERSION)
+
+ rpmbuild -ba --define="_topdir $(TOPDIR)" sos-internal.spec
+ @mv $(TOPDIR)/RPMS/noarch/$(NAME)-internal-*.rpm $(TOPDIR)/SRPMS/$(NAME)-internal-*.rpm dist/
+ cp gpgkeys/rhsupport.key dist/
+
+rpm: mo gpgkey
@mkdir -p $(TOPDIR)/SOURCES $(TOPDIR)/SRPMS $(TOPDIR)/RPMS $(TOPDIR)/BUILD $(SRCDIR)/dist
+ cp gpgkeys/rhsupport.pub $(TOPDIR)/SOURCES
+
+ @test -f sos.spec
+
# this builds an RPM from the current working copy
@cd $(TOPDIR)/BUILD ; \
rm -rf $(NAME)-$(VERSION) ; \
ln -s $(SRCDIR) $(NAME)-$(VERSION) ; \
tar --gzip --exclude=.svn --exclude=svn-commit.tmp --exclude=$(NAME)-$(VERSION)/build --exclude=$(NAME)-$(VERSION)/dist \
+ --exclude gpgkeys/rhsupport.pub --exclude gpgkeys/rhsupport.key \
-chSpf $(TOPDIR)/SOURCES/$(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION) ; \
rm -f $(NAME)-$(VERSION)
@@ -95,3 +117,7 @@ pot:
mo:
find locale/*/LC_MESSAGES -name sos.po -exec python tools/msgfmt.py {} \;
+
+gpgkey:
+ @test -f gpgkeys/rhsupport.pub && echo "GPG key already exists." || \
+ gpg --batch --gen-key gpgkeys/gpg.template