non_free_files = \ gcc/doc/fsf-funding.7 \ gcc/doc/g++.1 \ gcc/doc/gcc.1 \ gcc/doc/gcc.info \ gcc/doc/gccint.info \ gcc/doc/gccint.texi \ gcc/doc/gcc.texi \ gcc/doc/gcov.1 \ gcc/doc/gcov.texi \ gcc/doc/gfortran.1 \ gcc/doc/include/funding.texi \ gcc/doc/invoke.texi \ gcc/fortran/gfc-internals.texi \ gcc/fortran/gfortran.info \ gcc/fortran/gfortran.texi \ gcc/fortran/intrinsic.texi \ gcc/fortran/invoke.texi \ libgomp/libgomp.info \ libgomp/libgomp.texi needed_files = \ gcc/doc/gcc.texi \ gcc/doc/invoke.texi \ gcc/doc/gcov.texi \ gcc/doc/include/funding.texi \ gcc/doc/gccint.texi \ libgomp/libgomp.texi upstream_name = gcc-$$(printf '%s\n' '$(OPK_SOURCE_VERSION_UPSTREAM)' | \ sed 's/^\([0-9a-z.~-][0-9a-z.~-]*\)+sip[1-9][0-9]*.*$$/\1/') upstream_archive = $(upstream_name).tar.xz upstream_url = http://ftp.gnu.org/gnu/gcc/$(upstream_name)/$(upstream_archive) source_archive = ../$(OPK_SOURCE)-$(OPK_SOURCE_VERSION_UPSTREAM).orig.tar.bz2 gpg = GNUPGHOME=gnupghome/ gpg --no-default-keyring --keyring ../keyring.gpg keys = \ 'B215 C163 3BCA 0477 615F 1B35 A5B3 A004 745C 015A' \ 'B3C4 2148 A44E 6983 B3E4 CC07 93FA 9B1A B75C 61B8' \ '90AA 4704 69D3 965A 87A5 DCB4 94D0 3953 902C 9419' \ '80F9 8B2E 0DAB 6C82 81BD F541 A7C8 C3B2 F71E DF1C' \ '7F74 F97C 1034 68EE 5D75 0B58 3AB0 0996 FC26 A641' \ '33C2 35A3 4C46 AA3F FB29 3709 A328 C3A2 C3C4 5C06' $(source_archive): wget -c "$(upstream_url)" "$(upstream_url).sig" install -m 0700 -d gnupghome/ [ -e ../keyring.gpg ] || \ $(gpg) --keyserver hkp://pool.sks-keyservers.net \ --recv-keys $(keys); \ rm -f ../keyring.gpg~; \ if ! $(gpg) --verify "$(upstream_archive).sig" "$(upstream_archive)"; \ then \ rm -Rf gnupghome/; \ exit 1; \ fi rm -Rf gnupghome/ tar -xJf "$(upstream_archive)" rm -f "$(upstream_archive)" "$(upstream_archive).sig" rm -Rf "$(upstream_name)/zlib/"; \ for file in $(non_free_files); do \ rm -f "$(upstream_name)/$${file}"; \ done for file in $(needed_files); do \ >"$(upstream_name)/$${file}"; \ done cp -p "$(upstream_name)/COPYING.RUNTIME" .. tar -cjf '$(source_archive)' "$(upstream_name)" mv "$(upstream_name)" src/ source: $(source_archive)