19dc4c5d (kx 2023-04-11 06:54:40 +0300 1) #
19dc4c5d (kx 2023-04-11 06:54:40 +0300 2) # Project Home:
19dc4c5d (kx 2023-04-11 06:54:40 +0300 3) # ============
19dc4c5d (kx 2023-04-11 06:54:40 +0300 4) # https://code.google.com/p/cryptsetup
19dc4c5d (kx 2023-04-11 06:54:40 +0300 5) #
19dc4c5d (kx 2023-04-11 06:54:40 +0300 6) # Downloads:
19dc4c5d (kx 2023-04-11 06:54:40 +0300 7) # =========
19dc4c5d (kx 2023-04-11 06:54:40 +0300 8) # ftp://ftp.kernel.org/pub/linux/utils/cryptsetup
19dc4c5d (kx 2023-04-11 06:54:40 +0300 9) # https://www.kernel.org/pub/linux/utils/cryptsetup
19dc4c5d (kx 2023-04-11 06:54:40 +0300 10) #
19dc4c5d (kx 2023-04-11 06:54:40 +0300 11)
19dc4c5d (kx 2023-04-11 06:54:40 +0300 12)
19dc4c5d (kx 2023-04-11 06:54:40 +0300 13) url = https://www.kernel.org/pub/linux/utils
19dc4c5d (kx 2023-04-11 06:54:40 +0300 14)
19dc4c5d (kx 2023-04-11 06:54:40 +0300 15) versions = 1.4.3 1.6.6 1.7.0 2.3.5 2.6.1
19dc4c5d (kx 2023-04-11 06:54:40 +0300 16)
19dc4c5d (kx 2023-04-11 06:54:40 +0300 17) pkg_name = cryptsetup
19dc4c5d (kx 2023-04-11 06:54:40 +0300 18) arch_type = tar.xz
19dc4c5d (kx 2023-04-11 06:54:40 +0300 19) suffixes = $(arch_type) tar.sign
19dc4c5d (kx 2023-04-11 06:54:40 +0300 20)
19dc4c5d (kx 2023-04-11 06:54:40 +0300 21) files = $(foreach suffix, $(suffixes), $(addsuffix .$(suffix), $(addprefix $(pkg_name)-, $(versions))))
19dc4c5d (kx 2023-04-11 06:54:40 +0300 22) tarballs = $(addsuffix .$(arch_type), $(addprefix $(pkg_name)-, $(versions)))
19dc4c5d (kx 2023-04-11 06:54:40 +0300 23) sha1s = $(addsuffix .sha1sum, $(tarballs))
19dc4c5d (kx 2023-04-11 06:54:40 +0300 24)
19dc4c5d (kx 2023-04-11 06:54:40 +0300 25)
19dc4c5d (kx 2023-04-11 06:54:40 +0300 26) all: $(files) $(sha1s)
19dc4c5d (kx 2023-04-11 06:54:40 +0300 27)
19dc4c5d (kx 2023-04-11 06:54:40 +0300 28)
19dc4c5d (kx 2023-04-11 06:54:40 +0300 29) .PHONY: downloads_clean
19dc4c5d (kx 2023-04-11 06:54:40 +0300 30)
19dc4c5d (kx 2023-04-11 06:54:40 +0300 31) $(files):
19dc4c5d (kx 2023-04-11 06:54:40 +0300 32) @echo -e "\n======= Downloading '$(pkg_name)' sourses =======\n"
19dc4c5d (kx 2023-04-11 06:54:40 +0300 33) @for version in $(versions) ; do \
19dc4c5d (kx 2023-04-11 06:54:40 +0300 34) major_minor=`echo $$version | sed 's/\([0-9][.][0-9]*\)\([\.].*\)/\1/'` ; \
19dc4c5d (kx 2023-04-11 06:54:40 +0300 35) for suffix in $(suffixes) ; do \
19dc4c5d (kx 2023-04-11 06:54:40 +0300 36) wget -N $(url)/$(pkg_name)/v$$major_minor/$(pkg_name)-$$version.$$suffix ; \
19dc4c5d (kx 2023-04-11 06:54:40 +0300 37) done ; \
19dc4c5d (kx 2023-04-11 06:54:40 +0300 38) done
19dc4c5d (kx 2023-04-11 06:54:40 +0300 39)
19dc4c5d (kx 2023-04-11 06:54:40 +0300 40) $(sha1s): %.$(arch_type).sha1sum : %.$(arch_type)
19dc4c5d (kx 2023-04-11 06:54:40 +0300 41) @for tarball in $< ; do \
19dc4c5d (kx 2023-04-11 06:54:40 +0300 42) echo -e "\n======= Calculation the '$$tarball' sha1sum =======\n" ; \
19dc4c5d (kx 2023-04-11 06:54:40 +0300 43) sha1sum --binary $$tarball > $$tarball.sha1sum ; \
19dc4c5d (kx 2023-04-11 06:54:40 +0300 44) done
19dc4c5d (kx 2023-04-11 06:54:40 +0300 45)
19dc4c5d (kx 2023-04-11 06:54:40 +0300 46) downloads_clean:
19dc4c5d (kx 2023-04-11 06:54:40 +0300 47) @rm -f $(files) $(sha1s)