diff --git a/.gitignore b/.gitignore index 33491a577ad1c2dc6473e30c7d713100a7599de1..695d1d0d319d455ab0c426eb684425fc9ed79c6e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ spice-html5.spec +package.json diff --git a/Makefile b/Makefile index add307f4bed1d114a30d03dc403d97b304c001da..161a14a6bff1b3b208dbeae4a87569b6fc40c041 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 c77a0e852b815b131f539b9c38fd5d1c7ccf843c..ca56078ab01a1cf912a1bc9bfc7168ab03a83430 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": {