Sources

The Tree of Radix and Third Party Sources

1388 Commits   0 Branches   11 Tags
author: kx <kx@radix.pro> 2013-04-24 16:05:21 +0400 committer: kx <kx@radix.pro> 2013-04-24 16:05:21 +0400 commit: e5bf475e2d0ea69c050a57b5c4f9a2801113e55d parent: fa4001b325eaecd5030f8ea171e5304fd9312823
Commit Summary:
Added GCC and, gmp, mpc, mpfr libraries
Diffstat:
8 files changed, 229 insertions, 73 deletions
diff --git a/GNU/Makefile b/GNU/Makefile
index a5e53d5..5eb4b5f 100644
--- a/GNU/Makefile
+++ b/GNU/Makefile
@@ -9,15 +9,26 @@
 
 url         = ftp://ftp.gnu.org/gnu
 
-keyring     = gnu-keyring.gpg
+gnu_keyring = gnu-keyring.gpg
+IDs         = 765C61E3 98C3739D C3C45C06
 
-all: $(keyring)
+keyrings = $(addsuffix .gpg, $(addprefix keyring-, $(IDs)))
+
+all: $(gnu_keyring) $(keyrings)
 
 .PHONY: downloads_clean
 
-$(keyring):
-	@echo -e "\n======= Downloading $(keyring) file =======\n"
-	@wget $(url)/$(keyring)
+$(gnu_keyring):
+	@echo -e "\n======= Downloading $(gnu_keyring) file =======\n"
+	@wget $(url)/$(gnu_keyring)
+
+$(keyrings):
+	@echo -e "\n======= Downloading keyring files =======\n"
+	@for ID in $(IDs) ; do \
+	  gpg --recv-key $$ID ; \
+	  gpg --export $$ID > keyring-$$ID.gpg ; \
+	  gpg --batch --yes --delete-key $$ID ; \
+	done
 
 downloads_clean:
-	@rm -rf $(keyring)
+	@rm -f $(gnu_keyring) $(keyrings)
diff --git a/GNU/gcc/Makefile b/GNU/gcc/Makefile
index 78c7aaf..3c0b3d3 100644
--- a/GNU/gcc/Makefile
+++ b/GNU/gcc/Makefile
@@ -7,80 +7,53 @@
 # original url: http://ftp.gnu.org/gnu/gcc/gcc-$(version)
 #
 
-gcc_url_prefix  = http://ftpmirror.gnu.org/gcc/gcc
+url         = http://ftpmirror.gnu.org/gcc
 
-# GCC: 4.4.4 4.5.1 ... separated with space
-versions        = 4.5.1 4.7.2
+keyring     = ../gnu-keyring.gpg
 
-tarballs        = .gcc_tarballs_done
+versions    = 4.5.1 4.7.2
 
-# GMP, MPFR, MPC sites:
- gmp_url        = http://ftpmirror.gnu.org/gmp
-mpfr_url        = http://ftpmirror.gnu.org/mpfr
- mpc_url        = http://www.multiprecision.org/mpc/download
+tarballs    = $(addsuffix .tar.bz2, $(addprefix gcc-, $(versions)))
+signatures  = $(addsuffix .sig, $(tarballs))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
 
-# GMP, MPFR, MPC tarbals & signatures:
- gmp_tarballs   = gmp-4.3.1.tar.bz2 gmp-5.0.5.tar.bz2
- gmp_signatures = gmp-4.3.1.tar.bz2.sig gmp-5.0.5.tar.bz2.sig
-mpfr_tarballs   = mpfr-2.4.2.tar.bz2 mpfr-3.1.1.tar.bz2
-mpfr_signatures = mpfr-2.4.2.tar.bz2.sig mpfr-3.1.1.tar.bz2.sig
- mpc_tarballs   = mpc-0.8.2.tar.gz mpc-1.0.1.tar.gz
- mpc_signatures = mpc-0.8.2.tar.gz.asc mpc-1.0.1.tar.gz.asc
-
-
-TARGETS  = $(tarballs)
-TARGETS += $(gmp_tarballs) $(mpfr_tarballs) $(mpc_tarballs)
-TARGETS += $(gmp_signatures) $(mpfr_signatures) $(mpc_signatures)
-
-all: $(TARGETS)
+all: $(keyring) $(signatures) $(sha1s)
 
 .PHONY: downloads_clean
 
+$(keyring):
+	@cd .. ; $(MAKE) all
+
 $(tarballs):
-	@echo -e "\n======= Downloading GCC tarballs ======="
+	@echo -e "\n======= Downloading source tarballs =======\n"
 	@for version in $(versions) ; do \
