X-Git-Url: https://code.delx.au/refind/blobdiff_plain/b2410fb7695fb349a65a2749e9524f250a4f6420..16025084e9b3cf79dc13b84cd96ee850ff34296a:/mkdistrib diff --git a/mkdistrib b/mkdistrib index 47942b2..78ee30a 100755 --- a/mkdistrib +++ b/mkdistrib @@ -44,29 +44,41 @@ set -e make clean +# Remove temporary files from the "debian" subdirectory +rm -rf debian/refind debian/*.log + # Prepare a place and copy files there.... -mkdir -p ../snapshots/$1/refind-$1/icons -cp --preserve=timestamps icons/*icns ../snapshots/$1/refind-$1/icons/ -cp -a docs images keys include EfiLib libeg mok refind filesystems refind.spec install.sh mkrlconf.sh CREDITS.txt NEWS.txt BUILDING.txt COPYING.txt LICENSE.txt README.txt refind.inf Make.tiano Make.common Makefile refind.conf-sample ../snapshots/$1/refind-$1 +mkdir -p ../snapshots/$1/refind-$1/icons/licenses ../snapshots/$1/refind-$1/icons/svg +cp --preserve=timestamps icons/*png icons/README ../snapshots/$1/refind-$1/icons/ +cp --preserve=timestamps -r icons/licenses/* ../snapshots/$1/refind-$1/icons/licenses/ +cp --preserve=timestamps -r icons/svg/* ../snapshots/$1/refind-$1/icons/svg/ +cp -a debian docs images keys fonts banners include EfiLib libeg mok net refind filesystems gptsync refind.spec refind-install mkrlconf mvrefind mountesp CREDITS.txt NEWS.txt BUILDING.txt COPYING.txt LICENSE.txt README.txt refind.inf Make.tiano Make.common Makefile refind.conf-sample ../snapshots/$1/refind-$1 -# Go there and prepare a souce code zip file.... +# Go there and prepare a souce code tarball.... cd ../snapshots/$1/ -zip -9r refind-src-$1.zip refind-$1 +rm -f refind-src-$1.tar.gz +tar cvf refind-src-$1.tar refind-$1 +gzip -9 refind-src-$1.tar + +# Remove SVG files, since they aren't needed for binary packages.... +rm -rf refind-$1/icons/svg # Build the IA32 binaries cd refind-$1 -ARCH=ia32 make -j4 -ARCH=ia32 make -j4 fs +ARCH=ia32 make -j1 +ARCH=ia32 make fs mkdir -p refind-bin-$1/refind/drivers_ia32 cp --preserve=timestamps drivers_ia32/*_ia32.efi refind-bin-$1/refind/drivers_ia32/ cp --preserve=timestamps filesystems/LICENSE*txt refind-bin-$1/refind/drivers_ia32/ cp refind/refind_ia32.efi refind-bin-$1/refind/refind_ia32.efi cp refind/refind_ia32.efi $StartDir/ +mkdir -p refind-bin-$1/refind/tools_ia32 +cp --preserve=timestamps gptsync/gptsync_ia32.efi refind-bin-$1/refind/tools_ia32/ # Build the X64 binaries make clean -make -j4 -make -j4 fs +make -j1 +make fs mkdir -p refind-bin-$1/refind/drivers_x64 cp -a icons refind-bin-$1/refind/ if [[ $SignIt == 1 ]] ; then @@ -83,22 +95,40 @@ if [[ $SignIt == 1 ]] ; then else cp refind/refind_x64.efi refind-bin-$1/refind/refind_x64.efi fi +mkdir -p refind-bin-$1/refind/tools_x64 +if [[ $SignIt == 1 ]] ; then + $SBSign --key $KeysDir/refind.key --cert $KeysDir/refind.crt --output refind-bin-$1/refind/tools_x64/gptsync_x64.efi gptsync/gptsync_x64.efi +else + cp --preserve=timestamps gptsync/gptsync_x64.efi refind-bin-$1/refind/tools_x64/ +fi cp refind-bin-$1/refind/refind_x64.efi $StartDir -cp -a docs keys COPYING.txt LICENSE.txt README.txt CREDITS.txt NEWS.txt install.sh mkrlconf.sh refind-bin-$1 +cp -a docs keys banners fonts COPYING.txt LICENSE.txt README.txt CREDITS.txt NEWS.txt refind-install mkrlconf mvrefind mountesp refind-bin-$1 # Prepare the final .zip file zip -9r ../refind-bin-$1.zip refind-bin-$1 + +# Prepare a variant with the x86-64 version built with GNU-EFI.... +make clean +make -j1 gnuefi +if [[ $SignIt == 1 ]] ; then + $SBSign --key $KeysDir/refind.key --cert $KeysDir/refind.crt --output refind-bin-$1/refind/refind_x64.efi refind/refind_x64.efi +else + cp refind/refind_x64.efi refind-bin-$1/refind/refind_x64.efi +fi +zip -9r ../refind-bin-gnuefi-$1.zip refind-bin-$1 + +# Clean up.... cd .. rm -r refind-$1 # Prepare the RPM & Debian package files -cp refind-src-$1.zip ~/rpmbuild/SOURCES/ +cp refind-src-$1.tar.gz ~/rpmbuild/SOURCES/ rpmbuild -ba $StartDir/refind.spec mv ~/rpmbuild/RPMS/*/refind-$1* ./ mv ~/rpmbuild/SRPMS/refind-$1* ./ sudo alien --to-deb -k -c refind-$1*x86_64.rpm sudo chown rodsmith: refind*deb -rm ~/rpmbuild/SOURCES/refind-src-$1.zip +rm ~/rpmbuild/SOURCES/refind-src-$1.tar.gz # Clean up if [[ $SignIt == 1 ]] ; then