#!/bin/sh DOWNLOAD="0" ARCH="sparc64" TARGET="$ARCH-linux" SSL_ARCH="linux64-sparcv9" #====================================================================# # versions # #====================================================================# BINUTILS="2.13.2.1" GCC="3.2.3" LINUX_MAJ="2.4" LINUX_MIN="20" LINUX="$LINUX_MAJ.$LINUX_MIN" GLIBC="2.3.1" NCURSES="5.3" PAM="0.77" ZLIB="1.1.4" OPENSSL="0.9.7b" BASH="2.05b" BZIP2="1.0.2" DCRON="29" E2FSPROGS="1.32" FILEUTILS="4.1" GZIP="1.2.4a" NETTOOLS="1.60" NETDATE="1.2" NETKITBASE="0.17" OPENSSH="3.6.1p2" SHUTILS="2.0" SHADOW="4.0.3" SILO="1.3.0" SYSVINIT="2.83" TAR="1.13" TEXTUTILS="2.1" UTILLINUX="2.11z" VIM_MAJ="6" VIM_MIN="2b" KBD="" MODUTILS="$LINUX.25" #====================================================================# # directories # #====================================================================# MAIN_DIR="$HOME/$TARGET" # root BUILD_DIR="$MAIN_DIR/build" # where all packages get compiled CROSS_DIR="$MAIN_DIR/cross" # location of cross tool chain PKG_DIR="$MAIN_DIR/pkg" # ready to use packages SRC_DIR="$MAIN_DIR/src" # source packages TMP_DIR="$MAIN_DIR/tmp" # temporary install directory #====================================================================# # tools # #====================================================================# FTP="ftp" TARC="tar -c" TARX="tar -x" BTAR="-y" GTAR="-z" #====================================================================# # my little helpers # #====================================================================# cprm() { cd $TMP_DIR $TARC $BTAR --owner=0 --group=0 -f $PKG_DIR/$1.tar.bz2 * rm -rf [0-9A-Za-z]* } mkdir -p $BUILD_DIR $CROSS_DIR $PKG_DIR $SRC_DIR $TMP_DIR export PATH=$PATH:$CROSS_DIR/bin #====================================================================# # download # #====================================================================# if [ "$DOWNLOAD" == "1" ]; then cd $SRC_DIR $FTP ftp://ftp.gnu.org/gnu/binutils/binutils-$BINUTILS.tar.bz2 $FTP ftp://ftp.gnu.org/gnu/gcc/gcc-$GCC.tar.gz $FTP ftp://ftp.de.kernel.org/pub/linux/kernel/v$LINUX_MAJ/linux-$LINUX.tar.bz2 $FTP ftp://ftp.gnu.org/gnu/glibc/glibc-$GLIBC.tar.gz $FTP ftp://ftp.gnu.org/gnu/glibc/glibc-linuxthreads-$GLIBC.tar.gz $FTP ftp://ftp.gnu.org/gnu/bash/bash-$BASH.tar.gz $FTP ftp://ftp.de.kernel.org/pub/linux/libs/pam/pre/library/Linux-PAM-$PAM.tar.bz2 $FTP http://www.openssl.org/source/openssl-0.9.7b.tar.gz ftp://ftp.vim.org/pub/vim/unstable/unix/vim-6.2b.tar.bz2 ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/netkit-base-0.17.tar.gz $FTP $FTP ftp://ftp.de.kernel.org/pub/linux/utils/kernel/modutils/v$LINUX/modutils-$MODUTILS.tar.bz2 $FTP ftp://ftp.de.kernel.org/pub/linux/utils/kbd/kbd-$KBD.tar.bz2 fi #====================================================================# # untar # #====================================================================# cd $BUILD_DIR $TARX $BTAR -f $SRC_DIR/binutils-$BINUTILS.tar.bz2 $TARX $GTAR -f $SRC_DIR/gcc-$GCC.tar.gz $TARX $BTAR -f $SRC_DIR/linux-$LINUX.tar.bz2 $TARX $GTAR -f $SRC_DIR/glibc-$GLIBC.tar.gz cd $BUILD_DIR/glibc-$GLIBC $TARX $GTAR -f $SRC_DIR/glibc-linuxthreads-$GLIBC.tar.gz cd $BUILD_DIR $TARX $GTAR -f $SRC_DIR/ncurses-$NCURSES.tar.gz $TARX $BTAR -f $SRC_DIR/Linux-PAM-$PAM.tar.bz2 $TARX $BTAR -f $SRC_DIR/zlib-$ZLIB.tar.bz2 $TARX $GTAR -f $SRC_DIR/openssl-$OPENSSL.tar.gz $TARX $GTAR -f $SRC_DIR/bash-$BASH.tar.gz $TARX $GTAR -f $SRC_DIR/bzip2-$BZIP2.tar.gz $TARX $GTAR -f $SRC_DIR/dcron$DCRON.tgz $TARX $GTAR -f $SRC_DIR/e2fsprogs-$E2FSPROGS.tar.gz $TARX $GTAR -f $SRC_DIR/fileutils-$FILEUTILS.tar.gz $TARX $GTAR -f $SRC_DIR/gzip-$GZIP.tar.gz $TARX $BTAR -f $SRC_DIR/net-tools-$NETTOOLS.tar.bz2 $TARX $GTAR -f $SRC_DIR/netdate.$NETDATE.tgz $TARX $GTAR -f $SRC_DIR/netkit-base-$NETKITBASE.tar.gz $TARX $GTAR -f $SRC_DIR/openssh-$OPENSSH.tar.gz $TARX $GTAR -f $SRC_DIR/sh-utils-$SHUTILS.tar.gz $TARX $BTAR -f $SRC_DIR/shadow-$SHADOW.tar.bz2 $TARX $BTAR -f $SRC_DIR/silo-$SILO.tar.bz2 $TARX $GTAR -f $SRC_DIR/sysvinit-$SYSVINIT.tar.gz $TARX $GTAR -f $SRC_DIR/tar-$TAR.tar.gz $TARX $BTAR -f $SRC_DIR/textutils-$TEXTUTILS.tar.bz2 $TARX $BTAR -f $SRC_DIR/util-linux-$UTILLINUX.tar.bz2 $TARX $BTAR -f $SRC_DIR/vim-$VIM_MAJ.$VIM_MIN.tar.bz2 #====================================================================# # build, install temporarily, package, delete # #====================================================================# #====================================================================# # cross compile environment / cross toolchain # #====================================================================# # # binutils for build # cd $BUILD_DIR/binutils-$BINUTILS ./configure --prefix=$CROSS_DIR --target=$TARGET make make install # duh, special fix cd $CROSS_DIR/$TARGET mv -iv lib/* ../lib/ rmdir lib ln -s ../lib . # # gcc for build step 1 # mkdir $BUILD_DIR/gcc-build cd $BUILD_DIR/gcc-build ../gcc-$GCC/configure --prefix=$CROSS_DIR --target=$TARGET --disable-threads --disable-shared --disable-multilib --enable-languages=c make make install # # linux # cd $BUILD_DIR/linux-$LINUX make ARCH=$ARCH CROSS_COMPILE=$TARGET- menuconfig make ARCH=$ARCH CROSS_COMPILE=$TARGET- dep clean vmlinux cd $CROSS_DIR/include ln -s $BUILD_DIR/linux-$LINUX/include/asm . ln -s $BUILD_DIR/linux-$LINUX/include/linux . # # glibc for build (build time: 26 min on an athlon xp 1700+, 512 megs) # mkdir $BUILD_DIR/glibc-build cd $BUILD_DIR/glibc-build ../glibc-$GLIBC/configure --prefix=$CROSS_DIR --build=i686-linux --host=$TARGET --with-headers=$BUILD_DIR/linux-$LINUX/include --enable-add-ons --disable-profile make make install # # gcc for build step 2 # cd $BUILD_DIR/gcc-$GCC mkdir $TARGET ln -s ../include $TARGET/ ./configure --prefix=$CROSS_DIR --target=$TARGET --disable-multilib --enable-languages=c,c++ make make install # # ncurses for build # mkdir $BUILD_DIR/ncurses-build cd $BUILD_DIR/ncurses-build ../ncurses-$NCURSES/configure --build=i686-linux --host=$TARGET --with-build-cc=gcc --prefix=$CROSS_DIR --with-shared --enable-termcap make make install cd $CROSS_DIR/include ln -s ncurses/* . # # zlib for build # cd $BUILD_DIR/zlib-$ZLIB CC=$TARGET-gcc LDSHARED="$TARGET-gcc -shared" ./configure --shared --prefix=$CROSS_DIR make make install CC=$TARGET-gcc AR="$TARGET-ar rc" RANLIB=$TARGET-ranlib ./configure --prefix=$CROSS_DIR make make install make distclean # # openssl for build # cd $BUILD_DIR/openssl-$OPENSSL ./Configure no-hw threads shared zlib-dynamic --prefix=$CROSS_DIR $SSL_ARCH make CC=$TARGET-gcc RANLIB=$TARGET-ranlib AR="$TARGET-ar \$(ARFLAGS) r " LD=$TARGET-ld make CC=$TARGET-gcc RANLIB=$TARGET-ranlib AR="$TARGET-ar \$(ARFLAGS) r " LD=$TARGET-ld install make dclean make clean # # libpng for build # cp scripts/makfile.linux Makefile make CC=$TARGET-gcc RANLIB=$TARGET-ranlib prefix=$CROSS_DIR # # gd for build # CC=$TARGET-gcc ./configure --host=$TARGET --prefix=$CROSS_DIR make make install #====================================================================# # target # #====================================================================# # # glibc for target # cd $BUILD_DIR/glibc-$GLIBC ./configure --prefix=/usr --build=i686-linux --host=$TARGET --with-headers=$BUILD_DIR/linux-$LINUX/include --enable-add-ons --disable-profile make make install_root=$TMP_DIR install cprm glibc-$GLIBC # # ncurses for target # cd $BUILD_DIR/ncurses-$NCURSES ./configure --build=i686-linux --host=$TARGET --with-build-cc=gcc --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-shared --enable-termcap make make DESTDIR=$TMP_DIR install cd $TMP_DIR mkdir lib mv usr/lib/*so* lib/ cprm ncurses-$NCURSES # # zlib for target # cd $BUILD_DIR/zlib-$ZLIB make distclean CC=$TARGET-gcc LDSHARED="$TARGET-gcc -shared" ./configure --shared --prefix=/usr --libdir=/usr/lib make mkdir -p $TMP_DIR/usr/lib $TMP_DIR/usr/include make prefix=$TMP_DIR/usr libdir=$TMP_DIR/usr/lib install CC=$TARGET-gcc AR="$TARGET-ar rc" RANLIB=$TARGET-ranlib ./configure --prefix=/usr --libdir=/usr/lib make make prefix=$TMP_DIR/usr libdir=$TMP_DIR/usr/lib install cprm zlib-$ZLIB # # openssl for target # cd $BUILD_DIR/openssl-$OPENSSL ./Configure no-hw threads shared zlib-dynamic --openssldir=/etc/ssl --prefix=/usr --install_prefix=$TMP_DIR $SSL_ARCH make CC=$TARGET-gcc RANLIB=$TARGET-ranlib AR="$TARGET-ar \$(ARFLAGS) r " LD=$TARGET-ld make MANDIR=/usr/share/man install rm -rf $TMP_DIR/usr/lib/pkgconfig mv $TMP_DIR/usr/lib $TMP_DIR/usr/lib cprm openssl-$OPENSSL # # bash # cd $BUILD_DIR/bash-$BASH ac_cv_func_setvbuf_reversed=no bash_cv_have_mbstate_t=yes ./configure --prefix=/usr --bindir=/bin --sbindir=/sbin --sysconfdir=/etc --localstatedir=/var --infodir=/usr/share/info --mandir=/usr/share/man --enable-alias --enable-arith-for-command --enable-array-variables --enable-bang-history --enable-brace-expansion --enable-command-timing --enable-cond-command --enable-directory-stack --enable-disabled-builtins --enable-dparen-arithmetic --enable-extended-glob --enable-help-builtin --enable-history --enable-job-control --enable-process-substitution --enable-progcomp --enable-prompt-string-decoding --enable-readline --enable-select --host=$TARGET --build=i686-linux make make DESTDIR=$TMP_DIR install ln -s bash $TMP_DIR/bin/sh cprm bash-$BASH # # util-linux # cd $BUILD_DIR/util-linux-$UTILLINUX sed 's/^CPU=$(shell uname -m)/CPU='$ARCH'/' MCONFIG >MCONFIG.tmp mv MCONFIG.tmp MCONFIG echo 'USE_TTY_GROUP=no HAVE_PAM=yes HAVE_SLN=yes INSTALLSUID=$(INSTALL) -m $(SUIDMODE) DESTDIR='$TMP_DIR >> MCONFIG for i in */*; do if test -f $i; then sed 's%/etc/adjtime%/var/lib/hwclock/adjtime%' $i > $i.tmp sed 's%/var/lib/lastdate%/var/lib/hwclock/lastdate%' $i.tmp > $i fi done CC=$TARGET-gcc ./configure make make install mkdir -p $TMP_DIR/var/lib/hwclock cprm util-linux-$UTILLINUX # # net-tools # cd $BUILD_DIR/net-tools-$NETTOOLS echo '#define I18N 1 #define HAVE_AFUNIX 1 #define HAVE_AFINET 1 #define HAVE_AFINET6 1 #define HAVE_AFIPX 1 #define HAVE_AFATALK 1 #define HAVE_AFAX25 1 #define HAVE_AFNETROM 1 #define HAVE_AFROSE 1 #define HAVE_AFX25 1 #define HAVE_AFECONET 1 #define HAVE_AFDECnet 0 #define HAVE_AFASH 1 #define HAVE_HWETHER 1 #define HAVE_HWARC 1 #define HAVE_HWSLIP 1 #define HAVE_HWPPP 1 #define HAVE_HWTUNNEL 1 #define HAVE_HWSTRIP 1 #define HAVE_HWTR 1 #define HAVE_HWAX25 1 #define HAVE_HWROSE 1 #define HAVE_HWNETROM 1 #define HAVE_HWX25 1 #define HAVE_HWFR 1 #define HAVE_HWSIT 1 #define HAVE_HWFDDI 1 #define HAVE_HWHIPPI 1 #define HAVE_HWASH 1 #define HAVE_HWHDLCLAPB 1 #define HAVE_HWIRDA 1 #define HAVE_HWEC 1 #define HAVE_FW_MASQUERADE 1 #define HAVE_IP_TOOLS 1 #define HAVE_MII 1' >config.h echo 'I18N=1 HAVE_AFUNIX=1 HAVE_AFINET=1 HAVE_AFINET6=1 HAVE_AFIPX=1 HAVE_AFATALK=1 HAVE_AFAX25=1 HAVE_AFNETROM=1 HAVE_AFROSE=1 HAVE_AFX25=1 HAVE_AFECONET=1 HAVE_AFDECnet=0 HAVE_AFASH=1 HAVE_HWETHER=1 HAVE_HWARC=1 HAVE_HWSLIP=1 HAVE_HWPPP=1 HAVE_HWTUNNEL=1 HAVE_HWSTRIP=1 HAVE_HWTR=1 HAVE_HWAX25=1 HAVE_HWROSE=1 HAVE_HWNETROM=1 HAVE_HWX25=1 HAVE_HWFR=1 HAVE_HWSIT=1 HAVE_HWFDDI=1 HAVE_HWHIPPI=1 HAVE_HWASH=1 HAVE_HWHDLCLAPB=1 HAVE_HWIRDA=1 HAVE_HWEC=1 HAVE_FW_MASQUERADE=1 HAVE_IP_TOOLS=1 HAVE_MII=1' >config.make make CC=$TARGET-gcc AR=$TARGET-ar make BASEDIR=$TMP_DIR install cprm net-tools-$NETTOOLS # # e2fsprogs # cd $BUILD_DIR/e2fsprogs-$E2FSPROGS CC=$TARGET-gcc RANLIB=$TARGET-ranlib ./configure --build=i686-linux --host=$TARGET --prefix=/usr --with-root-prefix=/ --infodir=/usr/share/info --mandir=/usr/share/man --enable-elf-shlibs --enable-fsck make make DESTDIR=$TMP_DIR install cd $TMP_DIR cprm e2fsprogs-$E2FSPROGS # # fileutils # cd $BUILD_DIR/fileutils-$FILEUTILS ac_cv_func_setvbuf_reversed=no CC=$TARGET-gcc ./configure --host=$TARGET --build=i686-linux --prefix=/usr --bindir=/bin --sbindir=/sbin --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man #echo > lib/getline.c make make DESTDIR=$TMP_DIR install cprm fileutils-$FILEUTILS # # textutils # cd $BUILD_DIR/textutils-$TEXTUTILS CC=$TARGET-gcc ./configure --host=$TARGET --build=i686-linux --prefix=/usr --bindir=/bin --sbindir=/sbin --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man #echo > lib/getline.c make make DESTDIR=$TMP_DIR install cprm textutils-$TEXTUTILS # # sh-utils # cd $BUILD_DIR/sh-utils-$SHUTILS ac_cv_func_setvbuf_reversed=no CC=$TARGET-gcc AR=$TARGET-ar RANLIB=$TARGET-ranlib ./configure --host=$TARGET --build=i686-linux --prefix=/usr --bindir=/bin --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man #echo >lib/getline.c make make DESTDIR=$TMP_DIR install cprm sh-utils-$SHUTILS # # shadow # cd $BUILD_DIR/shadow-$SHADOW ac_cv_func_setpgrp_void=yes CC=$TARGET-gcc ./configure --build=i686-linux --host=$TARGET --prefix=/usr --sysconfdir=/etc --localstatedir=/var --infodir=/usr/share/info --mandir=/usr/share/man make make DESTDIR=$TMP_DIR install cd $TMP_DIR mv bin/sg usr/bin rm bin/vipw ln -s vipw usr/sbin/vigr mv lib usr/ cprm shadow-$SHADOW # # sysvinit # cd $BUILD_DIR/sysvinit-$SYSVINIT/src make CC=$TARGET-gcc mkdir -p $TMP_DIR/bin $TMP_DIR/sbin $TMP_DIR/usr/bin $TMP_DIR/usr/include $TMP_DIR/usr/share/man/man1 $TMP_DIR/usr/share/man/man5 $TMP_DIR/usr/share/man/man8 make BIN_OWNER=`id -u` BIN_GROUP=`id -g` ROOT=$TMP_DIR install cprm sysvinit-$SYSVINIT # # openssh # cd $BUILD_DIR/openssh-$OPENSSH ./configure --prefix=/usr --sysconfdir=/etc/ssh --localstatedir=/var --infodir=/usr/share/info --mandir=/usr/share/man --with-privsep-user=sshd --with-privsep-path=/var/lib/sshd --with-mantype=man --with-md5-passwords --with-default-path="/bin:/usr/bin:/usr/local/bin" --with-superuser-path="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" --with-pid-dir=/var/run --with-lastlog=/var/log/lastlog mv config.h.tmp config.h make CC=$TARGET-gcc LD=$TARGET-gcc RANLIB=$TARGET-ranlib AR=$TARGET-ar ln -s $TARGET-strip $CROSS_DIR/bin/strip && PATH=$CROSS_DIR/bin:$PATH make DESTDIR=$TMP_DIR install && rm $CROSS_DIR/bin/strip cprm openssh-$OPENSSH # # tar # cd $BUILD_DIR/tar-$TAR/src patch <$SRC_DIR/gnutarpatch.txt cd .. CC=$TARGET-gcc AR=$TARGET-ar RANLIB=$TARGET-ranlib ./configure --host=$TARGET --build=i686-linux --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man make make DESTDIR=$TMP_DIR install cprm tar-$TAR # # gzip # cd $BUILD_DIR/gzip-$GZIP CC=$TARGET-gcc ./configure --prefix=/usr make mkdir -p $TMP_DIR/usr/share/info $TMP_DIR/usr/share/man/man1 make prefix=$TMP_DIR/usr libdir=$TMP_DIR/usr/lib infodir=$TMP_DIR/usr/share/info mandir=$TMP_DIR/usr/share/man/man1 install rmdir $TMP_DIR/usr/lib $TMP_DIR/usr/man cprm gzip-$GZIP # # bzip2 # cd $BUILD_DIR/bzip2-$BZIP2 make CC=$TARGET-gcc AR=$TARGET-ar RANLIB=$TARGET-ranlib make PREFIX=$TMP_DIR/usr install mkdir $TMP_DIR/usr/share mv $TMP_DIR/usr/man $TMP_DIR/usr/share/ cprm bzip2-$BZIP2 # # ping # cd $BUILD_DIR/netkit-base-$NETKITBASE ./configure --installroot=$TMP_DIR echo "CC=$TARGET-gcc -s MANDIR=/usr/share/man" >>MCONFIG cd ping sed 's/install -s -o root/'$TARGET'-strip ping; install/' Makefile >Makefile.tmp mv Makefile.tmp Makefile make mkdir -p $TMP_DIR/bin $TMP_DIR/usr/share/man/man8 make install cprm netkit-base-$NETKITBASE # # vim # cd $BUILD_DIR/vim$VIM_MAJ$VIM_MIN ac_cv_header_termcap_h=no ac_cv_sizeof_int=4 ./configure --prefix=/usr --bindir=/bin --sysconfdir=/etc/vim --localstatedir=/var --libdir=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-vim-name=vi --enable-gui=no --disable-gpm --without-x --with-tlib=ncurses --with-features=huge --with-compiledby="$USER" make CC=$TARGET-gcc make DESTDIR=$TMP_DIR STRIP=$TARGET-strip install cprm vim-$VIM_MAJ.$VIM_MIN # # dcron + my patch # cd $BUILD_DIR/dcron patch -p1 <$SRC_DIR/dcron$DCRON-dietlibc-patch.diff make CC=$TARGET-gcc STRIP=$TARGET-strip make DESTDIR=$TMP_DIR SBINDIR=/usr/sbin MANDIR=/usr/share/man CRONTAB_OWNER=`id -u`.`id -g` CROND_OWNER=`id -u`.`id -g` CRONTAB_PERM=4755 install cprm dcron$DCRON # # netdate # cd $BUILD_DIR/netdate $TARGET-gcc -Wall -O2 -s -o netdate netdate.c mkdir -p $TMP_DIR/sbin $TMP_DIR/usr/share/man/man8 cp netdate $TMP_DIR/sbin/ cp netdate.8 $TMP_DIR/usr/share/man/man8/ cprm netdate-$NETDATE # # silo # cd $BUILD_DIR/silo-$SILO make HOST_CC=gcc CC=$TARGET-gcc LD="$TARGET-ld -L$BUILD_DIR/e2fsprogs-1.32/lib" AR=$TARGET-ar AS=$TARGET-as NM=$TARGET-nm RANLIB=$TARGET-ranlib STRIP=$TARGET-strip make DESTDIR=$TMP_DIR install cprm silo-$SILO # # iptables # cd $BUILD_DIR/iptables-$IPTABLES make PREFIX=/usr CC=$TARGET-gcc LD=$TARGET-ld AR=$TARGET-ar KERNEL_DIR=$BUILD_DIR/linux-$LINUX make DESTDIR=$TMP_DIR PREFIX=/usr LIBDIR=/usr/lib MANDIR=/usr/share/man install cprm iptables-$IPTABLES # # ppp # cd $BUILD_DIR/ppp-$PPP ./configure sed 's/ar /$(AR) /g' pppd/plugins/rp-pppoe/Makefile.linux | sed 's/gcc /$(CC) /g' >pppd/plugins/rp-pppoe/Makefile.tmp mv pppd/plugins/rp-pppoe/Makefile.tmp pppd/plugins/rp-pppoe/Makefile.linux sed 's/ar /$(AR) /g' pppd/plugins/radius/Makefile.linux | sed 's/gcc /$(CC) /g' >pppd/plugins/radius/Makefile.tmp mv pppd/plugins/radius/Makefile.tmp pppd/plugins/radius/Makefile.linux make CC=sparc-linux-gcc AR=sparc-linux-ar MANDIR=/usr/share/man make CC=sparc-linux-gcc AR=sparc-linux-ar MANDIR='$(DESTDIR)/usr/share/man' DESTDIR=/home/fjo/sparc-linux/tmp INSTALL=install install cprm ppp-$PPP # # squid # cd $BUILD_DIR/squid-$SQUID ac_cv_sizeof___int64=8 ac_cv_sizeof_void_p=4 ac_cv_sizeof_short=2 ac_cv_sizeof_int=4 ac_cv_sizeof_long=4 ac_cv_sizeof_long_long=8 ac_cv_sizeof_int16_t=2 ac_cv_sizeof_uint16_t=2 ac_cv_sizeof_u_int16_t=2 ac_cv_sizeof_int32_t=4 ac_cv_sizeof_uint32_t=4 ac_cv_sizeof_u_int32_t=4 ac_cv_sizeof_int64_t=8 ac_cv_sizeof_uint64_t=8 ac_cv_sizeof_u_int64_t=8 ac_cv_func_setresuid=yes CC=sparc-linux-gcc AR=sparc-linux-ar RANLIB=sparc-linux-ranlib LD=sparc-linux-ld ./configure --host=sparc-linux --build=i686-linux --prefix=/usr --sysconfdir=/etc/squid --datadir=/usr/share/squid/squid-2.5.STABLE4 --localstatedir=/var --infodir=/usr/share/info --mandir=/usr/share/man --with-pthreads --enable-storeio=ufs --enable-useragent-log --enable-referer-log --disable-wccp --enable-kill-parent-hack --enable-ssl --with-openssl --enable-default-err-language=German --enable-err-languages=German --enable-poll --enable-linux-netfilter --disable-ident-lookups make CC=gcc RANLIB=ranlib -C lib libmiscutil.a make CC=gcc RANLIB=ranlib -C src cf_gen make -C lib clean make DEFAULT_LOG_PREFIX=/var/log/squid DEFAULT_PID_FILE=/var/run/squid.pid DEFAULT_SWAP_DIR=/var/cache/www make DEFAULT_LOG_PREFIX=/var/log/squid DEFAULT_PID_FILE=/var/run/squid.pid DEFAULT_SWAP_DIR=/var/cache/www DESTDIR=$TMP_DIR install cprm squid-$SQUID # # modutils # cd $SRC_DIR/modutils-$MODUTILS CC=$TARGET-gcc AR=$TARGET-ar RANLIB=$TARGET-ranlib HOSTCC=gcc ./configure --host=$TARGET --build=i686-linux --bindir=/bin --sbindir=/sbin --sysconfdir=/etc --localstatedir=/var --infodir=/usr/share/info --mandir=/usr/share/man make ln -s $TARGET-strip $CROSS_DIR/bin/strip && PATH=$CROSS_DIR/bin:$PATH make DESTDIR=$TMP_DIR install && rm $CROSS_DIR/bin/strip cprm modutils-$MODUTILS # # psmisc # cd $SRC_DIR/psmisc-$PSMISC CC=$TARGET-gcc ./configure --host=$TARGET --build=i686-linux --prefix=/usr --bindir=/bin --sbindir=/sbin --sysconfdir=/etc --localstatedir=/var --infodir=/usr/share/info --mandir=/usr/share/man make make DESTDIR=$TMP_DIR install cprm psmisc-$PSMISC # # procps # cd $SRC_DIR/procps-$PROCPS for i in Makefile ps/module.mk proc/module.mk; do sed 's/--strip //g' $i > $i.tmp mv $i.tmp $i done make CC="$TARGET-gcc -s" make DESTDIR=$TMP_DIR install="install -D" ldconfig=echo "usr/bin"="\$(DESTDIR)/bin/" "usr/proc/bin"="\$(DESTDIR)/bin/" install cprm procps-$PROCPS # # syslog-ng # CC=sparc-linux-gcc ./configure --host=sparc-linux make CC=sparc-linux-gcc ./configure --host=sparc-linux --prefix=/usr --sysconfdir=/etc --localstatedir=/var --infodir=/usr/share/info --mandir=/usr/share/man --with-libol=../libol-0.3.9 make # # db # # # courier-imap # ac_cv_func_setpgrp_void=yes CC=sparc-linux-gcc ./configure --host=sparc-linux --prefix=/usr --datadir=/tmp --sysconfdir=/etc/imap --localstatedir=/var --infodir=/usr/share/info --mandir=/usr/share/man --without-ipv6 --enable-unicode=iso-8859-1,iso-8859-15,utf8 --without-authpwd --without-authpam --without-authuserdb --without-authcram --without-authvchkpw --without-authldap --without-authmysql --without-authpgsql --without-authdaemon --without-authcustom --with-userdb=/etc/imap/userdb --with-piddir=/var/run --with-locking-method=fcntl --with-waitfunc=wait make make DESTDIR=$TMP_DIR install #mv $TMP_DIR/tmp/* $TMP_DIR/usr/sbin/ #rmdir $TMP_DIR/tmp rm -r $TMP_DIR/tmp cprm courier-imap-$COURIERIMAP # # samba # cd source # configure for host=build, save include/config.h, make distclean, configure # for host=sparc, restore config.h, change endianess! # edit configure: "error: cannot run test program while cross compiling" CC="sparc-linux-gcc -s" ./configure --host=sparc-linux --prefix=/usr --sysconfdir=/etc --localstatedir=/var --infodir=/usr/share/info --mandir=/usr/share/man --with-fhs --with-privatedir=/var/lib/samba --with-lockdir=/var/lock --with-piddir=/var/run --with-swatdir=/usr/share/swat --with-configdir=/etc/samba --with-logfilebase=/var/log --with-smbmount --with-sendfile-support --with-expsam=pgsql --with-pgsql-prefix=/data/fjo/sparc-linux/tmp/usr make make DESTDIR=$TMP_DIR install # # libpng # make CC=$TARGET-gcc RANLIB=$TARGET-ranlib prefix=/usr mkdir -p $TMP_DIR/usr/include/libpng12 $TMP_DIR/usr/share/man make CC=$TARGET-gcc RANLIB=$TARGET-ranlib prefix=/usr MANPATH=/usr/share/man DESTDIR=$TMP_DIR install # # gd # CC=$TARGET-gcc ./configure --host=$TARGET --prefix=/usr --sysconfdir=/etc --localstatedir=/var --infodir=/usr/share/info --mandir=/usr/share/man make make DESTDIR=$TMP_DIR install # # webalizer # CC=$TARGET-gcc ./configure --host=$TARGET --prefix=/usr --sysconfdir=/etc/webalizer --localstatedir=/var --infodir=/usr/share/info --mandir=/usr/share/man --with-etcdir=/etc/webalizer --with-gdlib=$CROSS_DIR/lib --with-gd=$CROSS_DIR/include --with-language=german make mkdir -p $TMP_DIR/usr/bin $TMP_DIR/usr/share/man/man1 $TMP_DIR/etc/webalizer make BINDIR=$TMP_DIR/usr/bin MANDIR=$TMP_DIR/usr/share/man/man1 ETCDIR=$TMP_DIR/etc/webalizer install # # flex # CC=sparc-linux-gcc AR=sparc-linux-ar RANLIB=sparc-linux-ranlib ./configure --host=sparc-linux --prefix=$CROSS_DIR make make install rm $CROSS_DIR/bin/flex* # # syslog-ng # cd $SRC_DIR/libol-$LIBOL CC=sparc-linux-gcc AR=sparc-linux-ar RANLIB=sparc-linux-ranlib ./configure --host=sparc-linux --prefix=/usr --sysconfdir=/etc --localstatedir=/var --infodir=/usr/share/info --mandir=/usr/share/man make cd $SRC_DIR/syslogng-$SYSLOGNG CC=sparc-linux-gcc AR=sparc-linux-ar RANLIB=sparc-linux-ranlib ./configure --host=sparc-linux --prefix=/usr --sysconfdir=/etc --localstatedir=/var --infodir=/usr/share/info --mandir=/usr/share/man --with-libol=../libol-0.3.11 make # # thttpd # CC="sparc-linux-gcc -s" ./configure --host=sparc-linux --prefix=/usr --sysconfdir=/etc --localstatedir=/var --infodir=/usr/share/info --mandir=/usr/share/man make mkdir -p $TMP_DIR/usr/bin $TMP_DIR/usr/sbin $TMP_DIR/usr/share/man/man8 $TMP_DIR/usr/share/man/man1 cp thttpd $TMP_DIR/usr/sbin cp thttpd.8 $TMP_DIR/usr/share/man/man8 make WEBGROUP=`id -g` MANDIR=$TMP_DIR/usr/share/man BINDIR=$TMP_DIR/usr/bin -C extras install # # postgresql # CC="sparc-linux-gcc -s" ./configure --host=sparc-linux --prefix=/usr --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man --enable-integer-datetimes --with-openssl=/data/fjo/sparc-linux/tmp/usr --without-perl --without-readline # # gawk # CC="sparc-linux-gcc -s" ./configure --host=sparc-linux --prefix=/usr --sysconfdir=/etc --localstatedir=/var --infodir=/usr/share/info --mandir=/usr/share/man make make DESTDIR= install # # grep # CC="sparc-linux-gcc -s" ./configure --host=sparc-linux --prefix=/usr --sysconfdir=/etc --localstatedir=/var --infodir=/usr/share/info --mandir=/usr/share/man --disable-perl-regexp make make DESTDIR= install # # sed # CC="sparc-linux-gcc -s" ./configure --host=sparc-linux --prefix=/usr --sysconfdir=/etc --localstatedir=/var --infodir=/usr/share/info --mandir=/usr/share/man make make DESTDIR= install # # ipsec-tools # ac_cv_va_copy=yes ac_cv_file__data_fjo_sparc64_linux_build_linux_2_6_11_2_include_linux_pfkeyv2_h=yes ./configure --prefix=/opt/ipsec-tools --host=sparc-linux --enable-stats --enable-dpd --disable-ipv6 --with-kernel-headers=/data/fjo/sparc64-linux/build/linux-2.6.11.2/include --with-readline --with-openssl=/data/fjo/sparc-linux/cross/include make make DESTDIR= install # # etc #