From 0f6ec735683500de04150f694736d09a05f9f9ef Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Fri, 11 Oct 2013 13:26:03 -0300 Subject: modify makefile to use template --- .gitignore | 2 ++ Changelog | 5 ++++ Makefile | 56 +++++++++++++++++++++++++++++++++------------ install.rdf | 39 -------------------------------- install.rdf.template | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 112 insertions(+), 54 deletions(-) create mode 100644 Changelog mode change 100644 => 100755 Makefile delete mode 100644 install.rdf create mode 100644 install.rdf.template diff --git a/.gitignore b/.gitignore index ee34263..c24abca 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ build/ dot-thunderbird/ +install.rdf +*.xpi diff --git a/Changelog b/Changelog new file mode 100644 index 0000000..820d3e4 --- /dev/null +++ b/Changelog @@ -0,0 +1,5 @@ +xul-ext-bitmask (0.0.1); upstream; + + * first release. + + -- drebs Fri, 11 Oct 2013 12:49:30 -0300 diff --git a/Makefile b/Makefile old mode 100644 new mode 100755 index 7d23b14..6743b97 --- a/Makefile +++ b/Makefile @@ -5,9 +5,13 @@ RSA_FILE := META-INF/zigbert.rsa # the following variables are updated automatically COMMIT := $(shell git --no-pager log -1 --format=format:%h) -VERSION := $(shell grep \ $(PREFIX)/install.rdf | sed -e s/[^\>]\\\+\>// -e s/\<[^\>]\\\+\>//) +VERSION = $(shell head -n1 Changelog | sed -e 's/^.*(//' -e 's/).*$$//') PKGNAME := $(EXTNAME)-$(VERSION)-$(COMMIT).xpi -TARGET := $(CURDIR)/build/$(PKGNAME) +# XXX for debian makefile it's simpler to pick a fixed name. +# XXX we could build it and rename in another goal. +XPINAME := bitmask.xpi +TARGET := $(CURDIR)/$(XPINAME) +#TARGET := $(CURDIR)/build/$(PKGNAME) TEMPDIR := $(shell mktemp -d -u) # make sure CERTDIR and CERTNAME are defined for signing @@ -27,36 +31,58 @@ endif # make sure DEFAULTKEY was given to sign the calculated hashes ifneq ($(MAKECMDGOALS),clean) ifneq ($(MAKECMDGOALS),upload) +ifneq ($(MAKECMDGOALS),bitmask.xpi) +ifneq ($(MAKECMDGOALS),install.rdf) ifndef DEFAULTKEY - $(error "Usage: make DEFAULTKEY=") +# XXX need to remove signed from default build, debian chokes otherwise +# $(error "Usage: make DEFAULTKEY=") endif endif endif +endif +endif + +XPI_CONTENTS:=$(shell find chrome -name "*.html" -o -name "*.xhtml" -o -name "*.css" -o -name "*.png" -o -name "*.gif" -o -name "*.js" -o -name "*.jsm" -o -name "*.dtd" -o -name "*.xul" -o -name "messages") chrome.manifest install.rdf COPYING + +bitmask.xpi: $(XPI_CONTENTS) + zip $@ $(XPI_CONTENTS) + +install.rdf: install.rdf.template Changelog + sed 's/__VERSION__/$(VERSION)/' < $< > $@ + +xpi_release: + ln -s $(XPINAME) $(PKGNAME) # main rule -all: clean $(TARGET) +#all: clean $(TARGET) # main target: .xpi file -$(TARGET): clean - mkdir -p $(TEMPDIR) - cp -r $(PREFIX)/{$(FILES_TO_PACKAGE)} $(TEMPDIR)/ - (cd $(TEMPDIR) && zip -r $(TARGET) ./) - rm -rf $(TEMPDIR) - (cd build/ && sha512sum $(PKGNAME) > SHA512SUMS && gpg --default-key $(DEFAULTKEY) --sign SHA512SUMS) +#$(TARGET): +# mkdir -p $(TEMPDIR) +# cp -r $(PREFIX)/{$(FILES_TO_PACKAGE)} $(TEMPDIR)/ +# (cd $(TEMPDIR) && zip $@ $(XPI_CONTENTS)) +# rm -rf $(TEMPDIR) +# (cd build/ && sha512sum $(PKGNAME) > SHA512SUMS && gpg --default-key $(DEFAULTKEY) --sign SHA512SUMS) signed: clean mkdir -p $(TEMPDIR) cp -r $(PREFIX)/{$(FILES_TO_PACKAGE)} $(TEMPDIR)/ signtool -d $(CERTDIR) -k $(CERTNAME) $(TEMPDIR)/ - (cd $(TEMPDIR) && zip $(TARGET) ./$(RSA_FILE) && zip -r -D $(TARGET) ./ -x ./$(RSA_FILE)) + (cd $(TEMPDIR) && zip $(TARGET) ./$(RSA_FILE) && zip -D $@ $(XPI_CONTENTS) -x ./$(RSA_FILE)) rm -rf $(TEMPDIR) (cd build/ && sha512sum $(PKGNAME) > SHA512SUMS && gpg --default-key $(DEFAULTKEY) --sign SHA512SUMS) -clean: - rm -f $(TARGET) build/* - upload: scp build/* downloads.leap.se:~/public/thunderbird_extension/ -.PHONY: all clean signed +debian-package: + git buildpackage -us -uc + +clean: + #rm -f $(TARGET) build/* + rm -f *.xpi + rm -f install.rdf + + +.PHONY: all clean diff --git a/install.rdf b/install.rdf deleted file mode 100644 index 3da4a74..0000000 --- a/install.rdf +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - bitmask-thunderbird@leap.se - Bitmask Thunderbird Extension - 0.0.1 - LEAP developers - - - - {3550f703-e582-4d05-9a08-453d09bdfdc6} - 24.0 - 24.0.* - - - - - diff --git a/install.rdf.template b/install.rdf.template new file mode 100644 index 0000000..cfb9801 --- /dev/null +++ b/install.rdf.template @@ -0,0 +1,64 @@ + + + + + + + + bitmask-thunderbird@leap.se + Bitmask Thunderbird Extension + __VERSION__ + 2 + Automatic configuration for Bitmask Encrypted Mail accounts. + + LEAP developers + Andre Jucovsky Bianchi + + https://github.com/leapcode/thunderbird_extension/ + chrome://bitmask/content/logo-small.png + + + + {3550f703-e582-4d05-9a08-453d09bdfdc6} + 23.999 + 24.0.* + + + + + en-US + Bitmask + Configure Bitmask Encrypted Mail accounts. + + The LEAP Encryption Access Project + + + + + es-ES + Bitmask + Configura cuentas Bitmask de Correo Cifrado. + + El projecto LEAP, Encryption Access Project + + + + + -- cgit v1.2.3