tce-load -wi compiletc libdaemon-dev cd /tmp wget http://0pointer.de/lennart/projects/ifplugd/ifplugd-0.28.tar.gz tar zxf ifplugd-0.28.tar.gz cd ifplugd-0.28 # for x86 #CC="gcc -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -march=i486 -mtune=i686 -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --disable-static --localstatedir=/var --mandir=/usr/local/share/man --with-initdir=/usr/local/etc/init.d --disable-lynx --disable-xmltoman --disable-subversion # for x86_64 CC="gcc -flto -fuse-linker-plugin -mtune=generic -Os -pipe" CXX="g++ -flto -fuse-linker-plugin -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local -disable-static --localstatedir=/var --mandir=/usr/local/share/man --with-initdir=/usr/local/etc/init.d --disable-lynx --disable-xmltoman --disable-subversion find . -name Makefile -type f -exec sed -i 's/-g -O2//g' {} \; make # install to DESTDIR DESTDIR=`mktemp -d` chmod 755 ${DESTDIR} make DESTDIR=${DESTDIR} install-strip # move config file to .sample mv ${DESTDIR}/usr/local/etc/ifplugd/ifplugd.conf ${DESTDIR}/usr/local/etc/ifplugd/ifplugd.conf.sample mv ${DESTDIR}/usr/local/etc/ifplugd/ifplugd.action ${DESTDIR}/usr/local/etc/ifplugd/ifplugd.action.sample # add copyright files mkdir -p ${DESTDIR}/usr/local/share/doc/ifplugd cp -p LICENSE ${DESTDIR}/usr/local/share/doc/ifplugd # then, split man doc to ifplugd-doc DOC_DESTDIR=`mktemp -d` chmod 755 ${DOC_DESTDIR} tar -C ${DESTDIR} usr/local/share/man -cf - | ( cd ${DOC_DESTDIR} && tar xvf - ) rm -rf ${DESTDIR}/usr/local/share/man # set permission sudo chown -R root:root ${DESTDIR} sudo chown -R root:root ${DOC_DESTDIR} # TCZ packaging tce-load -wi squashfs-tools submitqc # TCZ packaging -- ifplugd.tcz cd /tmp mksquashfs ${DESTDIR} ifplugd.tcz md5sum ifplugd.tcz > ifplugd.tcz.md5.txt find ${DESTDIR} -type f | sed -e "s#^${DESTDIR}##" > ifplugd.tcz.list vi ifplugd.tcz.dep - - - - libdaemon.tcz - - - - vi ifplugd.tcz.info (edit .info file) # do validation submitqc -c --libs ifplugd.tcz # TCZ packaging -- ifplugd-doc.tcz cd /tmp mksquashfs ${DOC_DESTDIR} ifplugd-doc.tcz md5sum ifplugd-doc.tcz > ifplugd-doc.tcz.md5.txt find ${DOC_DESTDIR} -type f | sed -e "s#^${DOC_DESTDIR}##" > ifplugd-doc.tcz.list # no ifplugd-doc.tcz.dep is required vi ifplugd-doc.tcz.info (edit .info file) # do validation submitqc -c --libs ifplugd-doc.tcz # cleanup sudo rm -rf ${DESTDIR} ${DOC_DESTDIR} rm -rf ifplugd-0.28.tar.gz