summaryrefslogtreecommitdiff
path: root/mozilla-testing/iceweasel-i18n/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'mozilla-testing/iceweasel-i18n/Makefile')
-rw-r--r--mozilla-testing/iceweasel-i18n/Makefile47
1 files changed, 35 insertions, 12 deletions
diff --git a/mozilla-testing/iceweasel-i18n/Makefile b/mozilla-testing/iceweasel-i18n/Makefile
index a0a767c3d..64e140af6 100644
--- a/mozilla-testing/iceweasel-i18n/Makefile
+++ b/mozilla-testing/iceweasel-i18n/Makefile
@@ -5,32 +5,55 @@
# - pacman
# - sed
+# Variables:
+# This is to get it from Debian Sid
+debname=iceweasel-l10n
+debver=9.0+debian
+debrel=1
+debrepo=http://ftp.debian.org/debian/pool/main/
+
+pkgver=9.0
+pkgrel=2
+
+# Guts: ##############################################################
+
default: PHONY all
all: PHONY
$(MAKE) clean
$(MAKE) PKGBUILD
.PRECIOUS: PKGBUILD
-PKGBUILD.g: Makefile
+PKGBUILD.list: Makefile
sed \
- -e '/This line is here/,$$d' \
- -e 's/^pkgname=/_pkgname=/' \
- PKGBUILD > $@
- echo 'pkgname=foo' >> $@
+ -e 's/@DEBNAME@/$(debname)/' \
+ -e 's/@DEBVER@/$(debver)/' \
+ -e 's/@DEBREL@/$(debrel)/' \
+ -e 's%@DEBREPO@%$(debrepo)%' \
+ -e 's/@PKGVER@/$(pkgver)/' \
+ -e 's/@PKGREL@/$(pkgrel)/' \
+ -e "s/@LANGPACKS@/(phony)/" \
+ -e '/CUT HERE/,$$d' \
+ PKGBUILD.in > $@
echo 'package() { exit 0; }' >> $@
makepkg -gp $@ >> $@
-langpacks.txt: PKGBUILD.g Makefile
+langpacks.txt: PKGBUILD.list Makefile
makepkg -dp $<
ls src/*/upstream | sed 's/\.xpi//' > $@
-PKGBUILD: langpacks.txt Makefile
+PKGBUILD: PKGBUILD.in langpacks.txt Makefile
sed \
- -e "s/_langpacks=.*/_langpacks=(`xargs echo < $<`)/" \
+ -e 's/@DEBNAME@/$(debname)/' \
+ -e 's/@DEBVER@/$(debver)/' \
+ -e 's/@DEBREL@/$(debrel)/' \
+ -e 's%@DEBREPO@%$(debrepo)%' \
+ -e 's/@PKGVER@/$(pkgver)/' \
+ -e 's/@PKGREL@/$(pkgrel)/' \
+ -e "s/@LANGPACKS@/(`xargs echo < langpacks.txt`)/" \
+ -e '/CUT HERE/d' \
-e '/md5sums/,$$d' \
- $@ > $@.$$$$ && \
- makepkg -g >> $@.$$$$ && \
- mv $@.$$$$ $@
+ PKGBUILD.in > $@
+ makepkg -dg >> $@
clean: PHONY
- rm -f PKGBUILD.g langpacks.txt
+ rm -f PKGBUILD.list langpacks.txt
.PHONY: PHONY FORCE