summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2013-11-05 15:12:33 -0200
committerdrebs <drebs@leap.se>2013-11-05 15:12:33 -0200
commit2a71d0c9b74c69f8c195f219a82b689685b6d110 (patch)
tree6791fd14b2ae80861bdd5abc357aec9c42bf16c3 /Makefile
parent67da5669f7a7ef88849d810109f3095bbf6f2ddd (diff)
parentff4b0a8fec805ff7b93354f8e8175f91f8de3bb5 (diff)
Merge branch 'release-0.0.2'0.0.2
Diffstat (limited to 'Makefile')
-rwxr-xr-x[-rw-r--r--]Makefile23
1 files changed, 18 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 7d23b14..fb59643 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,30 +33,43 @@ endif
endif
endif
+
# main rule
all: clean $(TARGET)
# main target: .xpi file
-$(TARGET): clean
+$(TARGET): clean install.rdf
mkdir -p $(TEMPDIR)
+ mkdir -p `dirname $@`
cp -r $(PREFIX)/{$(FILES_TO_PACKAGE)} $(TEMPDIR)/
+ rm -rf $(TEMPDIR)/.gitignore
(cd $(TEMPDIR) && zip -r $(TARGET) ./)
rm -rf $(TEMPDIR)
- (cd build/ && sha512sum $(PKGNAME) > SHA512SUMS && gpg --default-key $(DEFAULTKEY) --sign SHA512SUMS)
+ (cd build/ && sha512sum $(PKGNAME) > SHA512SUMS && gpg -a --default-key $(DEFAULTKEY) --detach-sign SHA512SUMS)
signed: clean
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))
rm -rf $(TEMPDIR)
- (cd build/ && sha512sum $(PKGNAME) > SHA512SUMS && gpg --default-key $(DEFAULTKEY) --sign SHA512SUMS)
+ (cd build/ && sha512sum $(PKGNAME) > SHA512SUMS && gpg -a --default-key $(DEFAULTKEY) --detach-sign SHA512SUMS)
clean:
rm -f $(TARGET) build/*
+ rm -f install.rdf
upload:
- scp build/* downloads.leap.se:~/public/thunderbird_extension/
+ 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