summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFabien Tassin <fta@sofaraway.org>2008-03-29 17:03:16 +0100
committerFabien Tassin <fta@sofaraway.org>2008-03-29 17:03:16 +0100
commit55a10d7a91c4de6312daf6c87a59f676e4b28579 (patch)
treeefa61acae8c30e1765d541a9a2a6e9b33b9f5c94 /src
parent099b69ff9bdb9daaae3e68eb0a5ea5696f728dd8 (diff)
* [minefield-packager] add a 'list' command and add support for by-date snapshots
- update src/minefield-packager.mk.in - update README
Diffstat (limited to 'src')
-rw-r--r--src/minefield-packager.mk.in16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/minefield-packager.mk.in b/src/minefield-packager.mk.in
index 9b46d01..a0b0f7b 100644
--- a/src/minefield-packager.mk.in
+++ b/src/minefield-packager.mk.in
@@ -1,6 +1,6 @@
#!/usr/bin/make -f
-URLBASE := http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/
+URLBASE := http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/
MACHINE := $(shell uname -m)
WORKDIR := temp-$(shell echo $$$$)
BUILDSTAMP := $(WORKDIR)/build-stamp
@@ -13,7 +13,13 @@ ifeq (,$(filter i686 x86_64,$(MACHINE)))
$(error $(MACHINE) is not a supported platform)
endif
-LINE := $(shell wget -qO - $(URLBASE) | grep linux-$(MACHINE).tar.bz2)
+ifeq (,$(DEBIAN_DATE))
+SNAPSHOT=latest
+else
+SNAPSHOT=$(DEBIAN_DATE)
+endif
+
+LINE := $(shell wget -qO - $(URLBASE)$(SNAPSHOT)-trunk/ | grep linux-$(MACHINE).tar.bz2)
ifeq (,$(LINE))
$(error Could not find a valid archive for $(MACHINE))
@@ -28,10 +34,14 @@ GARBAGE += $(WORKDIR)
.PHONY: build
build: $(BUILDSTAMP) make_deb clean
+list:
+ @echo Available snapshots are:
+ @wget -qO - $(URLBASE) | grep -- -trunk/ | cut -d'"' -f8,11 | sed -e 's,\(.*\)-trunk/">\(.*\) .*,\1 \2,'
+
$(BUILDSTAMP):
rm -rf $(WORKDIR)
mkdir -p $(WORKDIR)/debian/tmp/DEBIAN $(WORKDIR)/debian/tmp/usr/lib
- wget -P $(WORKDIR) $(URLBASE)$(FILE)
+ wget -P $(WORKDIR) $(URLBASE)$(SNAPSHOT)-trunk/$(FILE)
tar -C $(WORKDIR)/debian/tmp -jxf $(WORKDIR)/$(FILE)
mv $(WORKDIR)/debian/tmp/firefox $(WORKDIR)/debian/tmp/usr/lib/$(PKGNAME)
touch $(BUILDSTAMP)