-	  wget -N $(gcc_url_prefix)-$$version/gcc-$$version.tar.bz2  ; \
-	  wget -N $(gcc_url_prefix)-$$version/gcc-$$version.tar.bz2.sig  ; \
-	done
-	@touch $@
-
-$(gmp_tarballs):
-	@echo -e "\n======= Downloading GMP tarballs ======="
-	@for tarball in $(gmp_tarballs) ; do \
-	  wget -N $(gmp_url)/$$tarball ; \
-	done
-
-$(mpfr_tarballs):
-	@echo -e "\n======= Downloading MPFR tarballs ======="
-	@for tarball in $(mpfr_tarballs) ; do \
-	  wget -N $(mpfr_url)/$$tarball ; \
-	done
-
-$(mpc_tarballs):
-	@echo -e "\n======= Downloading MPC tarballs ======="
-	@for tarball in $(mpc_tarballs) ; do \
-	  wget -N $(mpc_url)/$$tarball ; \
-	done
-
-$(gmp_signatures):
-	@echo -e "\n======= Downloading GMP signatures ======="
-	@for tarball in $(gmp_signatures) ; do \
-	  wget -N $(gmp_url)/$$tarball ; \
+	  wget -N $(url)/gcc-$$version/gcc-$$version.tar.bz2 ; \
 	done
 
-$(mpfr_signatures):
-	@echo -e "\n======= Downloading MPFR signatures ======="
-	@for tarball in $(mpfr_signatures) ; do \
-	  wget -N $(mpfr_url)/$$tarball ; \
+$(signatures): %.tar.bz2.sig : %.tar.bz2
+	@for signature in $@ ; do \
+	  version=`echo $$signature | sed 's/\(^[a-zA-Z-]*\)\([0-9][.0-9]*[.0-9]*\)\([\.].*\)/\2/'` ; \
+	  if [ "$$version" \> "4.5.1" ]; then \
+	    key=../keyring-C3C45C06.gpg ; \
+	  else \
+	    key=$(keyring) ; \
+	  fi ; \
+	  echo -e "\n======= Downloading '$$signature' signature =======\n" ; \
+	  wget -N $(url)/gcc-$$version/$$signature ; \
+	  touch $$signature ; \
+	  echo -e "======= Verification of '$$signature' signature =======\n" ; \
+	  gpg --verify --keyring $$key $$signature ; ret="$$?" ; \
+	  if [ "$$ret" == "1" ]; then \
+	    echo -e "\n======= ERROR: Bad '$$signature' Signature =======\n" ; \
+	    exit 1 ; \
+	  fi ; \
 	done
 
-$(mpc_signatures):
-	@echo -e "\n======= Downloading MPC signatures ======="
-	@for tarball in $(mpc_signatures) ; do \
-	  wget -N $(mpc_url)/$$tarball ; \
+$(sha1s): %.tar.bz2.sha1sum : %.tar.bz2
+	@for tarball in $< ; do \
+	  echo -e "\n======= Calculation '$$tarball' sha1sum =======\n" ; \
+	  sha1sum --binary $$tarball > $$tarball.sha1sum ; \
 	done
 
 downloads_clean:
