[PATCH spice-html5 1/3] Generate package.json from the Makefile.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Jeremy White <jwhite@xxxxxxxxxxxxxxx>
---
 .gitignore                      |  1 +
 Makefile                        | 30 +++++++++++++++++++++---------
 package.json => package.json.in |  2 +-
 3 files changed, 23 insertions(+), 10 deletions(-)
 rename package.json => package.json.in (95%)

diff --git a/.gitignore b/.gitignore
index 33491a5..695d1d0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 spice-html5.spec
+package.json
diff --git a/Makefile b/Makefile
index add307f..161a14a 100644
--- a/Makefile
+++ b/Makefile
@@ -26,23 +26,35 @@ endif
 
 source_for_rpm = $(HOME)/rpmbuild/SOURCES/spice-html5-$(version).tar.gz
 
-.PHONY: usage spice-html5.spec rpm tar gittar local git install
+.PHONY: usage spice-html5.spec package.json rpm tar gittar local git install
 
 usage:
 	@echo "This project does not normally need to be built.  See the README."
 	@echo " "
-	@echo "This Makefile is mostly used for creating RPM packages, which you"
-	@echo "can do by invoking 'make local' to use the current working directory,"
-	@echo "or 'make git' to use the latest git HEAD."
-	@echo "You can specify an alternate source tarball like this:"
-	@echo "  make source=/my/alternate/source local"
-	@echo "You can specifcy a specific git tag like this:"
-	@echo "  make tag=my_specific_tag git"
-	@echo "Results generally go in ~/rpmbuild"
+	@echo "This Makefile is used for creating RPM packages and the package.json file used by npm."
+	@echo " "
+	@echo "Building an rpm: "
+	@echo "  Invoke 'make local' to make an rpm with the current working directory,"
+	@echo "  or 'make git' to make an rpm with the latest git HEAD."
+	@echo "  You can specify an alternate source tarball like this:"
+	@echo "    make source=/my/alternate/source local"
+	@echo "  You can specify a specific git tag like this:"
+	@echo "    make tag=my_specific_tag git"
+	@echo "  Results generally go in ~/rpmbuild"
+	@echo " "
+	@echo "Preparing for an npm publish:"
+	@echo "    make package.json"
+	@echo "  where you can specify"
+	@echo "    make tag=my_specific_tag package.json"
+	@echo "  to prepare a particular release."
+
 
 spice-html5.spec:
 	sed -e "s/VERSION/$(version)/" < spice-html5.spec.in > spice-html5.spec
 
+package.json:
+	sed -e "s/VERSION/$(version)/" < package.json.in > package.json
+
 tar:
 	if [ "$(source)x" = "x" ] ; then \
 	    tar -czf $(source_for_rpm) --exclude=.git --transform='s!^!spice-html5-$(version)/!' * ; \
diff --git a/package.json b/package.json.in
similarity index 95%
rename from package.json
rename to package.json.in
index c77a0e8..ca56078 100644
--- a/package.json
+++ b/package.json.in
@@ -1,6 +1,6 @@
 {
   "name": "spice-html5",
-  "version": "0.1.8",
+  "version": "VERSION",
   "description": "Spice Javascript client",
   "main": "src/main.js",
   "scripts": {
-- 
2.11.0

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]