summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko <kali@futeisha.org>2013-10-14 00:13:45 -0300
committerKali Kaneko <kali@futeisha.org>2013-10-14 00:13:45 -0300
commit13e95538fd373bd4ea138c6444a454272b73105b (patch)
treef0135d08e09be8696e535c6bc50fc1afaa11cd5b
parente5f270c60d05e96e4a0e68643a14f58a9eb86690 (diff)
parent0f6ec735683500de04150f694736d09a05f9f9ef (diff)
Merge branch 'makefile-fu' into debian
Conflicts: Makefile install.rdf.template
-rw-r--r--.gitignore2
-rwxr-xr-xMakefile53
-rw-r--r--install.rdf.template17
3 files changed, 49 insertions, 23 deletions
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/Makefile b/Makefile
index 205e59f..89b3de1 100755
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,11 @@ RSA_FILE := META-INF/zigbert.rsa
COMMIT := $(shell git --no-pager log -1 --format=format:%h)
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,44 +31,59 @@ 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=<key id>")
+# XXX need to remove signed from default build, debian chokes otherwise
+# $(error "Usage: make DEFAULTKEY=<key id>")
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/*
- rm -f install.rdf
-
upload:
scp build/* downloads.leap.se:~/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
diff --git a/install.rdf.template b/install.rdf.template
index 378b212..cfb9801 100644
--- a/install.rdf.template
+++ b/install.rdf.template
@@ -25,31 +25,36 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<em:id>bitmask-thunderbird@leap.se</em:id>
<em:name>Bitmask Thunderbird Extension</em:name>
<em:version>__VERSION__</em:version>
+ <em:type>2</em:type>
+ <em:description>Automatic configuration for Bitmask Encrypted Mail accounts.
+ </em:description>
<em:creator>LEAP developers</em:creator>
+ <em:contributor>Andre Jucovsky Bianchi
+ </em:contributor>
+ <em:homepageURL>https://github.com/leapcode/thunderbird_extension/</em:homepageURL>
+ <em:iconURL>chrome://bitmask/content/logo-small.png</em:iconURL>
<em:targetApplication>
<Description>
<em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
- <em:minVersion>24.0</em:minVersion>
+ <em:minVersion>23.999</em:minVersion>
<em:maxVersion>24.0.*</em:maxVersion>
</Description>
</em:targetApplication>
- <!-- here is an example for future localizations ;
- em: name, em:description, em:creator
- should probably be overridden -->
<em:localized>
<Description>
<em:locale>en-US</em:locale>
<em:name>Bitmask</em:name>
- <em:description>Configure Bitmask encrypted mail accounts.
+ <em:description>Configure Bitmask Encrypted Mail accounts.
</em:description>
<em:creator>The LEAP Encryption Access Project</em:creator>
</Description>
+ </em:localized>
<em:localized>
<Description>
<em:locale>es-ES</em:locale>
<em:name>Bitmask</em:name>
- <em:description>Configura cuentas Bitmask de correo cifrado.
+ <em:description>Configura cuentas Bitmask de Correo Cifrado.
</em:description>
<em:creator>El projecto LEAP, Encryption Access Project</em:creator>
</Description>