-	@rm -rf gcc-* $(tarballs) \
-	        $(gmp_tarballs) $(mpfr_tarballs) $(mpc_tarballs) \
-	        $(gmp_signatures) $(mpfr_signatures) $(mpc_signatures)
+	@rm -rf $(tarballs) $(signatures) $(sha1s)
diff --git a/GNU/gmp/Makefile b/GNU/gmp/Makefile
new file mode 100644
index 0000000..9850bb2
--- /dev/null
+++ b/GNU/gmp/Makefile
@@ -0,0 +1,52 @@
+#
+# Download: http://www.gnu.org/prep/ftp.html
+#
+# You can use the generic url http://ftpmirror.gnu.org 
+# to automatically choose a nearby and up-to-date mirror.
+#
+# original url: http://ftp.gnu.org/gnu/gmp/gmp-$(version)
+#
+
+url         = http://ftpmirror.gnu.org/gmp
+
+keyring     = ../keyring-765C61E3.gpg
+
+versions    = 4.3.1 5.0.5
+
+tarballs    = $(addsuffix .tar.bz2, $(addprefix gmp-, $(versions)))
+signatures  = $(addsuffix .sig, $(tarballs))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+all: $(keyring) $(signatures) $(sha1s)
+
+.PHONY: downloads_clean
+
+$(keyring):
+	@cd .. ; $(MAKE) all
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======\n"
+	@for tarball in $(tarballs) ; do \
+	  wget -N $(url)/$$tarball ; \
+	done
+
+$(signatures): %.tar.bz2.sig : %.tar.bz2
+	@for signature in $@ ; do \
+	  echo -e "\n======= Downloading '$$signature' signature =======\n" ; \
+	  wget -N $(url)/$$signature ; \
+	  touch $$signature ; \
+	  gpg --verify --keyring $(keyring) $$signature ; ret="$$?" ; \
+	  if [ "$$ret" == "1" ]; then \
+	    echo -e "\n======= ERROR: Bad '$$signature' Signature =======\n" ; \
+	    exit 1 ; \
+	  fi ; \
+	done
+
+$(sha1s): %.tar.bz2.sha1sum : %.tar.bz2
+	@for tarball in $< ; do \
+	  echo -e "\n======= Calculation '$$tarball' sha1sum =======\n" ; \
+	  sha1sum --binary $$tarball > $$tarball.sha1sum ; \
+	done
+
+downloads_clean:
+	@rm -rf $(tarballs) $(signatures) $(sha1s)
diff --git a/GNU/mpc/Makefile b/GNU/mpc/Makefile
new file mode 100644
index 0000000..0775f42
--- /dev/null
+++ b/GNU/mpc/Makefile
@@ -0,0 +1,52 @@
+#
+# Download: http://www.gnu.org/prep/ftp.html
+#
+# You can use the generic url http://ftpmirror.gnu.org 
+# to automatically choose a nearby and up-to-date mirror.
+#
+# original url: http://ftp.gnu.org/gnu/mpc/mpc-$(version)
+#
+
+url         = http://ftpmirror.gnu.org/mpc
+
+keyring     = ../keyring-765C61E3.gpg
+
+versions    = 1.0.1
+
+tarballs    = $(addsuffix .tar.gz, $(addprefix mpc-, $(versions)))
+signatures  = $(addsuffix .sig, $(tarballs))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+all: $(keyring) $(signatures) $(sha1s)
+
+.PHONY: downloads_clean
+
+$(keyring):
+	@cd .. ; $(MAKE) all
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======\n"
+	@for tarball in $(tarballs) ; do \
+	  wget -N $(url)/$$tarball ; \
+	done
+
+$(signatures): %.tar.gz.sig : %.tar.gz
+	@for signature in $@ ; do \
+	  echo -e "\n======= Downloading '$$signature' signature =======\n" ; \
+	  wget -N $(url)/$$signature ; \
+	  touch $$signature ; \
+	  gpg --verify --keyring $(keyring) $$signature ; ret="$$?" ; \
+	  if [ "$$ret" == "1" ]; then \
+	    echo -e "\n======= ERROR: Bad '$$signature' Signature =======\n" ; \
+	    exit 1 ; \
+	  fi ; \
+	done
+
+$(sha1s): %.tar.gz.sha1sum : %.tar.gz
+	@for tarball in $< ; do \
+	  echo -e "\n======= Calculation '$$tarball' sha1sum =======\n" ; \
+	  sha1sum --binary $$tarball > $$tarball.sha1sum ; \
+	done
+
+downloads_clean:
+	@rm -rf $(tarballs) $(signatures) $(sha1s)
diff --git a/GNU/mpc/mpc-1.0.1.pdf b/GNU/mpc/mpc-1.0.1.pdf
new file mode 100644
index 0000000..f1645a0
Binary files /dev/null and b/GNU/mpc/mpc-1.0.1.pdf differ
diff --git a/GNU/mpc/mpc-1.0.1.pdf.txt b/GNU/mpc/mpc-1.0.1.pdf.txt
new file mode 100644
index 0000000..956dea3
--- /dev/null
+++ b/GNU/mpc/mpc-1.0.1.pdf.txt
@@ -0,0 +1,4 @@
+
+source: http://www.multiprecision.org/mpc/download/mpc-1.0.1.pdf
+
+Requirements: gmp-4.3.2, mpfr-2.4.2
diff --git a/GNU/mpfr/Makefile b/GNU/mpfr/Makefile
new file mode 100644
index 0000000..322f595
--- /dev/null
+++ b/GNU/mpfr/Makefile
@@ -0,0 +1,52 @@
+#
+# Download: http://www.gnu.org/prep/ftp.html
+#
+# You can use the generic url http://ftpmirror.gnu.org 
+# to automatically choose a nearby and up-to-date mirror.
+#
+# original url: http://ftp.gnu.org/gnu/mpfr/mpfr-$(version)
+#
+
+url         = http://ftpmirror.gnu.org/mpfr
+
+keyring     = ../keyring-98C3739D.gpg
+
+versions    = 2.4.2 3.1.1
+
+tarballs    = $(addsuffix .tar.bz2, $(addprefix mpfr-, $(versions)))
+signatures  = $(addsuffix .sig, $(tarballs))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+all: $(keyring) $(signatures) $(sha1s)
+
+.PHONY: downloads_clean
+
+$(keyring):
+	@cd .. ; $(MAKE) all
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======\n"
+	@for tarball in $(tarballs) ; do \
+	  wget -N $(url)/$$tarball ; \
+	done
+
+$(signatures): %.tar.bz2.sig : %.tar.bz2
+	@for signature in $@ ; do \
+	  echo -e "\n======= Downloading '$$signature' signature =======\n" ; \
+	  wget -N $(url)/$$signature ; \
+	  touch $$signature ; \
+	  gpg --verify --keyring $(keyring) $$signature ; ret="$$?" ; \
+	  if [ "$$ret" == "1" ]; then \
+	    echo -e "\n======= ERROR: Bad '$$signature' Signature =======\n" ; \
+	    exit 1 ; \
+	  fi ; \
+	done
+
+$(sha1s): %.tar.bz2.sha1sum : %.tar.bz2
+	@for tarball in $< ; do \
+	  echo -e "\n======= Calculation '$$tarball' sha1sum =======\n" ; \
+	  sha1sum --binary $$tarball > $$tarball.sha1sum ; \
+	done
+
+downloads_clean:
+	@rm -rf $(tarballs) $(signatures) $(sha1s)
diff --git a/GNU/multiprecision/Makefile b/GNU/multiprecision/Makefile
new file mode 100644
index 0000000..745219b
--- /dev/null
+++ b/GNU/multiprecision/Makefile
@@ -0,0 +1,49 @@
+#
+# Download: http://www.multiprecision.org/mpc/download
+#
+# original url: http://www.multiprecision.org
+#
+
+url         = http://www.multiprecision.org/mpc/download
+
+keyring     = ../keyring-765C61E3.gpg
+
+versions    = 0.8.2 0.9 1.0
+
+tarballs    = $(addsuffix .tar.gz, $(addprefix mpc-, $(versions)))
+signatures  = $(addsuffix .asc, $(tarballs))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+all: $(keyring) $(signatures) $(sha1s)
+
+.PHONY: downloads_clean
+
+$(keyring):
+	@cd .. ; $(MAKE) all
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======\n"
+	@for tarball in $(tarballs) ; do \
+	  wget -N $(url)/$$tarball ; \
+	done
+
+$(signatures): %.tar.gz.asc : %.tar.gz
+	@for signature in $@ ; do \
+	  echo -e "\n======= Downloading '$$signature' signature =======\n" ; \
+	  wget -N $(url)/$$signature ; \
+	  touch $$signature ; \
+	  gpg --verify --keyring $(keyring) $$signature ; ret="$$?" ; \
+	  if [ "$$ret" == "1" ]; then \
+	    echo -e "\n======= ERROR: Bad '$$signature' Signature =======\n" ; \
+	    exit 1 ; \
+	  fi ; \
+	done
+
+$(sha1s): %.tar.gz.sha1sum : %.tar.gz
+	@for tarball in $< ; do \
+	  echo -e "\n======= Calculation '$$tarball' sha1sum =======\n" ; \
+	  sha1sum --binary $$tarball > $$tarball.sha1sum ; \
+	done
+
+downloads_clean:
+	@rm -rf $(tarballs) $(signatures) $(sha1s)
diff --git a/Makefile b/Makefile
index 344dd19..3eb9f68 100644
--- a/Makefile
+++ b/Makefile
@@ -4,19 +4,23 @@
 # $ tree -fid .
 #
 
-SUBDIRS := GNU               \
-           GNU/EGLIBC/2.12.1 \
-           GNU/EGLIBC/2.16.1 \
-           GNU/binutils      \
-           GNU/gcc           \
-           GNU/gdb           \
-           Linux             \
-           Linux/dm644x      \
-           Linux/mips        \
-           Linux/omap        \
-           Linux/v2.6        \
-           Linux/v3.x        \
-           newlib            \
+SUBDIRS := GNU                 \
+           GNU/EGLIBC/2.12.1   \
+           GNU/EGLIBC/2.16.1   \
+           GNU/binutils        \
+           GNU/gcc             \
+           GNU/gmp             \
+           GNU/mpc             \
+           GNU/multiprecision  \
+           GNU/mpfr            \
+           GNU/gdb             \
+           Linux               \
+           Linux/dm644x        \
+           Linux/mips          \
+           Linux/omap          \
+           Linux/v2.6          \
+           Linux/v3.x          \
+           newlib              \
            dm644x/flash-tools/IRAM-flasher \
            dm644x/flash-tools/IRAM-loader  \
            dm644x/flash-tools/NOR-flasher  \