modify makefile to use template
authorKali Kaneko <kali@futeisha.org>
Fri, 11 Oct 2013 16:26:03 +0000 (13:26 -0300)
committerKali Kaneko <kali@futeisha.org>
Mon, 28 Oct 2013 20:06:04 +0000 (18:06 -0200)
Changelog [new file with mode: 0644]
Makefile [changed mode: 0644->0755]
install.rdf.template [moved from install.rdf with 62% similarity]

diff --git a/Changelog b/Changelog
new file mode 100644 (file)
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
old mode 100644 (file)
new mode 100755 (executable)
index 19eef87..9e2a530
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ 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)
 TEMPDIR  := $(shell mktemp -d -u)
@@ -33,6 +33,7 @@ endif
 endif
 endif
 
+
 # main rule
 all: clean $(TARGET)
 
@@ -55,9 +56,16 @@ signed: clean
 
 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)/' < $< > $@   
+
 .PHONY: all clean signed
similarity index 62%
rename from install.rdf
rename to install.rdf.template
index 3da4a74..378b212 100644 (file)
@@ -24,7 +24,7 @@ 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:creator>LEAP developers</em:creator>
    
     <em:targetApplication>
@@ -34,6 +34,26 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
         <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>
+        <em:creator>The LEAP Encryption Access Project</em:creator>
+      </Description> 
+    <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>