summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKali Kaneko <kali@futeisha.org>2013-10-11 13:26:03 -0300
committerKali Kaneko <kali@futeisha.org>2013-10-28 18:06:04 -0200
commitc66cae355c80acd0f5f3fbdbf3d440d0c283536c (patch)
tree28883e2dbfc219f1e8c5747053b77a206ff35ac2 /Makefile
parent965b01f636dd2b7c53481d45dcb10dd0d834d206 (diff)
modify makefile to use template
Diffstat (limited to 'Makefile')
-rwxr-xr-x[-rw-r--r--]Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 19eef87..9e2a530 100644..100755
--- 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