Compiling nettle

#search for 2.7-fixes at https://www.mail-archive.com/nettle-bugs@lists.lysator.liu.se/msg00683.html
NEW_BUILD_NAME=nettle
NEW_BUILD_VER=2.7-fixes
NEW_BUILD_NAME_AND_VER=$NEW_BUILD_NAME-$NEW_BUILD_VER
ls -l /tmp/$NEW_BUILD_NAME-*
ls -l ~/ffp_0.7_armv5/packages/$NEW_BUILD_NAME-*
NEW_BUILD_NR=0
cd ~/compile
wget -O nettle-2.7-fixes.zip https://git.lysator.liu.se/nettle/nettle/repository/archive.zip?ref=nettle-2.7-fixes
unzip $NEW_BUILD_NAME_AND_VER.zip
cd ~/compile/$NEW_BUILD_NAME_AND_VER/
find . -type f \( -exec sed -i s/"\/usr\/bin\/perl"/"\/ffp\/bin\/perl"/ {} \; , -exec sed -i s/"\/usr\/bin\/python"/"\/ffp\/bin\/python"/ {} \; , -exec sed -i s/"\/usr\/bin\/bash"/"\/ffp\/bin\/bash"/ {} \; , -exec sed -i s/"\/usr\/bin\/sh"/"\/ffp\/bin\/sh"/ {} \; , -exec sed -i s/"\/usr\/bin\/env"/"\/ffp\/bin\/env"/ {} \; , -exec sed -i s/"\/bin\/bash"/"\/ffp\/bin\/bash"/ {} \; , -exec sed -i s/"\/bin\/sh"/"\/ffp\/bin\/sh"/ {} \; , -exec sed -i s/"\/bin\/env"/"\/ffp\/bin\/env"/ {} \; , -exec sed -i s/"\/ffp\/ffp\/"/"\/ffp\/"/ {} \; \)
export BUILD_FLAGS="-march=armv5te -mfloat-abi=soft -mabi=aapcs-linux -pthread -O2 -lintl -Wall -I/ffp/include"
export LDFLAGS="-L/ffp/lib -lintl"
export CPPFLAGS="$BUILD_FLAGS"
export CXXFLAGS="$BUILD_FLAGS"
export CFLAGS="$BUILD_FLAGS"
export LC_ALL=POSIX
aclocal -I .
autoconf
autoheader
#automake --add-missing
#Comment/modify these lines in Makefile.in:
#DOCTARGETS = @IF_DOCUMENTATION@ nettle.html
##DOCTARGETS = @IF_DOCUMENTATION@ nettle.info nettle.html nettle.pdf
#
##.texinfo.dvi:
##	cd $(srcdir) && texi2dvi -b `basename "$<"`
#
##.dvi.ps:
##	cd $(srcdir) && dvips -Ppdf -G0 -o `basename "$<" .dvi`.ps `basename "$<"`
#
#	nettle.html sha-example.c
##	nettle.texinfo nettle.info nettle.html nettle.pdf sha-example.c
./configure --help > configure.help.txt
./configure --prefix=/ffp --enable-gcov
make
#nohup /ffp/bin/make -C ~/compile/$NEW_BUILD_NAME_AND_VER &
#tail -f nohup.out
#new package creation & installation
rm -r $HOME/temp/$NEW_BUILD_NAME_AND_VER
make install DESTDIR=$HOME/temp/$NEW_BUILD_NAME_AND_VER
cd $HOME/temp/$NEW_BUILD_NAME_AND_VER
makepkg $NEW_BUILD_NAME $NEW_BUILD_VER $NEW_BUILD_NR
cp -v /tmp/$NEW_BUILD_NAME-$NEW_BUILD_VER-arm-$NEW_BUILD_NR.txz ~/ffp_0.7_armv5/packages/
funpkg -i ~/ffp_0.7_armv5/packages/$NEW_BUILD_NAME-$NEW_BUILD_VER-arm-$NEW_BUILD_NR.txz
funpkg -q $NEW_BUILD_NAME

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.