# Description file for tinycore extension ($ extbuild sample.desc) # Source PACKAGE="tor" #RENAME_TO="" SEP="-" VERSION="0.2.2.36" STYPE="https" MIRROR="www.torproject.org/dist" PKG_EXT=".tar.gz" # Dependencies, Build flags, dev auto-added BUILD_DEPS="libevent openssl-1.0.0" RUN_DEPS="libevent openssl-1.0.0" FLAGS="--enable-gcc-hardening --enable-linker-hardening" AFTER_INSTALL_CMD="mv ${TCB_BLDDIR}/$PACKAGE/usr/local/etc/tor/torrc.sample ${TCB_BLDDIR}/$PACKAGE/usr/local/etc/tor/torrc" #DBG_PKG=1 #OVERWRITE_LOCAL=1 #NO_DESTDIR=1 #NO_PERL=1 #NO_AUTOTOOLS=1 #NO_OWN_MOD=1 #UPX_COMPRESS=1 # Packaging DEV_MASK="-name *.h -o -name *.c -o -name *.la -o -name *.a -o -name *.m4 -o -name *.pc -o -name *.rh" LOCALE_MASK="-name locale -type d" DOC_MASK="( -name man -o -name manual -o -name doc -o -name info ) -a -type d" #CONF_MASK="-name *.conf" CONF_MAND_MASK="-name *.conf -o -name torrc" # Info DESCRIPTION="tor - The Onion Router, anonymizing network software" AUTHORS="Various" MAINTAINER="gutmensch, batnas" HOMEPAGE="http://www.torproject.org" LICENSE="BSD" TAGS="anonymity network secure router tor" COMMENTS="Edit /usr/local/etc/tor/torrc to your needs and add to backup. Usage: /usr/local/etc/init.d/tor start /usr/local/etc/init.d/tor stop" CHANGE="__TODAY__ " ##### changelog, dont modify! is done by script! ##### #CHANGELOG[1]="2012/05/26 Recompiled against TC 4.x, bump to 0.2.2.36 (gutmensch)" #CHANGELOG[0]="2010/06/11 Initial release by batnas" ############### end of changelog ##################### configure_special_source () { true # dummy_file filename [ $? -eq 0 ] && success || fail } work_special_build () { sed -i "s%#RunAsDaemon 1%RunAsDaemon 1\nUser tc\nDataDirectory /home/tc/.tor\nAvoidDiskWrites 1\nPidFile /var/run/tor/tor.pid\nLog notice file /var/log/tor/tor.log%" "${TCB_BLDDIR}/$PACKAGE/usr/local/etc/tor/torrc.sample" cat <> ${SS1} TCUSER="\$(cat /etc/sysconfig/tcuser)" if [ "\$TCUSER" != "tc" ];then sed -i "s%^User.*%User \$TCUSER%" /usr/local/etc/tor/torrc sed -i "s%^DataDirectory.*%DataDirectory /home/\$TCUSER/.tor%" /usr/local/etc/tor/torrc fi EOF mkdir -p "${TCB_BLDDIR}/$PACKAGE/usr/local/etc/init.d" cp "${TCB_BLDDIR}/../tor.init.d" "${TCB_BLDDIR}/$PACKAGE/usr/local/etc/init.d/tor" chmod +x "${TCB_BLDDIR}/$PACKAGE/usr/local/etc/init.d/tor" # to_new_extension "-name file1.txt -o -name file2.bin" new_ext "dep1 dep2" # create_start_script $EXTENSION # echo "my command" >> ${SS1} # create_wbar_icon $EXTENSION $TMPICONPATH $EXECUTE $WBARNAME #create_initd_script $PACKAGE /usr/local/bin/tor /var/run/tor.pid /var/log/tor.log "-f /usr/local/etc/tor/torrc" # cat < ${TCB_BLDDIR}/${PACKAGE}/usr/local/etc/ # EOF [ $? -eq 0 ] && success || fail }