summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko <kali@futeisha.org>2013-10-11 13:26:03 -0300
committerKali Kaneko <kali@futeisha.org>2013-10-11 20:47:27 -0300
commit0f6ec735683500de04150f694736d09a05f9f9ef (patch)
tree8fbce72806a3b800c7c6b4105c37085d96a78389
parentbbe8242af641a91a0c8452c68fd5faa74ef1953d (diff)
modify makefile to use template
-rw-r--r--.gitignore2
-rw-r--r--Changelog5
-rwxr-xr-x[-rw-r--r--]Makefile56
-rw-r--r--install.rdf.template (renamed from install.rdf)29
4 files changed, 75 insertions, 17 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/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 <drebs@leap.se> Fri, 11 Oct 2013 12:49:30 -0300
diff --git a/Makefile b/Makefile
index 7d23b14..6743b97 100644..100755
--- 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 \<em:version\> $(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=<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/*
-
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.template
index 3da4a74..cfb9801 100644
--- a/install.rdf
+++ b/install.rdf.template
@@ -24,16 +24,41 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<Description about="urn:mozilla:install-manifest">
<em:id>bitmask-thunderbird@leap.se</em:id>
<em:name>Bitmask Thunderbird Extension</em:name>
- <em:version>0.0.1</em:version>
+ <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>
+ <em:localized>
+ <Description>
+ <em:locale>en-US</em:locale>
+ <em:name>Bitmask</em:name>
+ <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>
+ <em:creator>El projecto LEAP, Encryption Access Project</em:creator>
+ </Description>
+ </em:localized>
</Description>
</RDF>