summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordb <drebs@riseup.net>2015-01-08 15:39:54 -0200
committerdb <drebs@riseup.net>2015-01-08 15:39:54 -0200
commit60abdca26f5945efbed670a3ae43b73b6114dd55 (patch)
tree91075af6af4efc0777f5a225fd832f43e4482bae
parent03d3427b30f7bd242d77a07c6fdca1b51a51cdc9 (diff)
parentf3f8ab3b8b2c2a3fd444bc67f4a11d2e93fbfb0c (diff)
Merge branch 'release-0.0.4' into develop0.0.4
-rw-r--r--.gitignore1
-rw-r--r--CHANGELOG2
-rw-r--r--[-rwxr-xr-x]Makefile81
-rw-r--r--install.rdf.template2
4 files changed, 41 insertions, 45 deletions
diff --git a/.gitignore b/.gitignore
index b5c010c..c24abca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
build/
dot-thunderbird/
install.rdf
+*.xpi
diff --git a/CHANGELOG b/CHANGELOG
index b2b36cd..1cc4e04 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,4 @@
-0.0.4 Jan 07, 2014:
+0.0.4 Jan 07, 2015:
o Do not disable caching checkbox for manual accounts when caching is turned
on (#4811).
o Remove automatic wizard popup when there's no account configured (#6613).
diff --git a/Makefile b/Makefile
index 10d667a..3dcda0e 100755..100644
--- a/Makefile
+++ b/Makefile
@@ -1,61 +1,48 @@
EXTNAME := bitmask-thunderbird
+XPINAME := bitmask.xpi # debian package will use this name
PREFIX := .
FILES_TO_PACKAGE := chrome,chrome.manifest,install.rdf
RSA_FILE := META-INF/zigbert.rsa
# the following variables are updated automatically
COMMIT := $(shell git --no-pager log -1 --format=format:%h)
-VERSION = $(shell head -n1 CHANGELOG | cut -d" " -f1)
+VERSION := $(shell head -n1 CHANGELOG | cut -d" " -f1)
PKGNAME := $(EXTNAME)-$(VERSION)-$(COMMIT).xpi
TARGET := $(CURDIR)/build/$(PKGNAME)
TEMPDIR := $(shell mktemp -d -u)
-# make sure CERTDIR and CERTNAME are defined for signing
-USAGE := "Usage: make CERTDIR=<certificate directory> CERTNAME=<certificate name> DEFAULTKEY=<key id>"
-ifeq ($(MAKECMDGOALS),signed)
-ifndef CERTDIR
- $(error $(USAGE))
-endif
-ifndef CERTNAME
- $(error $(USAGE))
-endif
-ifndef DEFAULTKEY
- $(error $(USAGE))
-endif
-endif
-
-# make sure DEFAULTKEY was given to sign the calculated hashes
-ifneq ($(MAKECMDGOALS),clean)
-ifneq ($(MAKECMDGOALS),upload)
-ifndef DEFAULTKEY
- $(error "Usage: make DEFAULTKEY=<key id>")
-endif
-endif
-endif
-
-
-# main rule
-all: clean $(TARGET)
+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" -o -name "*.properties") chrome.manifest install.rdf COPYING
#-----------------------------------------------------------------------------
# debhelper targets
#-----------------------------------------------------------------------------
-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" -o -name "*.properties") chrome.manifest install.rdf COPYING
-
-bitmask.xpi: $(XPI_CONTENTS)
+$(XPINAME): $(XPI_CONTENTS)
zip $@ $(XPI_CONTENTS)
+install.rdf: install.rdf.template Changelog
+ sed 's/__VERSION__/$(VERSION)/' < $< > $@
+
xpi_release:
ln -s $(XPINAME) $(PKGNAME)
+debian-package:
+ git buildpackage -us -uc
+
#-----------------------------------------------------------------------------
# unsigned XPI file
#-----------------------------------------------------------------------------
-$(TARGET): clean install.rdf
+# make sure DEFAULTKEY is defined to sign the calculated hashes
+ifeq ($(MAKECMDGOALS),unsigned)
+ifndef DEFAULTKEY
+ $(error "Usage: make DEFAULTKEY=<key id>")
+endif
+endif
+
+unsigned: clean install.rdf
mkdir -p $(TEMPDIR)
mkdir -p `dirname $@`
cp -r $(PREFIX)/{$(FILES_TO_PACKAGE)} $(TEMPDIR)/
@@ -69,29 +56,37 @@ $(TARGET): clean install.rdf
# signed XPI file
#-----------------------------------------------------------------------------
+# make sure CERTDIR, CERTNAME and DEFAULTKEY are defined for signing
+ifeq ($(MAKECMDGOALS),signed)
+USAGE := "Usage: make CERTDIR=<certificate directory> CERTNAME=<certificate name> DEFAULTKEY=<key id>"
+ifndef CERTDIR
+ $(error $(USAGE))
+endif
+ifndef CERTNAME
+ $(error $(USAGE))
+endif
+ifndef DEFAULTKEY
+ $(error $(USAGE))
+endif
+endif
+
signed: clean install.rdf
mkdir -p $(TEMPDIR)
mkdir -p `dirname $@`
cp -r $(PREFIX)/{$(FILES_TO_PACKAGE)} $(TEMPDIR)/
rm -rf $(TEMPDIR)/.gitignore
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 -a --default-key $(DEFAULTKEY) --detach-sign SHA512SUMS)
-clean:
- rm -f $(TARGET) build/*
- rm -f install.rdf
-
upload:
ssh downloads.leap.se rm -rf /var/www/leap-downloads/public/thunderbird_extension/*
scp build/* downloads.leap.se:/var/www/leap-downloads/public/thunderbird_extension/
-debian-package:
- git buildpackage -us -uc
-
-install.rdf: install.rdf.template Changelog
- sed 's/__VERSION__/$(VERSION)/' < $< > $@
-
+clean:
+ rm -f $(TARGET) build/*
+ rm -f *.xpi
+ rm -f install.rdf
-.PHONY: all clean signed
+.PHONY: all clean xpi_release unsigned signed upload debian-package
diff --git a/install.rdf.template b/install.rdf.template
index c64bb44..aac65ab 100644
--- a/install.rdf.template
+++ b/install.rdf.template
@@ -36,7 +36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<Description>
<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
<em:minVersion>23.999</em:minVersion>
- <em:maxVersion>24.*</em:maxVersion>
+ <em:maxVersion>31.*</em:maxVersion>
</Description>
</em:targetApplication>
<em:localized>