code:
[mirrors]
http://download.qt-project.org/archive/qt/4.6/qt-everywhere-opensource-src-4.6.4.tar.gz

[vars]
filesize=160837056
sha512=3441b74bd7c0f981bed4886abef8934a6193ab9d0a6d31a7d850ea8ff49172295a6d9c8b26893d88748d6f8759e8e0305b8242230e5e8519ffd35b641566621f

[deps]
libpng
libmng
libtiff
libjpeg
libressl
sqlite

[build]

# TODO: add security patches, for example
# http://qt.gitorious.org/qt/qt/commit/9a982779eabc4fafafe18dc9ad1b44fb2425563c
# http://qt.gitorious.org/qt/qt/commit/d28c9e9105f4b3f638bfa7492af10ce7d4f1c644
# and other CA loading patches from 2010-now

for p in socklen tolower libpng15 backspace None gl iconv gcc47 3rdparty linguist ; do
	patch -p1 < "$K"/qt464-"$p".patch
done

debugflags=
[ "$DEBUGBUILD" = "1" ] && debugflags="-no-optimized-qmake -debug"

# Wno-parentheses has no effect...
CXXFLAGS="-D_GNU_SOURCE -DMESA_EGL_NO_X11_HEADERS" \
./configure \
  -prefix "$butch_prefix"/ \
  -plugindir "$butch_prefix"/share/qt4/plugins \
  -translationdir "$butch_prefix"/share/qt4/translations \
  -docdir "$butch_prefix"/share/qt4/docs \
  --opensource \
  -confirm-license \
  -release                 \
  -nomake examples         \
  -nomake demos            \
  -no-qt3support $debugflags \
  -no-dbus \
  -no-cups \
  -no-phonon-backend \
  -no-audio-backend \
  -no-opengl \
  -system-libmng \
  -system-libpng \
  -system-libjpeg \
  -system-zlib \
  -system-sqlite \
  -no-separate-debug-info

make -j$MAKE_THREADS
make INSTALL_ROOT="$butch_install_dir" install

cat << EOF > /dev/null
to debug qt4 strings, we need to paste the following into gdb

define printq4stringdata
    set $d = ('QString::Data'*) $arg0
    set $i = 0
    # abort after a '-1' character, to avoid going on forever when printing a garbage string
    while $i < $d->size && ($i == 0 || (char)$d->data[$i-1] != -1)
        printf "%c", (char)($d->data[$i++] & 0xff)
    end
    printf "\n"
end
define printq4string
    printq4stringdata ($arg0).d
end

then use printq4string myqstring
( taken from https://raw.github.com/wyuka/kdesdk/master/scripts/kde-devel-gdb )
EOF


code:
[mirrors]
http://download.qt.io/official_releases/qt/5.5/5.5.1/single/qt-everywhere-opensource-src-5.5.1.tar.xz

[vars]
filesize=320459924
sha512=da91768481aa439a0f85392cfa4c87c59efa40d921867479985fac9beb2cd86be3db8ab66cf064b947f55513dc5712c39e4985907594daac4254aeafd0bad7a5

[deps]
xcb-util-renderutil
libressl
glib
gst01-plugins-base
icu
libjpeg
libmng
libpng
libtiff
libwebp
mtdev
pcre
sqlite
ruby
libxcb
xcb-util-image
xcb-util-keysyms
xcb-util-wm
xcb-util-image
librsvg
harfbuzz
xkeyboard-config

[build]
for i in stdin execinfo libressl musl-iconv-no-bom musl-mallinfo musl-pthread_getattr_np musl-resolve musl-siginfo_t musl-socklen musl-sys_errno_h pic ; do
  p=qt-$i.patch
  echo applying patch  $p
  patch -p0 < "$K"/$p
done
# fix default size of 2GB for some "executable allocator"
sed -i 's@#if CPU.*$@#if 0@' qtscript/src/3rdparty/javascriptcore/JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp

[ -z "$butch_prefix" ] && butch_prefix=/
debugflags=
[ "$DEBUGBUILD" = "1" ] && debugflags="-no-optimized-qmake -debug"

# Wno-parentheses has no effect...
QMAKE_CXXFLAGS="-D_GNU_SOURCE -DMESA_EGL_NO_X11_HEADERS $optcflags -fpermissive" \
QMAKE_CFLAGS="$optcflags" \
QMAKE_LDFLAGS="$optldflags" \
./configure \
  -prefix "$butch_prefix" \
  -plugindir "$butch_prefix"/lib/qt5/plugins \
  -importdir "$butch_prefix"/lib/qt5/imports \
  -translationdir "$butch_prefix"/share/qt5/translations \
  -docdir "$butch_prefix"/share/qt5/docs \
  -sysconfdir "$butch_prefix""/etc/xdg"	\
  -archdatadir "$butch_prefix"/lib/qt5 \
  -xkb-config-root "$butch_prefix"/share/X11/xkb \
  -opensource \
  -confirm-license \
  -release \
  -nomake examples \
  -openssl-linked \
  -no-dbus \
  -no-cups \
  -no-strip \
  -no-pch \
  -no-audio-backend \
  -no-opengl \
  -system-libpng \
  -system-libjpeg \
  -system-zlib \
  -system-sqlite \
  -system-harfbuzz \
  -system-xcb \
  -no-optimized-qmake \
  -skip qtwebengine \
  -no-libproxy \
  -no-mtdev \
  -no-qml-debug \
  -no-c++11 \
  -verbose \
  -no-separate-debug-info

#  -no-rpath \
#  -system-pcre \

#cd qtbase
#patch -p1 < "$K"/qt5-fix-compilation-with-libressl.patch
#cd ../qtwebkit
#patch -p1 < "$K"/qt5-exclude-backtrace-api-for-non-glibc-libraries.patch
#cd ..

make -j$MAKE_THREADS

make INSTALL_ROOT="$butch_install_dir" install

# Remove references to the build directory from the installed .pc files by running the following command:
# TODO: the pkgconfig files are heavily messed up and work by chance
# FIX EM
#find "$butch_install_dir"/lib/pkgconfig/ -name "*.pc" -exec perl -pi -e "s, -L$PWD/?\S+,,g" {} \;
# Remove references to the build directory from installed library dependency (prl) and profile include (pri) files by running the following commands as the root user:

find "$butch_install_dir"/ -name qt_lib_bootstrap_private.pri \
   -exec sed -i -e "s:$PWD/qtbase:/"$butch_install_dir"/lib/:g" {} \; &&

find "$butch_install_dir"/ -name \*.prl \
   -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \;
# Install images and create the menu entries for installed applications. The QT5BINDIR variable is used here to point to the directory for the executable programs. If you have changed the bindir above, QT5BINDIR will need to be adjusted below. Be sure that the QT5BINDIR variable is defined in root's environment and as the root user:

QT5BINDIR="$butch_install_dir"/bin

install -v -dm755 "$butch_install_dir"/share/pixmaps/                  &&

install -v -Dm644 qttools/src/assistant/assistant/images/assistant-128.png \
                  "$butch_install_dir"/share/pixmaps/assistant-qt5.png &&

install -v -Dm644 qttools/src/designer/src/designer/images/designer.png \
                  "$butch_install_dir"/share/pixmaps/designer-qt5.png  &&

install -v -Dm644 qttools/src/linguist/linguist/images/icons/linguist-128-32.png \
                  "$butch_install_dir"/share/pixmaps/linguist-qt5.png  &&

install -v -Dm644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png \
                  "$butch_install_dir"/share/pixmaps/qdbusviewer-qt5.png &&

install -dm755 "$butch_install_dir"/share/applications &&

echo '[Desktop Entry]
Name=Qt5 Assistant
Comment=Shows Qt5 documentation and examples
Exec=$QT5BINDIR/assistant
Icon=assistant-qt5.png
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Development;Documentation;' > "$butch_install_dir"/share/applications/assistant-qt5.desktop

echo '[Desktop Entry]
Name=Qt5 Designer
GenericName=Interface Designer
Comment=Design GUIs for Qt5 applications
Exec=$QT5BINDIR/designer
Icon=designer-qt5.png
MimeType=application/x-designer;
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Development;' > "$butch_install_dir"/share/applications/designer-qt5.desktop

echo '[Desktop Entry]
Name=Qt5 Linguist
Comment=Add translations to Qt5 applications
Exec=$QT5BINDIR/linguist
Icon=linguist-qt5.png
MimeType=text/vnd.trolltech.linguist;application/x-linguist;
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Development;' > "$butch_install_dir"/share/applications/linguist-qt5.desktop

echo '[Desktop Entry]
Name=Qt5 QDbusViewer
GenericName=D-Bus Debugger
Comment=Debug D-Bus applications
Exec=$QT5BINDIR/qdbusviewer
Icon=qdbusviewer-qt5.png
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Development;Debugger;' > "$butch_install_dir"/share/applications/qdbusviewer-qt5.desktop

#ln -s "$butch_install_dir"/mkspecs "$butch_root_dir"/

repo_name: aarf/bkauler

license: unknown


code:
[deps]
quirky-stage1
quirky-core
quirky-cli
quirky-desktop

gc
gsl
xorg
libtool
xclip
xprop
xrandr
xrdb
xsel
xset
xsetroot
xwininfo
vala
usbutils
usb-modeswitch
urxvt
upx
unrar
zip
unzip
rtorrent
syslinux6
squashfs-tools
ppp
dbus
dbus-glib
delta
ethtool
fuse
hunspell
lcms2
cups
cups-filters
f2fs-tools
youtube-dl
gnutls
glib-networking
gtkmm
giflib
libmad
libtiff
libogg
libvorbis-aotuv
libtheora
lame
libvpx
libwebp
x264
x265
xvid
a52dec
libflac
audiofile
vorbis-tools
libcddb
libcdio
libcdio-paranoia
ffmpeg
mplayer
asunder
openbox
obconf
bluefish
sweep
abiword
audacity
evince
epdfview
grafx2
gnumeric
gpicview
gimp
gitk
leafpad
transmission
ixchat
dillo
netsurf
sylpheed
geany
firefox
inkscape

[build]
#Quirky Linux is a fork of Puppy Linux. Quirky and Puppy use a build system named Woof*,
#that can build the distro from the binary packages of any other distro, including
#its own native .pet binary package format.
#The packages built by Sabotage can also be imported into Woof*, though I (BK) am
#also intending for a merge of the core concepts of Sabotage, such as the directory
#hierarchy and butch, into a new type of Quirky.
#
#bkauler/sabotage at github is the repository for this "Sabotaged Quirky" project
#(yeah, that can be the codename, or just "SQ"), which is a fork of sabotage-linux/sabotage.
#To all bkauler to be always able to pull from sabotage-linux, all of the Quirky-specific
# stuff is kept separate. You will see pkg/qky-* and pkg/quirky-* recipes in bkauler
#repo. At build-time on a local clone of bkauler repo on a PC, done by running
#"./build-stage0" (after setting up file 'config') followed by "./enter-chroot",
#the recipes are executed. This is done by running "butch install quirky-stage1"
#then: quirky-core, quirky-cli, quirky-desktop. Or just run 'quirky' (the recipe
#you are looking at now) and it will run all the others.
#In pkg/quirky-core, there is a package 'quirky-customize', and this is the key
#recipe, it merges all the qky-* Quirky-specific recipes. For example, qky-e2fsprogs
#will replace pkg/e2fsprogs.

path: pkg/quirky


code:
[mirrors]
https://busybox.net/downloads/busybox-1.24.2.tar.bz2

[vars]
filesize=2066822
sha512=4d20fb68ee440be2855231c7fd5f3cb9dd9bfcc1a688f0b59cd3f7a55c8819e9cc44bd15f91500713571f2a84e5e44adc0fa8ae0ae3ebf63961dfc9e1c9ef8e0

[deps]
busybox

[build]
#busybox has already been compiled. as i do not want to conflict with the main
#sabotage repo, i am compiling this later, and replace the previous 'busybox' binary.

#disables symlinking after install, as it is done below...
butch_do_relocate=false

patch -p1 < "$K"/busybox-1.24-guess_fstype-applet.patch
patch -p1 < "$K"/busybox-1.24-musl.patch

#i suppose this is one way to do it...
cat > .config <<'EOFMKR'
#
# Automatically generated make config: don't edit
# Busybox version: 1.24.2
# Sat May  7 20:26:20 2016
#
CONFIG_HAVE_DOT_CONFIG=y

#
# Busybox Settings
#

#
# General Configuration
#
CONFIG_DESKTOP=y
# CONFIG_EXTRA_COMPAT is not set
CONFIG_INCLUDE_SUSv2=y
# CONFIG_USE_PORTABLE_CODE is not set
CONFIG_PLATFORM_LINUX=y
CONFIG_FEATURE_BUFFERS_USE_MALLOC=y
# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
CONFIG_SHOW_USAGE=y
CONFIG_FEATURE_VERBOSE_USAGE=y
# CONFIG_FEATURE_COMPRESS_USAGE is not set
CONFIG_FEATURE_INSTALLER=y
# CONFIG_INSTALL_NO_USR is not set
CONFIG_LOCALE_SUPPORT=y
CONFIG_UNICODE_SUPPORT=y
# CONFIG_UNICODE_USING_LOCALE is not set
# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set
CONFIG_SUBST_WCHAR=63
CONFIG_LAST_SUPPORTED_WCHAR=12799
# CONFIG_UNICODE_COMBINING_WCHARS is not set
# CONFIG_UNICODE_WIDE_WCHARS is not set
# CONFIG_UNICODE_BIDI_SUPPORT is not set
# CONFIG_UNICODE_NEUTRAL_TABLE is not set
# CONFIG_UNICODE_PRESERVE_BROKEN is not set
# CONFIG_PAM is not set
CONFIG_FEATURE_USE_SENDFILE=y
CONFIG_LONG_OPTS=y
CONFIG_FEATURE_DEVPTS=y
# CONFIG_FEATURE_CLEAN_UP is not set
# CONFIG_FEATURE_UTMP is not set
# CONFIG_FEATURE_WTMP is not set
# CONFIG_FEATURE_PIDFILE is not set
CONFIG_PID_FILE_PATH=""
CONFIG_FEATURE_SUID=y
CONFIG_FEATURE_SUID_CONFIG=y
CONFIG_FEATURE_SUID_CONFIG_QUIET=y
# CONFIG_SELINUX is not set
# CONFIG_FEATURE_PREFER_APPLETS is not set
CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
CONFIG_FEATURE_SYSLOG=y
# CONFIG_FEATURE_HAVE_RPC is not set

#
# Build Options
#
CONFIG_STATIC=y
# CONFIG_PIE is not set
# CONFIG_NOMMU is not set
# CONFIG_BUILD_LIBBUSYBOX is not set
# CONFIG_FEATURE_INDIVIDUAL is not set
# CONFIG_FEATURE_SHARED_BUSYBOX is not set
CONFIG_LFS=y
CONFIG_CROSS_COMPILER_PREFIX=""
CONFIG_SYSROOT=""
CONFIG_EXTRA_CFLAGS="-D__musl__ -static"
CONFIG_EXTRA_LDFLAGS=""
CONFIG_EXTRA_LDLIBS=""

#
# Debugging Options
#
# CONFIG_DEBUG is not set
# CONFIG_DEBUG_PESSIMIZE is not set
# CONFIG_UNIT_TEST is not set
# CONFIG_WERROR is not set
CONFIG_NO_DEBUG_LIB=y
# CONFIG_DMALLOC is not set
# CONFIG_EFENCE is not set

#
# Installation Options ("make install" behavior)
#
CONFIG_INSTALL_APPLET_SYMLINKS=y
# CONFIG_INSTALL_APPLET_HARDLINKS is not set
# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set
# CONFIG_INSTALL_APPLET_DONT is not set
# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set
# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set
# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set
CONFIG_PREFIX="./_install"

#
# Busybox Library Tuning
#
# CONFIG_FEATURE_SYSTEMD is not set
CONFIG_FEATURE_RTMINMAX=y
CONFIG_PASSWORD_MINLEN=6
CONFIG_MD5_SMALL=1
CONFIG_SHA3_SMALL=1
# CONFIG_FEATURE_FAST_TOP is not set
# CONFIG_FEATURE_ETC_NETWORKS is not set
CONFIG_FEATURE_USE_TERMIOS=y
CONFIG_FEATURE_EDITING=y
CONFIG_FEATURE_EDITING_MAX_LEN=1024
# CONFIG_FEATURE_EDITING_VI is not set
CONFIG_FEATURE_EDITING_HISTORY=15
# CONFIG_FEATURE_EDITING_SAVEHISTORY is not set
# CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set
# CONFIG_FEATURE_REVERSE_SEARCH is not set
CONFIG_FEATURE_TAB_COMPLETION=y
# CONFIG_FEATURE_USERNAME_COMPLETION is not set
CONFIG_FEATURE_EDITING_FANCY_PROMPT=y
# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set
# CONFIG_FEATURE_NON_POSIX_CP is not set
CONFIG_FEATURE_VERBOSE_CP_MESSAGE=y
CONFIG_FEATURE_COPYBUF_KB=4
# CONFIG_FEATURE_SKIP_ROOTFS is not set
CONFIG_MONOTONIC_SYSCALL=y
CONFIG_IOCTL_HEX2STR_ERROR=y
CONFIG_FEATURE_HWIB=y

#
# Applets
#

#
# Archival Utilities
#
CONFIG_FEATURE_SEAMLESS_XZ=y
CONFIG_FEATURE_SEAMLESS_LZMA=y
CONFIG_FEATURE_SEAMLESS_BZ2=y
CONFIG_FEATURE_SEAMLESS_GZ=y
CONFIG_FEATURE_SEAMLESS_Z=y
# CONFIG_AR is not set
# CONFIG_FEATURE_AR_LONG_FILENAMES is not set
# CONFIG_FEATURE_AR_CREATE is not set
CONFIG_UNCOMPRESS=y
CONFIG_GUNZIP=y
CONFIG_BUNZIP2=y
CONFIG_UNLZMA=y
CONFIG_FEATURE_LZMA_FAST=y
CONFIG_LZMA=y
CONFIG_UNXZ=y
CONFIG_XZ=y
CONFIG_BZIP2=y
CONFIG_CPIO=y
CONFIG_FEATURE_CPIO_O=y
CONFIG_FEATURE_CPIO_P=y
CONFIG_DPKG=y
CONFIG_DPKG_DEB=y
CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY=y
CONFIG_GZIP=y
CONFIG_FEATURE_GZIP_LONG_OPTIONS=y
CONFIG_GZIP_FAST=0
# CONFIG_FEATURE_GZIP_LEVELS is not set
CONFIG_LZOP=y
# CONFIG_LZOP_COMPR_HIGH is not set
CONFIG_RPM2CPIO=y
CONFIG_RPM=y
CONFIG_TAR=y
CONFIG_FEATURE_TAR_CREATE=y
CONFIG_FEATURE_TAR_AUTODETECT=y
CONFIG_FEATURE_TAR_FROM=y
CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY=y
# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
CONFIG_FEATURE_TAR_LONG_OPTIONS=y
CONFIG_FEATURE_TAR_TO_COMMAND=y
CONFIG_FEATURE_TAR_UNAME_GNAME=y
CONFIG_FEATURE_TAR_NOPRESERVE_TIME=y
# CONFIG_FEATURE_TAR_SELINUX is not set
CONFIG_UNZIP=y

#
# Coreutils
#
CONFIG_BASENAME=y
CONFIG_CAT=y
CONFIG_DATE=y
CONFIG_FEATURE_DATE_ISOFMT=y
CONFIG_FEATURE_DATE_NANO=y
CONFIG_FEATURE_DATE_COMPAT=y
CONFIG_DD=y
CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
CONFIG_FEATURE_DD_THIRD_STATUS_LINE=y
CONFIG_FEATURE_DD_IBS_OBS=y
CONFIG_FEATURE_DD_STATUS=y
CONFIG_HOSTID=y
CONFIG_ID=y
CONFIG_GROUPS=y
CONFIG_SHUF=y
CONFIG_SYNC=y
# CONFIG_FEATURE_SYNC_FANCY is not set
CONFIG_TEST=y
CONFIG_FEATURE_TEST_64=y
CONFIG_TOUCH=y
CONFIG_FEATURE_TOUCH_NODEREF=y
CONFIG_FEATURE_TOUCH_SUSV3=y
CONFIG_TR=y
CONFIG_FEATURE_TR_CLASSES=y
CONFIG_FEATURE_TR_EQUIV=y
CONFIG_TRUNCATE=y
CONFIG_UNLINK=y
CONFIG_BASE64=y
# CONFIG_WHO is not set
# CONFIG_USERS is not set
CONFIG_CAL=y
# CONFIG_CATV is not set
CONFIG_CHGRP=y
CONFIG_CHMOD=y
CONFIG_CHOWN=y
CONFIG_FEATURE_CHOWN_LONG_OPTIONS=y
CONFIG_CHROOT=y
CONFIG_CKSUM=y
# CONFIG_COMM is not set
CONFIG_CP=y
CONFIG_FEATURE_CP_LONG_OPTIONS=y
CONFIG_CUT=y
CONFIG_DF=y
CONFIG_FEATURE_DF_FANCY=y
CONFIG_DIRNAME=y
CONFIG_DOS2UNIX=y
CONFIG_UNIX2DOS=y
CONFIG_DU=y
CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
CONFIG_ECHO=y
CONFIG_FEATURE_FANCY_ECHO=y
CONFIG_ENV=y
CONFIG_FEATURE_ENV_LONG_OPTIONS=y
CONFIG_EXPAND=y
CONFIG_FEATURE_EXPAND_LONG_OPTIONS=y
CONFIG_EXPR=y
CONFIG_EXPR_MATH_SUPPORT_64=y
CONFIG_FALSE=y
CONFIG_FOLD=y
CONFIG_FSYNC=y
CONFIG_HEAD=y
CONFIG_FEATURE_FANCY_HEAD=y
CONFIG_INSTALL=y
CONFIG_FEATURE_INSTALL_LONG_OPTIONS=y
CONFIG_LN=y
CONFIG_LOGNAME=y
CONFIG_LS=y
CONFIG_FEATURE_LS_FILETYPES=y
CONFIG_FEATURE_LS_FOLLOWLINKS=y
CONFIG_FEATURE_LS_RECURSIVE=y
CONFIG_FEATURE_LS_SORTFILES=y
CONFIG_FEATURE_LS_TIMESTAMPS=y
CONFIG_FEATURE_LS_USERNAME=y
CONFIG_FEATURE_LS_COLOR=y
# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set
CONFIG_MD5SUM=y
CONFIG_MKDIR=y
CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y
CONFIG_MKFIFO=y
CONFIG_MKNOD=y
CONFIG_MV=y
CONFIG_FEATURE_MV_LONG_OPTIONS=y
CONFIG_NICE=y
CONFIG_NOHUP=y
CONFIG_OD=y
CONFIG_PRINTENV=y
CONFIG_PRINTF=y
CONFIG_PWD=y
CONFIG_READLINK=y
CONFIG_FEATURE_READLINK_FOLLOW=y
CONFIG_REALPATH=y
CONFIG_RM=y
CONFIG_RMDIR=y
CONFIG_FEATURE_RMDIR_LONG_OPTIONS=y
CONFIG_SEQ=y
CONFIG_SHA1SUM=y
CONFIG_SHA256SUM=y
CONFIG_SHA512SUM=y
CONFIG_SHA3SUM=y
CONFIG_SLEEP=y
CONFIG_FEATURE_FANCY_SLEEP=y
CONFIG_FEATURE_FLOAT_SLEEP=y
CONFIG_SORT=y
CONFIG_FEATURE_SORT_BIG=y
CONFIG_SPLIT=y
CONFIG_FEATURE_SPLIT_FANCY=y
CONFIG_STAT=y
CONFIG_FEATURE_STAT_FORMAT=y
CONFIG_STTY=y
CONFIG_SUM=y
CONFIG_TAC=y
CONFIG_TAIL=y
CONFIG_FEATURE_FANCY_TAIL=y
CONFIG_TEE=y
# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set
CONFIG_TRUE=y
CONFIG_TTY=y
CONFIG_UNAME=y
CONFIG_UNAME_OSNAME="GNU/Linux"
CONFIG_UNEXPAND=y
CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS=y
CONFIG_UNIQ=y
CONFIG_USLEEP=y
CONFIG_UUDECODE=y
CONFIG_UUENCODE=y
CONFIG_WC=y
CONFIG_FEATURE_WC_LARGE=y
CONFIG_WHOAMI=y
CONFIG_YES=y

#
# Common options
#
CONFIG_FEATURE_VERBOSE=y

#
# Common options for cp and mv
#
# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set

#
# Common options for ls, more and telnet
#
CONFIG_FEATURE_AUTOWIDTH=y

#
# Common options for df, du, ls
#
CONFIG_FEATURE_HUMAN_READABLE=y

#
# Common options for md5sum, sha1sum, sha256sum, sha512sum, sha3sum
#
CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y

#
# Console Utilities
#
CONFIG_CHVT=y
CONFIG_FGCONSOLE=y
CONFIG_CLEAR=y
CONFIG_DEALLOCVT=y
CONFIG_DUMPKMAP=y
CONFIG_KBD_MODE=y
CONFIG_LOADFONT=y
CONFIG_LOADKMAP=y
CONFIG_OPENVT=y
CONFIG_RESET=y
CONFIG_RESIZE=y
CONFIG_FEATURE_RESIZE_PRINT=y
CONFIG_SETCONSOLE=y
CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS=y
CONFIG_SETFONT=y
CONFIG_FEATURE_SETFONT_TEXTUAL_MAP=y
CONFIG_DEFAULT_SETFONT_DIR=""
CONFIG_SETKEYCODES=y
CONFIG_SETLOGCONS=y
CONFIG_SHOWKEY=y

#
# Common options for loadfont and setfont
#
CONFIG_FEATURE_LOADFONT_PSF2=y
CONFIG_FEATURE_LOADFONT_RAW=y

#
# Debian Utilities
#
CONFIG_MKTEMP=y
CONFIG_PIPE_PROGRESS=y
CONFIG_RUN_PARTS=y
CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=y
CONFIG_FEATURE_RUN_PARTS_FANCY=y
CONFIG_START_STOP_DAEMON=y
CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y
CONFIG_WHICH=y

#
# Editors
#
CONFIG_AWK=y
# CONFIG_FEATURE_AWK_LIBM is not set
CONFIG_FEATURE_AWK_GNU_EXTENSIONS=y
CONFIG_CMP=y
CONFIG_DIFF=y
CONFIG_FEATURE_DIFF_LONG_OPTIONS=y
CONFIG_FEATURE_DIFF_DIR=y
CONFIG_ED=y
CONFIG_PATCH=y
CONFIG_SED=y
# CONFIG_VI is not set
CONFIG_FEATURE_VI_MAX_LEN=0
# CONFIG_FEATURE_VI_8BIT is not set
# CONFIG_FEATURE_VI_COLON is not set
# CONFIG_FEATURE_VI_YANKMARK is not set
# CONFIG_FEATURE_VI_SEARCH is not set
# CONFIG_FEATURE_VI_REGEX_SEARCH is not set
# CONFIG_FEATURE_VI_USE_SIGNALS is not set
# CONFIG_FEATURE_VI_DOT_CMD is not set
# CONFIG_FEATURE_VI_READONLY is not set
# CONFIG_FEATURE_VI_SETOPTS is not set
# CONFIG_FEATURE_VI_SET is not set
# CONFIG_FEATURE_VI_WIN_RESIZE is not set
# CONFIG_FEATURE_VI_ASK_TERMINAL is not set
# CONFIG_FEATURE_VI_UNDO is not set
# CONFIG_FEATURE_VI_UNDO_QUEUE is not set
CONFIG_FEATURE_VI_UNDO_QUEUE_MAX=0
CONFIG_FEATURE_ALLOW_EXEC=y

#
# Finding Utilities
#
CONFIG_FIND=y
CONFIG_FEATURE_FIND_PRINT0=y
CONFIG_FEATURE_FIND_MTIME=y
CONFIG_FEATURE_FIND_MMIN=y
CONFIG_FEATURE_FIND_PERM=y
CONFIG_FEATURE_FIND_TYPE=y
CONFIG_FEATURE_FIND_XDEV=y
CONFIG_FEATURE_FIND_MAXDEPTH=y
CONFIG_FEATURE_FIND_NEWER=y
CONFIG_FEATURE_FIND_INUM=y
CONFIG_FEATURE_FIND_EXEC=y
CONFIG_FEATURE_FIND_EXEC_PLUS=y
CONFIG_FEATURE_FIND_USER=y
CONFIG_FEATURE_FIND_GROUP=y
CONFIG_FEATURE_FIND_NOT=y
CONFIG_FEATURE_FIND_DEPTH=y
CONFIG_FEATURE_FIND_PAREN=y
CONFIG_FEATURE_FIND_SIZE=y
CONFIG_FEATURE_FIND_PRUNE=y
CONFIG_FEATURE_FIND_DELETE=y
CONFIG_FEATURE_FIND_PATH=y
CONFIG_FEATURE_FIND_REGEX=y
# CONFIG_FEATURE_FIND_CONTEXT is not set
CONFIG_FEATURE_FIND_LINKS=y
CONFIG_GREP=y
CONFIG_FEATURE_GREP_EGREP_ALIAS=y
CONFIG_FEATURE_GREP_FGREP_ALIAS=y
CONFIG_FEATURE_GREP_CONTEXT=y
CONFIG_XARGS=y
CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y
CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
CONFIG_FEATURE_XARGS_SUPPORT_REPL_STR=y

#
# Init Utilities
#
# CONFIG_BOOTCHARTD is not set
# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set
# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set
CONFIG_HALT=y
# CONFIG_FEATURE_CALL_TELINIT is not set
CONFIG_TELINIT_PATH=""
CONFIG_INIT=y
CONFIG_FEATURE_USE_INITTAB=y
CONFIG_FEATURE_KILL_REMOVED=y
CONFIG_FEATURE_KILL_DELAY=0
# CONFIG_FEATURE_INIT_SCTTY is not set
# CONFIG_FEATURE_INIT_SYSLOG is not set
CONFIG_FEATURE_EXTRA_QUIET=y
# CONFIG_FEATURE_INIT_COREDUMPS is not set
# CONFIG_FEATURE_INITRD is not set
CONFIG_INIT_TERMINAL_TYPE="linux"
CONFIG_MESG=y
# CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP is not set

#
# Login/Password Management Utilities
#
# CONFIG_ADD_SHELL is not set
# CONFIG_REMOVE_SHELL is not set
CONFIG_FEATURE_SHADOWPASSWDS=y
CONFIG_USE_BB_PWD_GRP=y
CONFIG_USE_BB_SHADOW=y
CONFIG_USE_BB_CRYPT=y
CONFIG_USE_BB_CRYPT_SHA=y
CONFIG_ADDUSER=y
CONFIG_FEATURE_ADDUSER_LONG_OPTIONS=y
CONFIG_FEATURE_CHECK_NAMES=y
CONFIG_LAST_ID=60000
CONFIG_FIRST_SYSTEM_ID=100
CONFIG_LAST_SYSTEM_ID=999
CONFIG_ADDGROUP=y
CONFIG_FEATURE_ADDGROUP_LONG_OPTIONS=y
CONFIG_FEATURE_ADDUSER_TO_GROUP=y
CONFIG_DELUSER=y
CONFIG_DELGROUP=y
CONFIG_FEATURE_DEL_USER_FROM_GROUP=y
CONFIG_GETTY=y
CONFIG_LOGIN=y
# CONFIG_LOGIN_SESSION_AS_CHILD is not set
# CONFIG_LOGIN_SCRIPTS is not set
CONFIG_FEATURE_NOLOGIN=y
# CONFIG_FEATURE_SECURETTY is not set
CONFIG_PASSWD=y
# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
CONFIG_CRYPTPW=y
CONFIG_CHPASSWD=y
CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="des"
CONFIG_SU=y
CONFIG_FEATURE_SU_SYSLOG=y
# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set
CONFIG_SULOGIN=y
CONFIG_VLOCK=y

#
# Linux Ext2 FS Progs
#
# CONFIG_CHATTR is not set
CONFIG_FSCK=y
# CONFIG_LSATTR is not set
CONFIG_TUNE2FS=y

#
# Linux Module Utilities
#
CONFIG_MODINFO=y
# CONFIG_MODPROBE_SMALL is not set
# CONFIG_FEATURE_MODPROBE_SMALL_OPTIONS_ON_CMDLINE is not set
# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set
CONFIG_INSMOD=y
CONFIG_RMMOD=y
CONFIG_LSMOD=y
CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT=y
CONFIG_MODPROBE=y
CONFIG_FEATURE_MODPROBE_BLACKLIST=y
CONFIG_DEPMOD=y

#
# Options common to multiple modutils
#
# CONFIG_FEATURE_2_4_MODULES is not set
# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set
# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set
# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set
# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set
CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
CONFIG_FEATURE_MODUTILS_ALIAS=y
CONFIG_FEATURE_MODUTILS_SYMBOLS=y
CONFIG_DEFAULT_MODULES_DIR="/lib/modules"
CONFIG_DEFAULT_DEPMOD_FILE="modules.dep"

#
# Linux System Utilities
#
CONFIG_BLOCKDEV=y
CONFIG_FATATTR=y
CONFIG_FSTRIM=y
CONFIG_GUESS_FSTYPE=y
CONFIG_MDEV=y
CONFIG_FEATURE_MDEV_CONF=y
CONFIG_FEATURE_MDEV_RENAME=y
CONFIG_FEATURE_MDEV_RENAME_REGEXP=y
CONFIG_FEATURE_MDEV_EXEC=y
CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y
CONFIG_MOUNT=y
CONFIG_FEATURE_MOUNT_FAKE=y
CONFIG_FEATURE_MOUNT_VERBOSE=y
# CONFIG_FEATURE_MOUNT_HELPERS is not set
CONFIG_FEATURE_MOUNT_LABEL=y
# CONFIG_FEATURE_MOUNT_NFS is not set
CONFIG_FEATURE_MOUNT_CIFS=y
CONFIG_FEATURE_MOUNT_FLAGS=y
CONFIG_FEATURE_MOUNT_FSTAB=y
CONFIG_FEATURE_MOUNT_OTHERTAB=y
CONFIG_REV=y
CONFIG_UEVENT=y
CONFIG_ACPID=y
CONFIG_FEATURE_ACPID_COMPAT=y
CONFIG_BLKID=y
CONFIG_FEATURE_BLKID_TYPE=y
CONFIG_DMESG=y
CONFIG_FEATURE_DMESG_PRETTY=y
CONFIG_FBSET=y
CONFIG_FEATURE_FBSET_FANCY=y
CONFIG_FEATURE_FBSET_READMODE=y
CONFIG_FDFLUSH=y
CONFIG_FDFORMAT=y
CONFIG_FDISK=y
# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set
CONFIG_FEATURE_FDISK_WRITABLE=y
CONFIG_FEATURE_AIX_LABEL=y
CONFIG_FEATURE_SGI_LABEL=y
CONFIG_FEATURE_SUN_LABEL=y
CONFIG_FEATURE_OSF_LABEL=y
CONFIG_FEATURE_GPT_LABEL=y
CONFIG_FEATURE_FDISK_ADVANCED=y
CONFIG_FINDFS=y
CONFIG_FLOCK=y
CONFIG_FREERAMDISK=y
# CONFIG_FSCK_MINIX is not set
CONFIG_MKFS_EXT2=y
# CONFIG_MKFS_MINIX is not set
# CONFIG_FEATURE_MINIX2 is not set
CONFIG_MKFS_REISER=y
CONFIG_MKFS_VFAT=y
CONFIG_GETOPT=y
CONFIG_FEATURE_GETOPT_LONG=y
CONFIG_HEXDUMP=y
CONFIG_FEATURE_HEXDUMP_REVERSE=y
CONFIG_HD=y
CONFIG_HWCLOCK=y
CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y
# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set
# CONFIG_IPCRM is not set
# CONFIG_IPCS is not set
CONFIG_LOSETUP=y
CONFIG_LSPCI=y
CONFIG_LSUSB=y
CONFIG_MKSWAP=y
CONFIG_FEATURE_MKSWAP_UUID=y
CONFIG_MORE=y
CONFIG_PIVOT_ROOT=y
CONFIG_RDATE=y
CONFIG_RDEV=y
# CONFIG_READPROFILE is not set
CONFIG_RTCWAKE=y
# CONFIG_SCRIPT is not set
# CONFIG_SCRIPTREPLAY is not set
CONFIG_SETARCH=y
CONFIG_SWAPONOFF=y
CONFIG_FEATURE_SWAPON_DISCARD=y
CONFIG_FEATURE_SWAPON_PRI=y
CONFIG_SWITCH_ROOT=y
CONFIG_UMOUNT=y
CONFIG_FEATURE_UMOUNT_ALL=y

#
# Common options for mount/umount
#
CONFIG_FEATURE_MOUNT_LOOP=y
CONFIG_FEATURE_MOUNT_LOOP_CREATE=y
# CONFIG_FEATURE_MTAB_SUPPORT is not set
CONFIG_VOLUMEID=y

#
# Filesystem/Volume identification
#
CONFIG_FEATURE_VOLUMEID_BTRFS=y
CONFIG_FEATURE_VOLUMEID_CRAMFS=y
CONFIG_FEATURE_VOLUMEID_EXFAT=y
CONFIG_FEATURE_VOLUMEID_EXT=y
CONFIG_FEATURE_VOLUMEID_F2FS=y
CONFIG_FEATURE_VOLUMEID_FAT=y
CONFIG_FEATURE_VOLUMEID_HFS=y
CONFIG_FEATURE_VOLUMEID_ISO9660=y
CONFIG_FEATURE_VOLUMEID_JFS=y
CONFIG_FEATURE_VOLUMEID_LINUXRAID=y
CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y
CONFIG_FEATURE_VOLUMEID_LUKS=y
CONFIG_FEATURE_VOLUMEID_NILFS=y
CONFIG_FEATURE_VOLUMEID_NTFS=y
CONFIG_FEATURE_VOLUMEID_OCFS2=y
CONFIG_FEATURE_VOLUMEID_REISERFS=y
CONFIG_FEATURE_VOLUMEID_ROMFS=y
CONFIG_FEATURE_VOLUMEID_SQUASHFS=y
CONFIG_FEATURE_VOLUMEID_SYSV=y
CONFIG_FEATURE_VOLUMEID_UDF=y
CONFIG_FEATURE_VOLUMEID_XFS=y

#
# Miscellaneous Utilities
#
# CONFIG_CONSPY is not set
CONFIG_CROND=y
CONFIG_FEATURE_CROND_D=y
# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
CONFIG_FEATURE_CROND_DIR="/var/spool/cron"
CONFIG_I2CGET=y
CONFIG_I2CSET=y
CONFIG_I2CDUMP=y
CONFIG_I2CDETECT=y
CONFIG_LESS=y
CONFIG_FEATURE_LESS_MAXLINES=9999999
CONFIG_FEATURE_LESS_BRACKETS=y
CONFIG_FEATURE_LESS_FLAGS=y
CONFIG_FEATURE_LESS_TRUNCATE=y
CONFIG_FEATURE_LESS_MARKS=y
CONFIG_FEATURE_LESS_REGEXP=y
CONFIG_FEATURE_LESS_WINCH=y
CONFIG_FEATURE_LESS_ASK_TERMINAL=y
CONFIG_FEATURE_LESS_DASHCMD=y
CONFIG_FEATURE_LESS_LINENUMS=y
# CONFIG_NANDWRITE is not set
# CONFIG_NANDDUMP is not set
CONFIG_RFKILL=y
CONFIG_SETSERIAL=y
# CONFIG_TASKSET is not set
# CONFIG_FEATURE_TASKSET_FANCY is not set
# CONFIG_UBIATTACH is not set
# CONFIG_UBIDETACH is not set
# CONFIG_UBIMKVOL is not set
# CONFIG_UBIRMVOL is not set
# CONFIG_UBIRSVOL is not set
# CONFIG_UBIUPDATEVOL is not set
# CONFIG_WALL is not set
# CONFIG_ADJTIMEX is not set
CONFIG_BBCONFIG=y
# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set
CONFIG_BEEP=y
CONFIG_FEATURE_BEEP_FREQ=4000
CONFIG_FEATURE_BEEP_LENGTH_MS=300
# CONFIG_CHAT is not set
# CONFIG_FEATURE_CHAT_NOFAIL is not set
# CONFIG_FEATURE_CHAT_TTY_HIFI is not set
# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set
# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set
# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set
# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set
# CONFIG_FEATURE_CHAT_CLR_ABORT is not set
# CONFIG_CHRT is not set
CONFIG_CRONTAB=y
CONFIG_DC=y
# CONFIG_FEATURE_DC_LIBM is not set
# CONFIG_DEVFSD is not set
# CONFIG_DEVFSD_MODLOAD is not set
# CONFIG_DEVFSD_FG_NP is not set
# CONFIG_DEVFSD_VERBOSE is not set
# CONFIG_FEATURE_DEVFS is not set
CONFIG_DEVMEM=y
CONFIG_EJECT=y
CONFIG_FEATURE_EJECT_SCSI=y
CONFIG_FBSPLASH=y
CONFIG_FLASHCP=y
CONFIG_FLASH_LOCK=y
CONFIG_FLASH_UNLOCK=y
CONFIG_FLASH_ERASEALL=y
CONFIG_IONICE=y
CONFIG_INOTIFYD=y
# CONFIG_LAST is not set
# CONFIG_FEATURE_LAST_SMALL is not set
# CONFIG_FEATURE_LAST_FANCY is not set
CONFIG_HDPARM=y
CONFIG_FEATURE_HDPARM_GET_IDENTITY=y
# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set
# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set
# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set
# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set
CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA=y
CONFIG_MAKEDEVS=y
# CONFIG_FEATURE_MAKEDEVS_LEAF is not set
CONFIG_FEATURE_MAKEDEVS_TABLE=y
CONFIG_MAN=y
CONFIG_MICROCOM=y
CONFIG_MOUNTPOINT=y
# CONFIG_MT is not set
# CONFIG_RAIDAUTORUN is not set
CONFIG_READAHEAD=y
# CONFIG_RUNLEVEL is not set
# CONFIG_RX is not set
# CONFIG_SETSID is not set
CONFIG_STRINGS=y
CONFIG_TIME=y
CONFIG_TIMEOUT=y
CONFIG_TTYSIZE=y
CONFIG_VOLNAME=y
# CONFIG_WATCHDOG is not set

#
# Networking Utilities
#
CONFIG_NAMEIF=y
CONFIG_FEATURE_NAMEIF_EXTENDED=y
# CONFIG_NBDCLIENT is not set
CONFIG_NC=y
CONFIG_NC_SERVER=y
CONFIG_NC_EXTRA=y
# CONFIG_NC_110_COMPAT is not set
CONFIG_PING=y
CONFIG_PING6=y
CONFIG_FEATURE_FANCY_PING=y
CONFIG_WGET=y
CONFIG_FEATURE_WGET_STATUSBAR=y
CONFIG_FEATURE_WGET_AUTHENTICATION=y
CONFIG_FEATURE_WGET_LONG_OPTIONS=y
CONFIG_FEATURE_WGET_TIMEOUT=y
CONFIG_FEATURE_WGET_OPENSSL=y
CONFIG_FEATURE_WGET_SSL_HELPER=y
# CONFIG_WHOIS is not set
CONFIG_FEATURE_IPV6=y
# CONFIG_FEATURE_UNIX_LOCAL is not set
CONFIG_FEATURE_PREFER_IPV4_ADDRESS=y
# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
# CONFIG_ARP is not set
# CONFIG_ARPING is not set
# CONFIG_BRCTL is not set
# CONFIG_FEATURE_BRCTL_FANCY is not set
# CONFIG_FEATURE_BRCTL_SHOW is not set
# CONFIG_DNSD is not set
# CONFIG_ETHER_WAKE is not set
# CONFIG_FAKEIDENTD is not set
# CONFIG_FTPD is not set
# CONFIG_FEATURE_FTP_WRITE is not set
# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set
# CONFIG_FEATURE_FTP_AUTHENTICATION is not set
CONFIG_FTPGET=y
CONFIG_FTPPUT=y
CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=y
CONFIG_HOSTNAME=y
CONFIG_HTTPD=y
CONFIG_FEATURE_HTTPD_RANGES=y
CONFIG_FEATURE_HTTPD_SETUID=y
CONFIG_FEATURE_HTTPD_BASIC_AUTH=y
CONFIG_FEATURE_HTTPD_AUTH_MD5=y
CONFIG_FEATURE_HTTPD_CGI=y
CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR=y
CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV=y
CONFIG_FEATURE_HTTPD_ENCODE_URL_STR=y
CONFIG_FEATURE_HTTPD_ERROR_PAGES=y
CONFIG_FEATURE_HTTPD_PROXY=y
CONFIG_FEATURE_HTTPD_GZIP=y
CONFIG_IFCONFIG=y
CONFIG_FEATURE_IFCONFIG_STATUS=y
CONFIG_FEATURE_IFCONFIG_SLIP=y
CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ=y
CONFIG_FEATURE_IFCONFIG_HW=y
CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y
# CONFIG_IFENSLAVE is not set
CONFIG_IFPLUGD=y
CONFIG_IFUPDOWN=y
CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
CONFIG_FEATURE_IFUPDOWN_IP=y
CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y
# CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN is not set
CONFIG_FEATURE_IFUPDOWN_IPV4=y
CONFIG_FEATURE_IFUPDOWN_IPV6=y
CONFIG_FEATURE_IFUPDOWN_MAPPING=y
CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP=y
# CONFIG_INETD is not set
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set
# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set
# CONFIG_FEATURE_INETD_RPC is not set
CONFIG_IP=y
CONFIG_FEATURE_IP_ADDRESS=y
CONFIG_FEATURE_IP_LINK=y
CONFIG_FEATURE_IP_ROUTE=y
CONFIG_FEATURE_IP_ROUTE_DIR="/etc/iproute2"
CONFIG_FEATURE_IP_TUNNEL=y
CONFIG_FEATURE_IP_RULE=y
CONFIG_FEATURE_IP_SHORT_FORMS=y
# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set
CONFIG_IPADDR=y
CONFIG_IPLINK=y
CONFIG_IPROUTE=y
CONFIG_IPTUNNEL=y
CONFIG_IPRULE=y
CONFIG_IPCALC=y
CONFIG_FEATURE_IPCALC_FANCY=y
CONFIG_FEATURE_IPCALC_LONG_OPTIONS=y
CONFIG_NETSTAT=y
CONFIG_FEATURE_NETSTAT_WIDE=y
CONFIG_FEATURE_NETSTAT_PRG=y
CONFIG_NSLOOKUP=y
# CONFIG_NTPD is not set
# CONFIG_FEATURE_NTPD_SERVER is not set
# CONFIG_FEATURE_NTPD_CONF is not set
CONFIG_PSCAN=y
CONFIG_ROUTE=y
# CONFIG_SLATTACH is not set
# CONFIG_TCPSVD is not set
CONFIG_TELNET=y
CONFIG_FEATURE_TELNET_TTYPE=y
CONFIG_FEATURE_TELNET_AUTOLOGIN=y
# CONFIG_TELNETD is not set
# CONFIG_FEATURE_TELNETD_STANDALONE is not set
# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set
CONFIG_TFTP=y
# CONFIG_TFTPD is not set

#
# Common options for tftp/tftpd
#
CONFIG_FEATURE_TFTP_GET=y
CONFIG_FEATURE_TFTP_PUT=y
CONFIG_FEATURE_TFTP_BLOCKSIZE=y
CONFIG_FEATURE_TFTP_PROGRESS_BAR=y
# CONFIG_TFTP_DEBUG is not set
CONFIG_TRACEROUTE=y
CONFIG_TRACEROUTE6=y
CONFIG_FEATURE_TRACEROUTE_VERBOSE=y
CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE=y
CONFIG_FEATURE_TRACEROUTE_USE_ICMP=y
# CONFIG_TUNCTL is not set
# CONFIG_FEATURE_TUNCTL_UG is not set
# CONFIG_UDHCPC6 is not set
CONFIG_UDHCPD=y
CONFIG_DHCPRELAY=y
CONFIG_DUMPLEASES=y
CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY=y
# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set
CONFIG_DHCPD_LEASES_FILE="/var/lib/misc/udhcpd.leases"
CONFIG_UDHCPC=y
CONFIG_FEATURE_UDHCPC_ARPING=y
CONFIG_FEATURE_UDHCPC_SANITIZEOPT=y
CONFIG_FEATURE_UDHCP_PORT=y
CONFIG_UDHCP_DEBUG=0
CONFIG_FEATURE_UDHCP_RFC3397=y
CONFIG_FEATURE_UDHCP_8021Q=y
CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="-R -n"
# CONFIG_UDPSVD is not set
# CONFIG_VCONFIG is not set
# CONFIG_ZCIP is not set

#
# Print Utilities
#
# CONFIG_LPD is not set
# CONFIG_LPR is not set
# CONFIG_LPQ is not set

#
# Mail Utilities
#
# CONFIG_MAKEMIME is not set
CONFIG_FEATURE_MIME_CHARSET=""
# CONFIG_POPMAILDIR is not set
# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set
# CONFIG_REFORMIME is not set
# CONFIG_FEATURE_REFORMIME_COMPAT is not set
# CONFIG_SENDMAIL is not set

#
# Process Utilities
#
CONFIG_IOSTAT=y
CONFIG_LSOF=y
CONFIG_MPSTAT=y
# CONFIG_NMETER is not set
CONFIG_PMAP=y
CONFIG_POWERTOP=y
CONFIG_PSTREE=y
CONFIG_PWDX=y
# CONFIG_SMEMCAP is not set
CONFIG_TOP=y
CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
CONFIG_FEATURE_TOP_SMP_CPU=y
# CONFIG_FEATURE_TOP_DECIMALS is not set
CONFIG_FEATURE_TOP_SMP_PROCESS=y
CONFIG_FEATURE_TOPMEM=y
CONFIG_UPTIME=y
# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set
CONFIG_FREE=y
CONFIG_FUSER=y
CONFIG_KILL=y
CONFIG_KILLALL=y
# CONFIG_KILLALL5 is not set
CONFIG_PGREP=y
CONFIG_PIDOF=y
CONFIG_FEATURE_PIDOF_SINGLE=y
CONFIG_FEATURE_PIDOF_OMIT=y
CONFIG_PKILL=y
CONFIG_PS=y
# CONFIG_FEATURE_PS_WIDE is not set
# CONFIG_FEATURE_PS_LONG is not set
CONFIG_FEATURE_PS_TIME=y
CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS=y
# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
CONFIG_RENICE=y
CONFIG_BB_SYSCTL=y
CONFIG_FEATURE_SHOW_THREADS=y
CONFIG_WATCH=y

#
# Runit Utilities
#
# CONFIG_RUNSV is not set
# CONFIG_RUNSVDIR is not set
# CONFIG_FEATURE_RUNSVDIR_LOG is not set
# CONFIG_SV is not set
CONFIG_SV_DEFAULT_SERVICE_DIR=""
# CONFIG_SVLOGD is not set
# CONFIG_CHPST is not set
# CONFIG_SETUIDGID is not set
# CONFIG_ENVUIDGID is not set
# CONFIG_ENVDIR is not set
# CONFIG_SOFTLIMIT is not set
# CONFIG_CHCON is not set
# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set
# CONFIG_GETENFORCE is not set
# CONFIG_GETSEBOOL is not set
# CONFIG_LOAD_POLICY is not set
# CONFIG_MATCHPATHCON is not set
# CONFIG_RESTORECON is not set
# CONFIG_RUNCON is not set
# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set
# CONFIG_SELINUXENABLED is not set
# CONFIG_SETENFORCE is not set
# CONFIG_SETFILES is not set
# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set
# CONFIG_SETSEBOOL is not set
# CONFIG_SESTATUS is not set

#
# Shells
#
CONFIG_ASH=y
CONFIG_ASH_BASH_COMPAT=y
# CONFIG_ASH_IDLE_TIMEOUT is not set
CONFIG_ASH_JOB_CONTROL=y
CONFIG_ASH_ALIAS=y
CONFIG_ASH_GETOPTS=y
CONFIG_ASH_BUILTIN_ECHO=y
CONFIG_ASH_BUILTIN_PRINTF=y
CONFIG_ASH_BUILTIN_TEST=y
CONFIG_ASH_HELP=y
CONFIG_ASH_CMDCMD=y
# CONFIG_ASH_MAIL is not set
CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
CONFIG_ASH_RANDOM_SUPPORT=y
CONFIG_ASH_EXPAND_PRMT=y
# CONFIG_CTTYHACK is not set
# CONFIG_HUSH is not set
# CONFIG_HUSH_BASH_COMPAT is not set
# CONFIG_HUSH_BRACE_EXPANSION is not set
# CONFIG_HUSH_HELP is not set
# CONFIG_HUSH_INTERACTIVE is not set
# CONFIG_HUSH_SAVEHISTORY is not set
# CONFIG_HUSH_JOB is not set
# CONFIG_HUSH_TICK is not set
# CONFIG_HUSH_IF is not set
# CONFIG_HUSH_LOOPS is not set
# CONFIG_HUSH_CASE is not set
# CONFIG_HUSH_FUNCTIONS is not set
# CONFIG_HUSH_LOCAL is not set
# CONFIG_HUSH_RANDOM_SUPPORT is not set
# CONFIG_HUSH_EXPORT_N is not set
# CONFIG_HUSH_MODE_X is not set
# CONFIG_MSH is not set
CONFIG_FEATURE_SH_IS_ASH=y
# CONFIG_FEATURE_SH_IS_HUSH is not set
# CONFIG_FEATURE_SH_IS_NONE is not set
# CONFIG_FEATURE_BASH_IS_ASH is not set
# CONFIG_FEATURE_BASH_IS_HUSH is not set
CONFIG_FEATURE_BASH_IS_NONE=y
CONFIG_SH_MATH_SUPPORT=y
CONFIG_SH_MATH_SUPPORT_64=y
CONFIG_FEATURE_SH_EXTRA_QUIET=y
# CONFIG_FEATURE_SH_STANDALONE is not set
# CONFIG_FEATURE_SH_NOFORK is not set
CONFIG_FEATURE_SH_HISTFILESIZE=y

#
# System Logging Utilities
#
CONFIG_SYSLOGD=y
CONFIG_FEATURE_ROTATE_LOGFILE=y
# CONFIG_FEATURE_REMOTE_LOG is not set
CONFIG_FEATURE_SYSLOGD_DUP=y
# CONFIG_FEATURE_SYSLOGD_CFG is not set
CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=256
CONFIG_FEATURE_IPC_SYSLOG=y
CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16
CONFIG_LOGREAD=y
# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set
CONFIG_FEATURE_KMSG_SYSLOG=y
CONFIG_KLOGD=y

#
# klogd should not be used together with syslog to kernel printk buffer
#
CONFIG_FEATURE_KLOGD_KLOGCTL=y
CONFIG_LOGGER=y
EOFMKR

make V=1 \
 CFLAGS_busybox="-Wl,-z,muldefs -Werror-implicit-function-declaration" \
 -j$MAKE_THREADS || exit 1

#installs to _install in source...
make install

#replace previous...
cp -a -f _install/bin/busybox "$R"/opt/busybox/bin/

NEWAPPLETS=" `find _install -type l | rev | cut -f 1 -d '/' | rev | tr '\n' ' ' | tr -d '['` "

#remove invalid applets...
for OLDAPPLET in `find "$R"/opt/busybox/bin -maxdepth 1 -type l | rev | cut -f 1 -d '/' | rev | tr '\n' ' ' | tr -d '['`
do
 [ "$(echo -n "$NEWAPPLETS" | grep " ${OLDAPPLET} ")" != "" ] && continue
 rm -f "$R"/opt/busybox/bin/$OLDAPPLET
 rm -f "$R"/bin/$OLDAPPLET
done

#add new applets...
for AAPPLET in ${NEWAPPLETS}
do
 [ -e "$R"/opt/busybox/bin/${AAPPLET} ] && continue
 echo '#!/bin/busybox' > "$R"/opt/busybox/bin/${AAPPLET}
 chmod 755 "$R"/opt/busybox/bin/${AAPPLET}
 ln -snf ../opt/busybox/bin/${AAPPLET} "$R"/bin/${AAPPLET}
done

exit 0

path: pkg/quirky-busybox


code:
[deps]
gperf
eudev
libusb
libusb-compat
libatomic-ops
disktype
pciutils
gnu-efi-libs
nasm
yasm
syslinux6
sysfsutils
attr
libcap2
libpng
libjpeg
libtiff
jbig2dec
freetype
groff
alsa-lib
alsa-utils
fontconfig
dialog
dhcpcd
popt
libnl-tiny
libpcap
apr
rsync
sqlite
libarchive
cmake
apr-util
perl5-XML-Parser
intltool
hunspell
cups
libdaemon
ifplugd
ifplugd-old
liblcms
lcms2
usbutils
docbook-xsl
docbook-xml
xmlto
xdelta3
fuse
libgpg-error
libgcrypt
ntfs-3g
scons
serf
fribidi
wireless-tools
cdrtools
dvd+rw-tools
ppp
sysvinit-utils-cut
gptfdisk
f2fs-tools
ethtool
iptables
openssh
tzcode
tzdata
vala
usb-modeswitch-data
usb-modeswitch
mingetty
swig
svn
libdevmapper
parted
mirdir
bcrypt
puppyinputdetect
puppyserialdetect
dvd-close
cddetect
cddetect-quick
bbc-provided
modem-stats
inotify-tools
dosfstools
unrar
mp
wpa-supplicant
915resolution
xresprobe
lynx
htop
mc
vim

path: pkg/quirky-cli


code:
[deps]
quirky-customize
libatomic-ops
pkgconf
curses
coreutils
util-linux
e2fsprogs
libressl
ca-certificates
perl
autoconf
automake
gzip
cpio
flex
libtool
libedit
readline
expat
libiconv
texinfo
gettext
file
libffi
findutils
diffutils
xz
bzip2
grep
sed
tar
gawk
python
libxml2
libxslt
kmod
bc
pcre
glib
unzip
zip
curl
bash
woofs

path: pkg/quirky-core


code:
[deps]
kernel

[build]
#note, aufs-utils is kernel-version-sensitive.
#took out aufs-utils, as build broken.


code:
[build]
#want to leave the sabotage-linux/sabotage repository intact.
#changes for building binary packages for Quirky Linux, where they
#conflict with main repo, are kept separate. This includes alternative
#recipes named with "qky-" prefix, for example "pkg/qky-e2fsprogs".

#20160509
#a better way to handle my qky-* pkgs
QKYPKGS="$(find "$K"/../pkg -maxdepth 1 -type f -name 'qky-*' | rev | cut -f 1 -d '/' | rev | tr '\n' ' ')"
for AQKY in $QKYPKGS
do
 ANAME="$(echo -n "$AQKY" | cut -f 2- -d '-')"
 mv -f "$K"/../pkg/${AQKY} "$K"/../pkg/${ANAME} #ex: qky-e2fsprogs to e2fsprogs
done

#as quirky is building libblkid and libuuid in util-linux (actually qky-util-linux),
#need to modify pkg/libuuid and pkg/libblkid, but have to do this at build-time...
echo '[deps]
util-linux' > "$K"/../pkg/libuuid
echo '[deps]
util-linux' > "$K"/../pkg/libblkid

#20160508
#i have 'libiconv', sabotage already has 'iconv'. take care for any recipe with 'iconv' dep...
echo '[deps]
libiconv' > "$K"/../pkg/iconv

#20160509
#i have libusb (and libusb-compat). libusbx is a defunct project
echo '[deps]
libusb' > "$K"/../pkg/libusbx

#20160513
#frustration trying to compile netpbm with libpng 1.5.x. major distros ubuntu/debian have stayed with 1.2.x...
echo '[deps]
libpng12' > "$K"/../pkg/libpng

#20160515
#just want normal empty...
echo '[deps]
hicolor-icon-theme' > "$K"/../pkg/hicolor-icon-theme-fake

exit 0

path: pkg/quirky-customize


code:
[deps]
util-macros
libpthread-stubs
libpciaccess
bigreqsproto
compositeproto
damageproto
dmxproto
dri2proto
dri3proto
fixesproto
fontsproto
glproto
inputproto
kbproto
presentproto
randrproto
recordproto
renderproto
resourceproto
scrnsaverproto
videoproto
pixman
xcmiscproto
xextproto
xf86bigfontproto
xf86dgaproto
xf86driproto
xf86vidmodeproto
xineramaproto
xproto
xtrans
libxau
xcb-proto
libxcb
libxdmcp
libx11
libxext
xcb-util
libice
libsm
libxt
libxmu
libxpm
libxaw
libxfixes
libxcomposite
libxrender
libxdamage
libxcursor
libxfont
libxft
libxi
libxinerama
libxkbfile
libxrandr
libxres
libxscrnsaver
libxtst
libxv
libxvmc
libxxf86dga
libxxf86vm
libdrm
libxshmfence
mesalib
xbitmaps
xauth
xclock
xinit
xkbcomp
xmodmap
xprop
xrandr
xrdb
xset
xsetroot
xwininfo
xload
xmessage
giflib
xkeyboard-config
ijs
cairo
harfbuzz
pango
libfs
libdmx
xorg-server
xf86-input-evdev
xf86-input-joystick
xf86-input-keyboard
xf86-input-mouse
mtdev
xf86-input-synaptics
xf86-video-ati
xf86-video-cirrus
xf86-video-intel
xf86-video-modesetting
xf86-video-nouveau
xf86-video-nv
xf86-video-vesa
bdftopcf
font-util
libfontenc
mkfontscale
mkfontdir
x11-font-dejavu
x11-font-misc
atk
gdk-pixbuf
gtk+2
libcroco
librsvg
poppler
urxvt
x264
x265
ghostscript
xvid
qpdf
cups-filters
gutenprint
gettext-gnu
jwm
xclip
bacon
ucl
upx
setvol
shared-mime-info
gnome-menus
xdg-puppy
xcursorgen
xcur2png
xgamma
network-tray
powerapplet-tray
freememapplet-tray
retrovol
minixcal
numlockx
unclutter
hicolor-icon-theme
gif2lss
gifsicle
xarchive
gtkdialog
xdialog
rox-filer
glipper-lite
pup-tools
geany
netpbm
libevent
icu
libogg
libvorbis
libvpx
firefox

path: pkg/quirky-desktop


code:
[deps]
jobflow
sabotage-core
kbd
9base
busybox
gcc4
gmp
mpc
mpfr
musl
dynamic-toolchain
man
zlib
binutils
patch

[build]
if [ -d "$butch_root_dir""$butch_staging_dir"/stage0 ] ; then
	rm -rf "$butch_root_dir""$butch_staging_dir"/gcc3
	rm -rf "$butch_root_dir""$butch_staging_dir"/stage0-musl
	rm -rf "$butch_root_dir""$butch_staging_dir"/stage0

	butch unlink gcc3
	butch relink $(ls -d "$butch_root_dir""$butch_staging_dir"/gcc4* |awk -F/ '{print $NF}' |tail -n1)
fi

rm -rf "$butch_root_dir""$butch_staging_dir"/stage1


code:
[mirrors]
http://rada.re/get/radare2-0.10.2.tar.xz

[vars]
filesize=5055040
sha512=437e8fcef7429e294a199030b6cc4401b824262211d512f69b8718d41ff5aa270868e812ecaf6fe22d5fbb14715e7e89d7a13d16a70d68e0bd37e582327ac4f7

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"

LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \
  ./configure -C --prefix="$butch_prefix" $xconfflags

#[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir"
# https://github.com/radare/radare2/issues/4056
unset DEPS

make V=1 -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install


code:
[deps]
util-macros

[vars]
filesize=133300
sha512=7880360e0f63a9bf88bc4ea76160311ba1d64af30414068df90d6b613b5cc24c2cc7986f2e68ee9a2fcde1359108da25017dd32885b09e878406e66aefe06f0d

[mirrors]
ftp://ftp.x.org/pub/individual/proto/randrproto-1.4.0.tar.bz2

[build]
[ -n "$CROSS_COMPILE" ] && xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/')"
CFLAGS="$optcflags" LDFLAGS="$optldflags" \
./configure -C --prefix="$butch_prefix" $xconfflags
make DESTDIR="$butch_install_dir" -j$MAKE_THREADS install

path: pkg/randrproto


code:
[mirrors]
http://downloads.sourceforge.net/re2c/re2c-0.14.3.tar.gz

[vars]
filesize=2576859
sha512=c1fa20c9c1e69d085415dde3177cb03688f8a9314dd4854241812f479a2b1e4306c3abbb8f9f31763918afbd1f7a821e7337551a898f6ae57f814c66e59e2382

[deps.host]
dynamic-toolchain

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"

CFLAGS="-D_GNU_SOURCE $optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
  ./configure -C --prefix="$butch_prefix" $xconfflags

make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install


code:
[deps]
libedit

path: pkg/readline


code:
[mirrors]
https://github.com/t6x/reaver-wps-fork-t6x/archive/4032b98.tar.gz

[vars]
filesize=710570
sha512=f80ba153a38d66f769901a59bb148b9dc9595e6936d9d228886e6e0aca8df1ed2963fedb47c9c8d75564efc09ef4e715fd6df2e2c2eb72c570e81d5d9ef49f7e
tarball=reaver_t6x-1.52.4032b98.tar.gz
tardir=reaver-wps-fork-t6x-4032b98216446fcd1c94a2f46d96d15b234baddf
desc='cracking tool for WIFI routers with WPS feature'

[deps]
libpcap
sqlite

[build]
patch -p1 < "$K"/reaver_u_char.patch
patch -p1 < "$K"/reaver_DESTDIR.patch

cd src
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"

CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
  ./configure -C --prefix="$butch_prefix" $xconfflags

make V=1 CC="$CC" -j$MAKE_THREADS CONFDIR="$butch_prefix"/var/lib
make DESTDIR="$butch_install_dir" CONFDIR="$butch_prefix"/var/lib install \

path: pkg/reaver


code:
[deps]
util-macros

[vars]
filesize=123033
sha512=ab82d966ffacb46c001df15b272ca58f996826dc6f6835d3dc4d385b31c682acacb073a380d61938e2f242bffdabdd9b8f7107cd5ac67cb7aa3a28cc14a8ea02

[mirrors]
http://xorg.freedesktop.org/releases/individual/proto/recordproto-1.14.2.tar.bz2

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/')"
CFLAGS="$optcflags" LDFLAGS="$optldflags" \
  ./configure -C --prefix="$butch_prefix" $xconfflags
make DESTDIR="$butch_install_dir" install

path: pkg/recordproto


code:
[mirrors]
http://download.redis.io/releases/redis-3.0.7.tar.gz

[vars]
filesize=1375200
sha512=6c8f4c88d911e1433fd28efff2f6d62763e08be89814ebf4aa4e68e2c8bd605eba24ca3410548b2f480ae094437ce96c0bafa7a5762b3b405d5d850886297ba3

[deps]

[build]

# patch is from arch linux
patch -p1 < "$K"/redis-sane-defaults.patch
sed -i "s@ar rcs@""$CROSS_COMPILE""ar rcs@" deps/hiredis/Makefile
sed -i 's@CC:=.*$@@' deps/hiredis/Makefile
# MALLOC=libc: use musl malloc instead of jemalloc. This might be bad for performance though,
# if that is important to you, you should make benchmarks (and share them)!
make MALLOC=libc LDFLAGS="$optldflags" CFLAGS="$optcflags" V=1 -j$MAKE_THREADS \
  AR="$CROSS_COMPILE""ar"

make PREFIX="$butch_install_dir" install
install -Dm400 redis.conf "$butch_install_dir"/etc/redis.conf

# install the service
IS="$K"/bin/butch-install-service
"$IS" --down --log --force redis "$K"/services/redis

path: pkg/redis


code:
[mirrors]
http://downloads.sourceforge.net/project/bashdb/remake/3.82+dbg-0.9/remake-3.82+dbg0.9.tar.bz2

[vars]
filesize=1152677
sha512=94682e9d0317088456dac683d67be320fe10bb06a3384969fafefe091558b215105ba3c96a7c1d4e0d970ea2dc5c4f535a704256fe7a4eaa87bec11d78d074cf
desc='fork of GNU make with integrated debugger'

[deps]
kernel-headers

[build]
[ "$STAGE" = "0" ] && CC="$butch_root_dir"/bin/musl-gcc
#patch -p1 < "$K"/make-3.82-upstream_fixes-3.patch
CC="$CC -static" ./configure -C --prefix="$butch_prefix" --disable-nls
# __BEOS__ to use a shipped ar.h
make -j$MAKE_THREADS CFLAGS=-D__BEOS__
make DESTDIR="$butch_install_dir" install

path: pkg/remake


code:
[deps]
util-macros

[vars]
filesize=105741
sha512=c38bc7247fd7b89732c892ee41c061b20397f4e79195601b7015dd55054b966f0797ac3990b147f80234596ba2c201ce90e292ecefed2e133167955bca70acc5

[mirrors]
ftp://ftp.x.org/pub/individual/proto/renderproto-0.11.1.tar.bz2

[build]
[ -n "$CROSS_COMPILE" ] && xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/')"
CFLAGS="$optcflags" LDFLAGS="$optldflags" \
  ./configure -C --prefix="$butch_prefix" $xconfflags
make DESTDIR="$butch_install_dir" -j$MAKE_THREADS install

path: pkg/renderproto


code:
[deps]
util-macros

[vars]
filesize=102992
sha512=ce8c8fda178ac7fb22b192d4a0f707a96f42ecd550ae8e6ddd7e1ed0067951ef955f7bee60f63a2b2422176e5f093c38e3903f7c4e5e3bea230b934b7abcc4ca

[mirrors]
ftp://ftp.x.org/pub/individual/proto/resourceproto-1.2.0.tar.bz2

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/')"
CFLAGS="$optcflags" LDFLAGS="$optldflags" \
./configure -C --prefix="$butch_prefix" $xconfflags
make DESTDIR="$butch_install_dir" -j$MAKE_THREADS install

path: pkg/resourceproto


code:
[mirrors]
http://distro.ibiblio.org/quirky/quirky6/sources/t2/april/retrovol-0.13.1.tar.bz2

[vars]
filesize=168137
sha512=03d81cf8907a438f53786059864e1b0f28906cc543db7fd382c44a4aaa201bcae4f88000f6daae783f6c8a21c91e7781a3bb4a72f671f27dd1def8bdcce5d7fa
desc="Retrovol is a volume setting program and mixer. Creates an icon in the tray."

[deps]
gtk+2
gettext-gnu

[build]

CCFLAGS="$optcflags" LDFLAGS="$optldflags" \
  ./configure --prefix="$butch_prefix" $xconfflags
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

dest="$butch_install_dir""$butch_prefix"
mkdir -p "$dest"/share/doc/nls/retrovol
cp -a -f po/retrovol.pot "$dest"/share/doc/nls/retrovol/

#puppy has /root/Startup, changed...
mkdir -p "$dest"/lib/Startup
echo '#!/bin/sh
exec retrovol -hide' > "$dest"/lib/Startup/retrovol_tray
chmod 755 "$dest"/lib/Startup/retrovol_tray

path: pkg/retrovol


code:
[mirrors]
http://distro.ibiblio.org/quirky/quirky6/sources/t2/april/rox-filer-2011-10-22.tar.bz2

[vars]
filesize=1230072
sha512=f2c4feaf22645621114ec14d86c23c2eba64ea6d984059aeb3122ed8c2be15182dad31b29b85030b0185ab9ac78ec74f1131b7ced902eddcded2075ffd5f2618
desc="File manager, also handles desktop."

[deps]
gtk+2

[build]
butch_do_relocate=false

#from T2...
patch -p1 < "$K"/rox-filer-01-Add-explicit-dependency-on-libm-and-libdl.patch
patch -p1 < "$K"/rox-filer-02-Extend-commit-c2232d50-to-Send-to.patch
patch -p1 < "$K"/rox-filer-03-rox-filer-20111022-modify-columns.patch
patch -p1 < "$K"/rox-filer-04-rox-filer-default-settings.patch
patch -p1 < "$K"/rox-filer-05-log-window.patch
patch -p1 < "$K"/rox-filer-06-jwm-menus-fix.patch
patch -p1 < "$K"/rox-filer-07-sendto-to-openwith.patch
patch -p1 < "$K"/rox-filer-08-remove-user-msg.patch

./ROX-Filer/AppRun --compile

dest="$butch_install_dir""$butch_prefix"
install -m755 ROX-Filer/ROX-Filer "$dest"
install -m644 ROX-Filer/AppInfo.xml "$dest"
install -m755 ROX-Filer/AppRun "$dest"
install -m644 ROX-Filer/Options.xml "$dest"
install -m644 ROX-Filer/style.css "$dest"
install -m644 ROX-Filer/subclasses "$dest"
install -m644 ROX-Filer/Templates.ui "$dest"
cp -a -f ROX-Filer/images "$dest"/
cp -a -f ROX-Filer/.DirIcon "$dest"/
cp -a -f ROX-Filer/ROX "$dest"/
cp -a -f ROX-Filer/Help "$dest"/

ln -r -s "$dest"/ROX-Filer "$R"/bin/rox
ln -r -s "$dest"/ROX-Filer "$R"/bin/ROX-Filer

path: pkg/rox-filer


code:
[mirrors]
http://rsync.samba.org/ftp/rsync/rsync-3.1.2.tar.gz

[vars]
filesize=892724
sha512=4c55fd69f436ead0cb5a0b7c6fdfef9bb28ddb9c63534eb619e756b118d5b08cfc5e696498650932c86e865b37e06633da947e6720ca0c27ed5c034313ae208b

[deps]

[build]
# apply patch to remove dependency on perl
# https://lists.samba.org/archive/rsync/2015-November/030439.html
patch -p1 -l < "$K"/rsync-fix-proto.h-tstamp-target.patch
[ -n "$CROSS_COMPILE" ] && xconfflags="--host=$($CC -dumpmachine)"
CFLAGS="-D_GNU_SOURCE $optcflags" LDFLAGS="$optldflags" \
  ./configure -C --prefix="$butch_prefix" $xconfflags
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

path: pkg/rsync


code:
[mirrors]
http://www.rsyslog.com/download/files/download/rsyslog/rsyslog-7.6.6.tar.gz

[vars]
filesize=3027663
sha512=851b5f437e3bad60951d00a7411f787eae5203c640918fc27052801b93eb261e69981d3e05b5cee914b96f3d81b26f00a4542fd68542b2435893893475b2e6b4

[deps]
libressl
libuuid
libestr
liblogging
json-c
gnutls
librelp

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"
patch -p1 < "$K"/rsyslog-fcntl.patch
patch -p1 < "$K"/rsyslog-gnutls.patch
sed -i 's@^extern char \*strdup.*@@' grammar/lexer.c
CPPFLAGS="-DHAVE_GNUTLS_CERTIFICATE_SET_RETRIEVE_FUNCTION -D_GNU_SOURCE" \
CFLAGS="$optcflags" LDFLAGS="$optldflags" \
  ./configure --prefix="$butch_prefix" $xconfflags --sbindir="$butch_prefix"/bin \
              --disable-mysql --disable-pgsql --disable-mail \
              --disable-snmp --disable-imjournal --disable-libgcrypt \
              --disable-omjournal --enable-imfile  \
              --enable-relp --enable-gnutls \
              --disable-generate-man-pages \
              ac_cv_func_malloc_0_nonnull=yes \
              ac_cv_func_realloc_0_nonnull=yes

make -j$MAKE_THREADS V=1
make DESTDIR="$butch_install_dir" install
install -D -m640 "$K"/rsyslog.conf "$butch_install_dir"/"$butch_prefix"/etc/rsyslog.conf

IS="$K"/bin/butch-install-service
"$IS" --down --log --force rsyslog "$K"/services/rsyslog

path: pkg/rsyslog


code:
[mirrors]
http://rtorrent.net/downloads/rtorrent-0.9.6.tar.gz

[vars]
filesize=610845
sha512=704f7b79d5bc78b817da21a6886662a5a97fde210a110c50f708bdc18e1dcf3ef5c5f4e2740261d41221cfc69c19926bf34e10057adf10601da9e6e06b2cef75
desc='bittorrent p2p filesharing client'

[deps]
libtorrent
curses

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"
sed -i 's@-Wl,-syslibroot,@-Wl,-syslibroot=@' configure
# remove broken execinfo.h check
sed -i '15872,15906d' configure
CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
./configure -C --prefix="$butch_prefix" $xconfflags
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install
install -D -m 644 "$K"/rtorrent.1 \
"$butch_install_dir""$butch_prefix"/share/man/man1/rtorrent.1

path: pkg/rtorrent


code:
[mirrors]
http://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.5.tar.xz

[vars]
filesize=10457620
sha512=6da4bdb0a43d56c7a8e4dddbcacf237e998ebb54706c8f835b53713dbdf924e40d5f89f63017515e1d66904ca01f28058cf296567104e06540c57f036dcdd0fe
desc='interpreter for the ruby scripting language'

[deps]
zlib
libressl
gdbm

[build]
# Ruby still uses RAND_egd() (it really shouldn't!).
# Upstream report: https://bugs.ruby-lang.org/issues/10053
# Patch similar to the wget one discussed here:
# https://devsonacid.wordpress.com/2014/07/12/how-compatible-is-libressl/
patch -p1 < "$K"/ruby-libressl.patch

[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine) \
  --with-sysroot=$butch_root_dir --with-baseruby=ruby"
# ruby crosscompile requires ruby installed on the host!

CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
./configure -C $xconfflags \
  stack_protector=no \
  --without-jemalloc \
  --prefix="$butch_prefix" \
  rb_cv_binary_elf=yes \
  --disable-install-doc

 # the elf test is broken, it uses cat -e which is gnu only

make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

path: pkg/ruby


code:
[build]
dest="$butch_install_dir""$butch_prefix"
for i in "$K"/bin/*; do
	install -Dm 755 "$i" "$dest"/bin/$(basename "$i")
done
cp -rf "$K"/share "$dest"

path: pkg/sabotage-core


code:
[mirrors]
http://downloads.sourceforge.net/project/scons/scons/2.3.0/scons-2.3.0.tar.gz

[vars]
filesize=599514
sha512=a7e88bb70b8b269337689fb4afd9563359f6ace37857bbd9824c9e40e43cac8b1e00468d8652bb9b46e410f6b161cb8c9006dd1fd9265756be153846a5e0fd65
desc='build system written in python'

[deps]
python

[build]
[ -z "$butch_prefix" ] && butch_prefix=/
python setup.py install --prefix="$butch_install_dir""$butch_prefix"

path: pkg/scons


code:
[mirrors]
http://ftp.gnu.org/gnu/screen/screen-4.2.1.tar.gz

[vars]
filesize=1062485
sha512=30826b2a2fc436483276b90cc4c6679470f7ccb7098c9bb8457d0e534998cd12da02882cf80678465f6540cade170c3fdc6bdfa31b07359ff0d3ffe2d6063710
desc='terminal multiplexer'

[deps]

[build]
patch -p1 < "$K"/screen-root.patch
patch -p1 < "$K"/screen-configure.patch
patch -p1 < "$K"/screen-chmod.patch

[ -n "$CROSS_COMPILE" ] && xconfflags="--host=$($CC -dumpmachine)"
CFLAGS="-D_GNU_SOURCE $optcflags" LDFLAGS="$optldflags" \
  ./configure -C --prefix="$butch_prefix" \
  --with-sys-screenrc="$butch_prefix"/etc/screenrc $xconfflags

cat << EOF >> config.h
#undef UTMPOK
#undef LOGINDEFAULT
#define LOGINDEFAULT 0
#undef GETUTENT
#undef UTHOST
#undef BUGGYGETLOGIN
#undef SOCKDIR
EOF

make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

path: pkg/screen


code:
[deps]
util-macros

[vars]
filesize=118820
sha512=e74a512a6101967983a1d713d22a1f456f77519998116ef0f0a9e4b44ae4730ecd41eb9c0f7fa53e9f5c94967541daf10693d701af832597f5347461c5990ebc

[mirrors]
http://xorg.freedesktop.org/releases/individual/proto/scrnsaverproto-1.2.2.tar.bz2

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/')"
CFLAGS="$optcflags" LDFLAGS="$optldflags" \
./configure -C --prefix="$butch_prefix" $xconfflags
make DESTDIR="$butch_install_dir" -j$MAKE_THREADS install

path: pkg/scrnsaverproto


code:
[vars]
filesize=74324
sha512=cba8f589e45758ddbfe4e276399a1ecb0dbe29569be5d85d97733e7f64de2911bd2d03e62700ad0c718a1fc886c2e3def9dee1de5cac884f9e65e772cebe838c
desc='capture screenshots of X11 windows'

[mirrors]
http://linuxbrit.co.uk/downloads/scrot-0.8.tar.gz
http://fossies.org/unix/privat/scrot-0.8.tar.gz

[deps]
imlib2
giblib

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"
cat << EOF >> giblib-config
#!/bin/sh
printf "%s" "-lgiblib -lImlib2"
EOF
chmod +x giblib-config
export PATH="$PWD:$PATH"

CPPFLAGS="-D_GNU_SOURCE" \
CFLAGS="$optcflags $optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
  ./configure -C --prefix="$butch_prefix" $xconfflags

[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir"

make V=1 -j$MAKE_THREADS INCLUDES=-I.
make DESTDIR="$butch_install_dir" install

path: pkg/scrot


code:
[vars]
filesize=3920622
sha512=ac392d916e6953b0925a7cbb0f232affea33339ef69b47a0a7898492afb9784b93138986df53d6da6d3e2ad79af1e9482df565ecca30f89428be0ae6851b1adc

[mirrors]
http://www.libsdl.org/release/SDL-1.2.15.tar.gz

[deps]
libxext

[build]
patch -p1 < "$K"/sdl-stacksize.patch
patch -p1 < "$K"/sdl-grsec.patch

cd src/video/fbcon
sed -i -e "s|__u16|ushort|" -e "s|__u32|uint|" *.c *.h
sed -i "s|defined(FB_TYPE_VGA_PLANES)|defined(DONT_TOUCH_THIS)|" SDL_fbvideo.c
cd ../../..

sed -i '/_XData32/s:register long:register _Xconst long:' src/video/x11/SDL_x11sym.h

[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') --with-sysroot=$butch_root_dir"
CFLAGS="$optcflags" \
LDFLAGS="$optldflags" \
CPPFLAGS="-D_GNU_SOURCE -D_BSD_SOURCE -D_XFUNCS_H_" \
  ./configure -C --prefix="$butch_prefix" $xconfflags

[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir"

make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

path: pkg/sdl


code:
[mirrors]
http://www.ferzkopp.net/Software/SDL_gfx-2.0/SDL_gfx-2.0.24.tar.gz

[vars]
filesize=1767169
sha512=df96601ae337519eca606bf93669a44931d259abd012fb1d5743977c12b9a98a35e4eea17f475f3dd698d9a26b1678dd3f746a240db5ccada5cf3d42955e454d

[deps]
sdl

[build]
# the configure script is too stupid to detect if we're on non-x86
# we have to manually disable mmx asm.
usemmx="--enable-mmx=no"
case "$A" in i[3-6]86) usemmx= ;; esac

[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') --with-sysroot=$butch_root_dir"
CFLAGS="$optcflags" \
LDFLAGS="$optldflags" \
CPPFLAGS=-D_GNU_SOURCE \
  ./configure -C --prefix="$butch_prefix" $usemmx $xconfflags
echo true > missing
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

path: pkg/sdl-gfx


code:
[mirrors]
http://www.libsdl.org/projects/SDL_image/release/SDL_image-1.2.12.tar.gz
[vars]
filesize=2231074
sha512=0e71b280abc2a7f15755e4480a3c1b52d41f9f8b0c9216a6f5bd9fc0e939456fb5d6c10419e1d1904785783f9a1891ead278c03e88b0466fecc6871c3ca40136

[deps]
sdl
libjpeg
libpng
libtiff

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') --with-sysroot=$butch_root_dir"
CFLAGS="$optcflags -D_GNU_SOURCE" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
  ./configure -C --prefix="$butch_prefix" $xconfflags
[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir"
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

path: pkg/sdl-image


code:
[mirrors]
http://www.libsdl.org/projects/SDL_mixer/release/SDL_mixer-1.2.12.tar.gz
[vars]
filesize=3707781
sha512=230f6c5a73f4bea364f8aa3d75f76694305571dea45f357def742b2b50849b2d896af71e08689981207edc99a9836088bee2d0bd98d92c7f4ca52b12b3d8cf96

[deps]
sdl
alsa-lib
libvorbis
libmikmod
libflac
fluidsynth

[build]
# you may want to remove fluidsynth from the deps list, this will lead to a lack of midi
# but save from glib dependency hell.

printf "%s\n%s\n" 'extern void Mix_QuitFluidSynth();' 'extern int Mix_InitFluidSynth();' > patch.h
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/')"
cat << EOF > libmikmod-config
#!/bin/sh
echo -lmikmod
EOF
chmod +x libmikmod-config
export PATH="$PWD:$PATH"
CFLAGS="$optcflags " \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
CPPFLAGS="-D_GNU_SOURCE -include patch.h" \
  ./configure -C --prefix="$butch_prefix" $xconfflags
[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir"
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

path: pkg/sdl-mixer


code:
[mirrors]
http://www.libsdl.org/projects/SDL_net/release/SDL_net-1.2.8.tar.gz

[vars]
filesize=360958
sha512=2766ca55343127c619958ab3a3ae3052a27a676839f10a158f7dfc071b8db38c2f1fc853e8add32b9fef94ab07eaa986f46a68e264e8087b57c990af30ea9a0b

[deps]
sdl

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/')"
CFLAGS="$optcflags -D_GNU_SOURCE" LDFLAGS="$optldflags" \
  ./configure -C --prefix="$butch_prefix" $xconfflags
[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir"
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

path: pkg/sdl-net


code:
[mirrors]
http://www.icculus.org/SDL_sound/downloads/SDL_sound-1.0.3.tar.gz
http://offload2.icculus.org/SDL_sound/downloads/SDL_sound-1.0.3.tar.gz
http://ftp.usa.openbsd.org/pub/OpenBSD/distfiles/SDL_sound-1.0.3.tar.gz
http://mirror2.openwrt.org/sources/SDL_sound-1.0.3.tar.gz

[vars]
filesize=1127100
sha512=3e60671777d804e6104d7d441f4a29866492c9412040eea3fd2283c0914a0a1ebc550260631c2bf500e7d982e05a6f9feeda81e9eeef8257303750c1be582824

[deps]
sdl
alsa-lib

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"

CPPFLAGS=-D_GNU_SOURCE \
CFLAGS="$optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
./configure -C --prefix="$butch_prefix" $xconfflags
[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir"
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

path: pkg/sdl-sound


code:
[mirrors]
http://www.libsdl.org/projects/SDL_ttf/release/SDL_ttf-2.0.11.tar.gz

[vars]
filesize=4053686
sha512=64e04d1cd77e525e0f2413ad928841e5d3d09d551c030fc577b50777116580e430cb272b2aeb6191dfcc464669cf2f7a5a50d10e7c75637a3b1e8c8fca7fc78b

[deps]
freetype
sdl

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/')"
printf "#!/bin/sh\necho -lfreetype -I$butch_root_dir$butch_prefix/include/freetype2\n" > freetype-config
chmod +x freetype-config
export PATH="$PWD:$PATH"
CFLAGS="$optcflags" \
LDFLAGS="$optldflags" \
CPPFLAGS=-D_GNU_SOURCE \
  ./configure -C --prefix="$butch_prefix" $xconfflags
[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir"
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

path: pkg/sdl-ttf


code:
[vars]
filesize=3871267
sha512=b6d2485154fbc07ab86a4305485e116d35fac25a97033b9e1c65ee0eb8251a18209cb1de3a914d9c0ddc53aa1ffac66c865b111d218e79eb5a10ed00dfec7540

[mirrors]
https://www.libsdl.org/release/SDL2-2.0.3.tar.gz

[deps]

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"

CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
  ./configure -C --prefix="$butch_prefix" --disable-nls $xconfflags

make V=1 -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install


code:
[vars]
filesize=8398016
sha512=300ff078c4c9a74ccc143692630e9c97e25a223bf80661cd5e7d684a25c6ad7760b20778d492d6cc41521dcd2a00e4a76947cf6dffc679fdbd54f430b3906ea6

[mirrors]
https://www.libsdl.org/projects/SDL_image/release/SDL2_image-2.0.0.tar.gz

[deps]
zlib
libpng
sdl2

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"

CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
  ./configure -C --prefix="$butch_prefix" --disable-nls $xconfflags

[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir"

make V=1 -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install


code:
[vars]
filesize=5517665
sha512=2dfd7d9a87d86b0446e52c78dcf4c45dba747256ff9cb4cc010818eac725410f5a1a781e6695ca0bcead756c70519d8d5b4df6c1b2935085e0356d9b4d7844fa

[mirrors]
https://www.libsdl.org/projects/SDL_ttf/release/SDL2_ttf-2.0.12.tar.gz

[deps]
sdl2
freetype

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"
printf "#!/bin/sh\necho -lfreetype -I$butch_root_dir$butch_prefix/include/freetype2\n" > freetype-config
chmod +x freetype-config
export PATH="$PWD:$PATH"
CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
  ./configure -C --prefix="$butch_prefix" --disable-nls $xconfflags

[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir"

make V=1 -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install


code:
[mirrors]
http://downloads.sourceforge.net/project/libseccomp/libseccomp-2.1.1/libseccomp-2.1.1.tar.gz
[vars]
filesize=113133
sha512=1f2916d80a9b9937d2ab9ecf9c4f1e2a8ffc27f90f14e8481eb2f32c8122ea1756950f753f25fb571053f492cc97c8792760e0f058e7ea07ec4bb442508d1112

[deps]
bash

[build]
patch -p1 < "$K"/seccomp.patch
CFLAGS="$optcflags" LDFLAGS="$optldflags" \
   ./configure -C --prefix="$butch_prefix" \
     --libdir=/lib
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

path: pkg/seccomp


code:
[deps]

[vars]
filesize=899091
sha512=273d4d0b3dd41a3966260fbe261a20110a2a4c0749e11a080f4fc8694e47b605cb977f2535b20b92d57b1b74129df092ba47f4184951dbc3f0f14fd9b91b7bfd
desc='GNU stream editor with more features than busybox sed'

[mirrors]
http://ftp.gnu.org/pub/gnu/sed/sed-4.2.1.tar.bz2

[build]
CC="$CC -static" ./configure -C --prefix="$butch_prefix" --disable-nls
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

path: pkg/sed


code:
[mirrors]
http://serf.googlecode.com/files/serf-1.3.2.tar.bz2

[vars]
filesize=139861
sha512=4e9a117c08db172cfc159d43b7a1a5cd4d888e74cbc8b55af6c5e5dc70562d4a3e1d875093fa40c515c2e8e3e290f91238491ec260d7c67b6613b83ede47543e

[deps]
apr
apr-util
libressl
zlib

[deps.host]
scons

[build]
patch -p1 < "$K"/serf-format-UB.patch
cat << EOF > apr-1-config
#!/bin/sh
res=\$($butch_root_dir$butch_prefix/bin/apr-1-config "\$@")
rc=\$?
printf "%s\n" "\$res" | sed \
  -e 's,-I'$butch_prefix'/include,-I'"$butch_root_dir""$butch_prefix"/include',' \
  -e 's,-L'$butch_prefix'/lib,-L'"$butch_root_dir""$butch_prefix"/lib',' \
  -e 's,-I/usr/include,,g'
exit \$rc
EOF
chmod +x apr-1-config
getfullpath() {
	type "$1" | awk '{print $NF}'
}
replace_cc_arg1() {
	echo $CC | awk -v a=$(getfullpath $CC) \
	           '{for(i=2;i<=NF;i++) a = a " " $i; print a}'
}
# serfs scons script doesnt like empty prefix.
[ -z "$butch_prefix" ] && butch_prefix=/
sed -i 's,usr,loosr,' SConstruct
scons CC="$(replace_cc_arg1)" CFLAGS="-D_GNU_SOURCE $optcflags" LINKFLAGS="$optldflags" \
  PREFIX="$butch_prefix" APR=$PWD/apr-1-config APU=$PWD/apr-1-config \
  ZLIB="$butch_root_dir""$butch_prefix" \
  OPENSSL="$butch_root_dir""$butch_prefix" \
  -j$MAKE_THREADS

mkdir -p "$butch_install_dir""$butch_prefix"

scons install --install-sandbox="$butch_install_dir"

path: pkg/serf


code:
[build]
IS="$K"/bin/butch-install-service
"$IS" --log --force crond "$K"/services/crond
"$IS" --force dmesg "$K"/services/dmesg
"$IS" --force tty1 "$K"/services/tty1
"$IS" --force tty2 "$K"/services/tty2
"$IS" --force tty3 "$K"/services/tty3
"$IS" --force tty4 "$K"/services/tty4
"$IS" --force ttyS0 "$K"/services/ttyS0

path: pkg/services


code:
[deps]
python
distribute

path: pkg/setuptools


code:
[mirrors]
http://www.ibiblio.org/pub/Linux/apps/sound/soundcard/setvol-1.1.tar.gz

[vars]
filesize=6207
sha512=120937e6c18846278e2fd9d2dad93f1db999b62b815850aad0f12d89ab87d6c0c655e22fd94286e0da7f0ea2e1f1a5f5949f7bacd21ec6a6cc8aa8bffe7d9186
desc="A simple commandline volume control"

[deps]
alsa-lib

[build]

[ -f setvol ] && rm -f setvol
gcc -o setvol setvol.c
dest="$butch_install_dir""$butch_prefix"
mkdir -p $dest/bin
mkdir -p $dest/share/doc
install -m755 -s setvol $dest/bin
install -m644 README $dest/share/doc/setvol.txt

path: pkg/setvol


code:
[mirrors]
http://xorg.freedesktop.org/releases/individual/app/setxkbmap-1.3.0.tar.gz

[vars]
filesize=155404
sha512=c9bb05031f34f0e17c0868b1725bd2a135477edf04a94c1dea7d76ebb032bbecfb2f73e6923d1fd81f1e1cc97fc02816f436ae6d891c3dbdfad26ef969e63600

[deps]
libxkbfile
libx11

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/')"
CFLAGS="$optcflags -D_GNU_SOURCE" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
  ./configure -C --prefix="$butch_prefix" $xconfflags
make V=1 -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

path: pkg/setxkbmap


code:
[mirrors]
http://freedesktop.org/~hadess/shared-mime-info-1.1.tar.xz

[vars]
filesize=506660
sha512=16aab85d30bc6ec10cbc92667e64a9d4c30f30ab1bcb652cc93387f0f3bf342af9ba318db19325c5e26eacf7caeaa77c496d2aa7fabd3e99dae6ef8d4a57d841

[deps]
glib
libxml2

[build]

mkdir .deps
touch .deps/update_mime_database-update-mime-database.Tpo

[ -n "$CROSS_COMPILE" ] && xconfflags="--host=$($CC -dumpmachine)"
CFLAGS="$optcflags -D_GNU_SOURCE" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
  ./configure -C --prefix="$butch_prefix" $xconfflags

sed -i 's@$(AM_V_at)$(am__mv) $(DEPDIR)/update_mime_database-update-mime-database.Tpo@#@' Makefile

for i in po ; do
        printf 'check:\n\ttrue\n\nall:\n\ttrue\ninstall:\n\ttrue\clean:\n\ttrue\n\n' > "$i"/Makefile
done

# FIXME makefile is buggy and breaks randomly with multiple processes
make -j1
make DESTDIR="$butch_install_dir" install
dest="$butch_install_dir""$butch_prefix"
mkdir -p "$dest"/lib/pkgconfig
mv "$dest"/share/pkgconfig/* "$dest"/lib/pkgconfig/
rm -rf "$dest"/share/pkgconfig

path: pkg/shared-mime-info


code:
[vars]
filesize=16780
sha512=733f62d94dd5067f19dd09e28088a8c611a6d12056ecd8f5c2d262f6d56baa498ca1445a466657c757ecab9320e647dc1ee92845bc7825ea8df2e67ed7903cd2

[mirrors]
ftp://ftp.eskimo.com/home/scs/src/shuffle.tar.gz

[build]
make -j$MAKE_THREADS CFLAGS2="$optcflags" LINKFLAGS="$optldflags"
dest="$butch_install_dir""$butch_prefix"
mkdir -p "$dest"/bin "$dest"/share/man/man1/
cp -a shuffle "$dest"/bin
cp -a shuffle.1 "$dest"/share/man/man1/

path: pkg/shuffle


code:
[mirrors]
http://geoff.greer.fm/ag/releases/the_silver_searcher-0.29.1.tar.gz

[vars]
filesize=174309
sha512=54be3afd2eaa11b31029c58350601918ac8ec35b90af1a2beedf94f259cdeb15c893e9f099821e2cb96a8ff28edc03934496d994dab5a0a751e25d38c84a6d2e

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"

CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
  ./configure -C --prefix="$butch_prefix" --disable-nls $xconfflags

make V=1 -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

path: pkg/silversearcher


code:
[mirrors]
http://dl.suckless.org/tools/slock-1.1.tar.gz

[vars]
filesize=4604
sha512=67cd9a62edde6ca0f9f7c09989ab8fa02a11a6ec82cc52b228c0b4fd509c5605668954630b0d2727aeb3c7283580665e4b5e5c0a37f3094a6f5b2a540e45f6b5
desc='locks your X11 session with your password'

[deps]
libx11

[build]
slockflags="-DVERSION=\"1.1\" -DHAVE_SHADOW_H -DCOLOR1=\"black\" -DCOLOR2=\"#005577\""
$CC -D_GNU_SOURCE $optcflags $slockflags slock.c -o slock $optldflags -lX11 \
   -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib

dest="$butch_install_dir""$butch_prefix"
install -D -m 755 slock "$dest"/bin/slock
chmod +s "$dest"/bin/slock

path: pkg/slock


code:
[mirrors]
http://downloads.sourceforge.net/project/smartmontools/smartmontools/6.3/smartmontools-6.3.tar.gz

[vars]
filesize=809790
sha512=59f13ca510618a65d4d227978fbcf9d0f67efbf75c425357ff79b283db650e1fc2ffb27cd37c32dc963c43130a2b982ef7b50e11673c92ae5a4369965fabe524
desc='analyzation of hard disk health and status using S.M.A.R.T.'

[deps]

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"

CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
  ./configure -C --prefix="$butch_prefix" $xconfflags

make V=1 -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

path: pkg/smartmontools


code:
[mirrors]
http://http.debian.net/debian/pool/main/s/smpeg/smpeg_0.4.5+cvs20030824.orig.tar.gz

[vars]
filesize=340290
sha512=f5bdaf0adcc98210c2e47a007762f26a7c81a7f04dd52939e6d1a1b3e06ba389b41fe7a4d1ad72bf275fffe28f082560b6784a67585c607b8aae86fe163641b5
tardir='smpeg-0.4.5+cvs20030824.orig'

[deps]
smpeg-patches
sdl
libice

[build]
tar xf "$C"/smpeg_0.4.5+cvs20030824-7.1.debian.tar.xz
for p in 200_export_mpegaudio_class 210_gtk+2.0-code 320_gnu_stack 330_format_security ; do
	patch -p1 < debian/patches/$p.diff
done
cp -f "$K"/config.sub .
sed -i 's/CXXLD = cc/CXXLD = $(CXX)/' Makefile.in
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine) \
  --with-sysroot=$butch_root_dir"

CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
  ./configure -C --prefix="$butch_prefix" --disable-nls $xconfflags

[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir"

make V=1 -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

path: pkg/smpeg


code:
[mirrors]
http://www.dest-unreach.org/socat/download/socat-1.7.3.1.tar.bz2

[vars]
filesize=488467
sha512=463340f578d4d1d54458b8ef9573ad3eff51dbcc736205e1b62e9a4782770d4bb76e6a07506350fd35405b130660559aaa79dfa2664c53ea268d7d64231f9b32
desc='swiss army knife of dealing with sockets, pipes and other byte streams'

[deps]
libressl

[build]
patch -p0 < "$K"/socat-libressl.patch

[ -n "$CROSS_COMPILE" ] &&
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/')"

CFLAGS="-DNETDB_INTERNAL=-1 $optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
  ./configure --prefix="$butch_prefix" $xconfflags \
            --bindir=/bin \
            --sbindir=/bin \
            --enable-help \
            --disable-readline \
            --disable-filan \

#            --disable-sycls
#            --disable-tun \
#            --disable-udp \
#            --disable-socks4 \
#            --disable-socks4a \
#            --disable-proxy \
#            --disable-sctp \

make PREFIX="$butch_prefix" -j$MAKE_THREADS all
make PREFIX="$butch_prefix" DESTDIR="$butch_install_dir" install

path: pkg/socat


code:
[mirrors]
http://download.sourceforge.net/project/sox/sox/14.4.1/sox-14.4.1.tar.gz

[vars]
filesize=1111653
sha512=a35c0f424ffaa51d06291e69b28ae7f2248a750fa8aded911dcd7e123877ecb5142c292f943eb723142c50dbd890b58163c6ef24c9c0573377855fad1b36fb25

[deps]

[build]
patch -p1 < "$K"/sox-rewind.patch
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"

CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
  ./configure -C --prefix="$butch_prefix" $xconfflags
[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir"
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

path: pkg/sox


code:
[vars]
filesize=178152
sha512=de466c9ea2ff666891d776241912d7ee742bf8c90ff0c57e2049b0a31eaba74361448c065e517fef5f84a8f917d22a3e85227116babe9056ad23d0686583a417

[mirrors]
https://www.kernel.org/pub/software/devel/sparse/dist/sparse-0.4.4.tar.xz
http://ftp.be.debian.org/pub/software/devel/sparse/dist/sparse-0.4.4.tar.xz

[deps]

[build]
cat <<EOF > local.mk
PREFIX = $butch_prefix
CFLAGS += -D_GNU_SOURCE $optcflags
EOF
LDFLAGS="-static $optldflags" \
make Q= V=1 CC="$CC" -j$MAKE_THREADS HAVE_GTK2=no
make HAVE_GTK2=no V=1 DESTDIR="$butch_install_dir" install

path: pkg/sparse


code:
[mirrors]
http://sqlite.org/2016/sqlite-autoconf-3110100.tar.gz

[vars]
filesize=2359545
sha512=c3efd2693e6a9526a2901d9879982a421e81e7e979aef65a160e71b255339344079a1943395480d5c37a1acc6243a8d45f45fa688f7e996774da38a3a99e71a1

[deps]
musl
readline

[deps.host]
pkgconf

[build]
if false ; then
./configure -C --prefix="$butch_prefix"
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install
else

read CPPFLAGS << EOF
  -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\"
  -DPACKAGE_VERSION=\"3.11.1\" -DPACKAGE_STRING=\"sqlite\ 3.11.1\"
  -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\"
  -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.11.1\"
  -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1
  -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
  -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
  -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_FDATASYNC=1
  -DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1
  -DHAVE_DECL_STRERROR_R=1 -DHAVE_STRERROR_R=1 -DHAVE_READLINE=1
  -DHAVE_POSIX_FALLOCATE=1 -D_REENTRANT=1 -DSQLITE_THREADSAFE=1
  -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE
EOF

cat << EOF > Makefile
sqlite3: libsqlite3.so shell.o
	\$(CC) -L. -lsqlite3 -o \$@ shell.o
libsqlite3.so: sqlite3.o
	\$(CC) \$(LDFLAGS) -shared -Wl,-soname=\$@ -o \$@ \$<
libsqlite3.a: sqlite3.o
	ar rc \$@ \$<

all: libsqlite3.so libsqlite3.a sqlite3
install:
	install -D -m 755 sqlite3 \$(DESTDIR)\$(prefix)/bin/sqlite3
	install -D -m 644 sqlite3.1 \$(DESTDIR)\$(prefix)/share/man/man1/sqlite3.1
	install -D -m 644 libsqlite3.so \$(DESTDIR)\$(prefix)/lib/libsqlite3.so
	ln -sf libsqlite3.so \$(DESTDIR)\$(prefix)/lib/libsqlite3.so.0
	ln -sf libsqlite3.so \$(DESTDIR)\$(prefix)/lib/libsqlite3.so.0.8.6
	install -D -m 644 libsqlite3.a \$(DESTDIR)\$(prefix)/lib/libsqlite3.a
	install -D -m 644 sqlite3.pc \$(DESTDIR)\$(prefix)/lib/pkgconfig/sqlite3.pc
	install -D -m 644 sqlite3.h \$(DESTDIR)\$(prefix)/include/sqlite3.h
	install -D -m 644 sqlite3ext.h \$(DESTDIR)\$(prefix)/include/sqlite3ext.h

.PHONY: all install
EOF

cat << EOF > sqlite3.pc
prefix=$butch_prefix
exec_prefix=\${prefix}
libdir=\${prefix}/lib
includedir=\${prefix}/include
Name: SQLite
Description: SQL database engine
Version: 3.11.1
Libs: -lsqlite3 -lreadline
Libs.private:
Cflags:
EOF
make all CC="$CC" CFLAGS="$optcflags -fPIC -O0" CPPFLAGS="$CPPFLAGS" -j2
make DESTDIR="$butch_install_dir" prefix="$butch_prefix" install

fi

path: pkg/sqlite


code:
[deps]
partx
syslinux6
squashfs-tools
dosfstools
libblkid
kernel
cpio

[build]
install -D -m 750 "$K"/squash-tool "$butch_install_dir""$butch_prefix"/bin/squash-tool
#version e50288c5c25199f01264d3dbb39461354b7d9bdcd01dc96215bcb86054d8df7d10a9bf54a851445f79d5bfd78d08931f6a2e78ab883fab5709e38455fc20df33

path: pkg/squash-tool


code:
[vars]
filesize=133173
sha512=4b69c5d3008803347d0ce7628957e3873c9ebd799662b25dfb739afb6a1ce97bdd02b0465ac4d949bc38af2155880ac068209dc638b94e5c86a8011ec3a00de0

[mirrors]
http://freefr.dl.sourceforge.net/project/squashfs/squashfs/squashfs4.2/squashfs4.2.tar.gz

[deps]
zlib

[build]
patch -p1 < "$K"/squashfs-tools.patch

cd squashfs-tools

make INSTALL_DIR="$butch_install_dir""$butch_prefix""/bin"\
     EXTRA_LDFLAGS="$optldflags"\
     EXTRA_CFLAGS="-D_GNU_SOURCE -DFNM_EXTMATCH=0 $optcflags"\
     -j$MAKE_THREADS all install

path: pkg/squashfs-tools


code:
[mirrors]
http://www.squid-cache.org/Versions/v4/squid-4.0.8.tar.xz

[vars]
filesize=2381036
sha512=f2e4d077aafa9c3adc6bc972fdcdd1fa041eeb93792a194a46025b56bf2afda0f38928d97acba5beac54b228347932b06ce9cff7af5ff9b41008cb4fc0c03a09
desc="HTTP proxy and cache"

[deps]
libressl
libstdc++

[deps.host]
perl

[build]
#patch -p1 < "$K"/some.patch

[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine) \
  --with-sysroot=$butch_root_dir"

#  --disable-optimizations \ #broken: does a sed s/-O//g on the users CFLAGS, so -Os turns into "s"
#  --runstatedir="$butch_prefix"/var/run # broken: setting runstatedir causes libltdl/configure to err out

CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
  ./configure -C --prefix="$butch_prefix" --disable-nls $xconfflags \
  --disable-arch-native \
  --disable-silent-rules \
  --disable-strict-error-checking \
  --with-openssl \
  --without-expat \
  --without-libxml2 \
  --without-nettle \
  --without-gnutls \
  --without-libcap \
  --disable-loadable-modules \
  --disable-htcp \
  --disable-eui  \
  --disable-snmp \
  --disable-select \
  --disable-epoll \
  --disable-http-violations \
  --sbindir="$butch_prefix"/bin \
  --libexecdir="$butch_prefix"/libexec/squid \
  --sysconfdir="$butch_prefix"/etc/squid \
  --localstatedir="$butch_prefix"/var/squid \

#make -C src CXX=g++ cf_gen
[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir"

make V=1 -j$MAKE_THREADS \
  BUILDCXX=g++ BUILDCXXFLAGS="-O0 -g0 -std=c++11" \
  AR="$CROSS_COMPILE"ar RANLIB="$CROSS_COMPILE"ranlib
make DESTDIR="$butch_install_dir" install

path: pkg/squid


code:
[vars]
filesize=2562
sha512=f53163bd6bf257ef912d23dd813690a6a8700344bcc3caad73556917f12e76364b6ebc9bd11224fe8f4013d83518459440f113a313fc9721de2a124277270044

[deps]
libx11

[mirrors]
http://dl.suckless.org/tools/sselp-0.2.tar.gz

[build]
cp "$K/sselp.config.mk" ./config.mk && make -j $MAKE_THREADS && make DESTDIR="$butch_install_dir" install

path: pkg/sselp


code:
[build]
IS="$K"/bin/butch-install-service
"$IS" --down --log --force sshd "$K"/services/sshd

path: pkg/sshd-service


code:
[vars]
filesize=136378
sha512=48ae4008d10fe66b843ff1e891627f8262e00d064fec048c8c1189507e757994e81e4fa2deb4d8d56cff0d1818efe4a692494b9c48a01c6c79c626acefa1b53e

[mirrors]
http://downloads.sourceforge.net/sourceforge/fuse/sshfs-fuse-2.5.tar.gz

[deps]
fuse

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"

sed -i 's@export PKG_CONFIG_PATH=/usr@export FOOBAR=@' configure

CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
./configure -C --prefix="$butch_prefix" $xconfflags
make -j $MAKE_THREADS
make DESTDIR="$butch_install_dir" install

path: pkg/sshfs


code:
[vars]
filesize=32947
sha512=06a75cdf7d22c64c1331276b0f58577c3c42c1c2edcb41a33a3c37f7b65bd284a3b006dd94e0dc081f42f028dd18b60f278e8b3f33a1cf6611b1398bff80df7d

[mirrors]
http://dl.suckless.org/st/st-0.4.1.tar.gz

[deps]
fontconfig
freetype
libx11
libxext
libxft

[build]
make \
 PREFIX="$butch_prefix" \
 CFLAGS="$optcflags -D_GNU_SOURCE -std=c99 -I$butch_root_dir$butch_prefix/include/freetype2 \
   -DVERSION=\\\"0.4.1\\\" -D_BSD_SOURCE -D_XOPEN_SOURCE=600" \
 LDFLAGS="$optldflags -lX11 -lXext -lXft -lfontconfig -lfreetype \
  -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
 PREFIX="$butch_prefix" DESTDIR="$butch_install_dir" \
  -j$MAKE_THREADS all install
#make DESTDIR="$butch_install_dir" install

path: pkg/st


code:
[deps.stage0]
jobflow
sabotage-core
services
stage0-gcc
stage0-musl
kernel-headers
busybox
patch
binutils
make


code:
[mirrors]
http://www.musl-libc.org/releases/musl-1.1.14.tar.gz

[vars]
filesize=894971
sha512=9016246b44a7e6ef51477f0a246373c79f3e796c70031c3323be1b6c4c0518a2d4578f1aa712adfd9a80cdc1d71918bd7a35855052a0452b854755bf0cc2424e

[deps.stage0]
stage0-gcc

[build]
# do not rebuild stage0 packages once we're past that stage
test "$STAGE" = "0" || exit 0
patch -p1 < "$K"/musl-1.1.14-regex.patch
CC=$R/bin/gcc ./configure --enable-gcc-wrapper \
  --prefix=$butch_prefix --syslibdir=$butch_prefix/lib

# enable debug libc when DEBUGBUILD is set
[ ! -z "$DEBUGBUILD" ] && echo "CFLAGS += -O0 -g" >> config.mak
[ ! -z "$DEBUGBUILD" ] && echo "CFLAGS_ALL_SHARED += -O0 -g" >> config.mak

make CC=$R/bin/gcc -j$MAKE_THREADS
make install DESTDIR="$butch_install_dir"

dest="$butch_install_dir""$butch_prefix"

# generate a musl-gcc wrapper that is aware of our directory layout...
cat << EOF > "$dest"/bin/musl-gcc
#!/bin/sh
self=\`readlink -f "\$0"\`
selfdir=\`dirname "\$self"\`/../../../bin
exec "\$selfdir/rawcc" "\$@" -specs "\$selfdir/../lib/musl-gcc.specs"
EOF

chmod +x "$dest"/bin/musl-gcc

# fix paths in spec file
sed -i 's,/lib,'"$butch_root_dir"'/lib,g' "$dest"/lib/musl-gcc.specs
sed -i 's,/include,'"$butch_root_dir"'/include,g' "$dest"/lib/musl-gcc.specs
sed -i 's,/lib/ld-musl,/xxx/xxx/,' "$dest"/lib/musl-gcc.specs


code:
[build]
# do not rebuild stage0 packages once we're past that stage
test "$STAGE" = "0" || exit 0

mountpoint -q $R || rm -rf $R
mkdir -p $S $R

cd $R
mkdir -p boot bin dev etc home lib mnt proc root share srv src sys tmp var
mkdir -p var/log var/log/sshd var/log/crond var/log/dmesg
mkdir -p var/empty var/service var/tmp var/spool/cron/crontabs
ln -s . usr
ln -s bin sbin

chmod 1777 tmp


code:
[deps]
jobflow
sabotage-core
kbd
9base
busybox
e2fsprogs
gcc4
gmp
mpc
mpfr
musl
dynamic-toolchain
man
zlib
binutils
patch

[build]
if [ -d "$butch_root_dir""$butch_staging_dir"/stage0 ] ; then
	rm -rf "$butch_root_dir""$butch_staging_dir"/gcc3
	rm -rf "$butch_root_dir""$butch_staging_dir"/stage0-musl
	rm -rf "$butch_root_dir""$butch_staging_dir"/stage0

	butch unlink gcc3
	butch relink $(ls -d "$butch_root_dir""$butch_staging_dir"/gcc4* |awk -F/ '{print $NF}' |tail -n1)
fi

rm -rf "$butch_root_dir""$butch_staging_dir"/stage1


code:
[deps]
stage1
ca-certificates
libressl


code:
[deps]
kernel-headers

[mirrors]
http://downloads.sourceforge.net/project/strace/strace/4.8/strace-4.8.tar.xz

[vars]
filesize=441712
sha512=c3316382f60cd4d02eec1eef46a0ef2d000afbccf2c176a6fec652e1b3391685f0e33f184497cb3ccf54d72d460471a4945d3a864fb5bce1f45f32fdf132cfe3
desc='display system calls (and parameters) of arbitrary programs for debugging'

[build]
patch -p1 < "$K"/strace-musl.patch
patch -p1 < "$K"/strace-kernelhdr_3.12.6.patch
sed -i -e 's/include <linux\/socket.h>/include <sys\/socket.h>/g' configure

archflags=
if [ "$A" = "arm" ] ; then
	patch -p1 < "$K"/strace-arm_process.patch
elif [ "$A" = "mips" ] ; then
	sed -i 's,sgidefs\.h,asm/sgidefs.h,' defs.h
elif [ "$A" = "powerpc" ] ; then
	cp "$K"/ppc-regs.h .
	archflags="-include ppc-regs.h"
	patch -p1 < "$K"/strace-ppc-defs.patch
	patch -p1 < "$K"/strace-ppc-signal.patch
	patch -p1 < "$K"/strace-ppc-syscall.patch
fi

[ -n "$CROSS_COMPILE" ] && xconfflags="--host=$($CC -dumpmachine)"

#CFLAGS="-static $archflags -D_GNU_SOURCE -DHAVE_LONG_LONG_OFF_T -DFPE_FLTUND=5 -DHAVE_SYS_REG_H \
#-D__sched_priority=sched_priority -Dbool=int -DPTRACE_POKEUSR=PTRACE_POKEUSER \
#-DMSG_EXCEPT=020000 -Dloff_t=int64_t $optcflags" \
CFLAGS="$archflags -Dsigcontext_struct=sigcontext $optcflags" \
LDFLAGS="$optldflags -static" \
 ./configure -C --prefix="$butch_prefix" \
 ac_cv_have_long_long_off_t=yes $xconfflags

make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

path: pkg/strace


code:
[mirrors]
ftp://ftp.stunnel.org/stunnel/archive/5.x/stunnel-5.06.tar.gz

[vars]
filesize=595550
sha512=5fae9938f0f7586d13a04b20751ccffb1d0c067842f24c831dce354b075eb290491806a9d40ac36598cf05b35a1bd5be14e834aa7420b7e0fa960a9d7f7e4fd5

[deps]
libressl

[build]
patch -p1 < "$K"/stunnel-libressl.patch

if [ -n "$CROSS_COMPILE" ] ; then
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/')"
  xconfflags="$xconfflags -with-ssl=$butch_root_dir$butch_prefix"
fi
sed -i 's@-fstack-protector@-ffoobar@g' configure
CFLAGS="$optcflags" \
LDFLAGS="$optldflags" \
CPPFLAGS=-D_GNU_SOURCE \
  ./configure -C --prefix="$butch_prefix" $xconfflags
[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir"
make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

path: pkg/stunnel


code:
[build]
$CC -std=gnu99 -fstack-protector-all -Wa,--noexecstack -s -Os -o su "$K"/su.c -static -lcrypt

chmod 4755 su

dest="$butch_install_dir""$butch_prefix"
mkdir -p "$dest"/bin
mv su "$dest"/bin

path: pkg/su


code:
[vars]
filesize=14781
sha512=f3550535351e37296280d33d229998e1f00aa605d0dab4a58944cf213721e823a1cfd9134b7bca2a4d61e265122a30d5dc917a290163ed8af2b24cd75d41a100

[mirrors]
http://dl.suckless.org/surf/surf-0.6.tar.gz

[deps]
glib
gtk+2
webkitgtk1
cairo
pango

[build]
make CC="$CC" \
 PREFIX="$butch_prefix" \
 CFLAGS="$optcflags -D_GNU_SOURCE -std=c99 \
   `pkg-config --cflags gtk+-2.0` \
   `pkg-config --cflags glib-2.0` \
   `pkg-config --cflags pango` \
   `pkg-config --cflags webkit-1.0` \
   `pkg-config --cflags cairo` \
   -DVERSION=\\\"0.4.1\\\" -D_BSD_SOURCE -D_XOPEN_SOURCE=600" \
 LDFLAGS="$optldflags -lX11 -lXext -lXft -lfontconfig -lfreetype \
   `pkg-config --libs gtk+-2.0` \
   `pkg-config --libs glib-2.0` \
   `pkg-config --libs pango` \
   `pkg-config --libs webkit-1.0` \
   `pkg-config --libs cairo` \
   -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
 PREFIX="$butch_prefix" DESTDIR="$butch_install_dir" \
  -j$MAKE_THREADS all install
#make DESTDIR="$butch_install_dir" install

path: pkg/surf


code:
[deps]
musl
apr
apr-util
zlib
serf
sqlite
swig

[deps.host]
pkgconf

[mirrors]
http://archive.apache.org/dist/subversion/subversion-1.8.3.tar.bz2

[vars]
filesize=6773731
sha512=7ecb0a30751884d72d4039b7b33ec643ff42325f904c3c3ec5a1ef5c90c67b52adec908f908d74a1ffffb8bdb58086c71980b4cd279dad926b8d7f846fe446ca

[build]
patch -p1 < "$K"/svn-perlbindings-delta-apr-dep.patch
patch -p1 < "$K"/svn-xcompile-configure.patch
sed -i 's#Makefile.PL.in$#& libsvn_swig_perl#' Makefile.in
cat << EOF > apr-1-config
#!/bin/sh
res=\$($butch_root_dir$butch_prefix/bin/apr-1-config "\$@")
rc=\$?
printf "%s\n" "\$res" | sed \
  -e 's,-I'$butch_prefix'/include,-I'"$butch_root_dir""$butch_prefix"/include',' \
  -e 's,-L'$butch_prefix'/lib,-L'"$butch_root_dir""$butch_prefix"/lib','
exit \$rc
EOF
chmod +x apr-1-config
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') --with-sysroot=$butch_root_dir"
CFLAGS="$optcflags" \
LDFLAGS="$optldflags -laprutil-1 -lapr-1 -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
CPPFLAGS="-D_GNU_SOURCE" \
  ./configure -C --prefix="$butch_prefix" $xconfflags \
  --with-apr=$PWD/apr-1-config \
  --with-apr-util=$PWD/apr-1-config \
  --without-berkeley-db \
  --disable-experimental-libtool \
  --disable-nls
make -j$MAKE_THREADS
make -j$MAKE_THREADS swig-pl  # needed for git-svn
make DESTDIR="$butch_install_dir" install
make DESTDIR="$butch_install_dir" install-swig-pl

path: pkg/svn


code:
[mirrors]
http://heanet.dl.sourceforge.net/project/sweep/sweep/0.9.3/sweep-0.9.3.tar.bz2
http://surfnet.dl.sourceforge.net/project/sweep/sweep/0.9.3/sweep-0.9.3.tar.bz2
http://switch.dl.sourceforge.net/project/sweep/sweep/0.9.3/sweep-0.9.3.tar.bz2

[vars]
filesize=946060
sha512=6c3fce80152f7b17cb130e05a2597efedd10c081dd2c98912a12375b838efdc50f0c980a457ce04ff1b68e40c81774dd06398ec56756efed8de32432ee0c88cc
desc='GTK+ audio waveform editor. supports multiple formats and filters.'

[deps]
alsa-lib
libsndfile
libsamplerate
libtdb
libvorbis
libmad
gtk+2
glib

[build]
patch -p1 < "$K"/sweep-default-device.patch
cp -f "$K"/config.sub .
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine) --with-sysroot=$butch_root_dir"
CFLAGS="$optcflags" \
LDFLAGS="$optldflags -lgmodule-2.0 -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib" \
CPPFLAGS=-D_GNU_SOURCE \
  ./configure -C $xconfflags \
  --disable-nls \
  --with-ogg-includes=$butch_root_dir$butch_prefix/include \
  --with-vorbis-includes=$butch_root_dir$butch_prefix/include \
  --disable-speex --disable-oggtest --disable-vorbistest \
  --prefix="$butch_prefix"

# included libtool version is too old.
[ -n "$CROSS_COMPILE" ] && "$K"/libtool.cross.gen --sysroot="$butch_root_dir"

make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

path: pkg/sweep


code:
[mirrors]
http://prdownloads.sourceforge.net/swig/swig-2.0.11.tar.gz

[vars]
filesize=5310295
sha512=6ebe40acebd779dc7d647595d4bd5db700615d333b53024fd8e36c7541a2c32677a77655bac475a5cb3add9742cef6d9c7e8e12d8c1105f7e76a3d10e2fea95e

[deps]
pcre

[build]
[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/')"

CPPFLAGS="-D_GNU_SOURCE" CFLAGS="$optcflags" LDFLAGS="$optldflags" \
  ./configure -C --prefix="$butch_prefix" $xconfflags

make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

path: pkg/swig


code:
[vars]
filesize=4940459
sha512=e39f3bd07d254c471cc0ae2f021cbbb96f21fad482dada399a00e3e323688a349b3a93842fb532660f35f666df350e26b591068263ebd860b62ae7d426e7021d

[mirrors]
http://sylpheed.sraoss.jp/sylpheed/v3.3/sylpheed-3.3.0.tar.gz

[deps]
gtk+2

[build]

CFLAGS="-D_GNU_SOURCE $optcflags" LDFLAGS="$optldflags" \
  ./configure -C --prefix="$butch_prefix"

make -j$MAKE_THREADS
make DESTDIR="$butch_install_dir" install

path: pkg/sylpheed


code:
[mirrors]
http://downloads.sourceforge.net/project/linux-diag/sysfsutils/2.1.0/sysfsutils-2.1.0.tar.gz

[vars]
filesize=788885
sha512=485902d98b41a69343cb037883d0c0a1de8a1a4aed657cd4528fe10bc845ac51629657dff01deef042e57c9bd9243095e23fc931d06d74db31b03c5f0a18cf07
desc="These are a set of utilites built upon sysfs"

[deps]
autoconf

[build]
CFLAGS="$optcflags" LDFLAGS="$optldflags" \
  ./configure --prefix="$butch_prefix" $xconfflags
make -j$MAKE_THREADS || exit 1
make V=1 DESTDIR="$butch_install_dir" install

path: pkg/sysfsutils


code:
[deps]
kernel-headers
gnu-efi-libs
mtools

[deps.host]
perl
nasm

[vars]
filesize=9772883
sha512=ca3da9d7f5f1c4ccc2eaa1cc33f5d2bb4afe2518dadeb863169ba2cce023c62112e5312181b047ce868a217e36f9b103622cf2e0e8559c3b7de35ad191388450

[mirrors]
ftp://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.02.tar.bz2
http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.02.tar.bz2
http://www.kernel.org/pub/linux/utils/boot/syslinux/6.xx/syslinux-6.02.tar.bz2
http://ftp.wh2.tu-dresden.de/pub/mirrors/kernel.org/linux/utils/boot/syslinux/syslinux-6.02.tar.bz2
http://ftp.hosteurope.de/mirror/ftp.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.02.tar.bz2
http://ftp.uni-ulm.de/pub/mirrors/kernel.org/utils/boot/syslinux/6.xx/syslinux-6.02.tar.bz2

[build]
isx86=0
case "$A" in
  i[3-6]86) isx86=1 ;;
  x86_64) isx86=1 ;;
  x32) isx86=1 ;;
esac

[ "$isx86" = 1 ] || {
    echo "ERROR: syslinux6 only supports the intel architecture"
    exit 0
}
sed -i 's,codepage com32 lzo core memdisk mbr memdump gpxe sample,codepage com32 core mbr,g' Makefile
sed -i 's,diag libinstaller dos win32 win64 dosutil txt,libinstaller txt,g' Makefile
sed -i 's,win32/syslinux.exe win64/syslinux64.exe,,g' Makefile
sed -i 's,dosutil/*.com dosutil/*.sys,,g' Makefile
sed -i 's,gpxe/gpxelinux.0 dos/syslinux.com,,g' Makefile
sed -i 's,core/isolinux.bin core/isolinux-debug.bin,,g' Makefile
sed -i 's,core/pxelinux.0 core/lpxelinux.0,,g' Makefile
sed -i 's,codepage com32 lzo core mbr sample efi txt,codepage com32 core mbr efi txt,g' Makefile
sed -i 's,com32 utils dosutil,com32 utils,g' Makefile
sed -i 's,libupload tools lib elflink/ldlinux gpllib libutil modules mboot,lib libutil,' com32/Makefile
sed -i 's,menu samples elflink rosh cmenu hdt gfxboot sysdump lua/src chain,menu,' com32/Makefile
sed -i 's,#include <getkey.h>,#include "include/getkey.h",' com32/libutil/keyname.c
sed -i 's,#include <libutil.h>,#include "include/libutil.h",' com32/libutil/keyname.c
sed -i 's,#include "sha1.h",#include "include/sha1.h",' com32/libutil/sha1hash.c
sed -i 's,#include <base64.h>,#include "include/base64.h",' com32/libutil/unbase64.c
sed -i 's,#include <md5.h>,#include "include/md5.h",' com32/libutil/md5.c
sed -i 's,#include <md5.h>,#include "include/md5.h",' com32/libutil/crypt-md5.c
sed -i 's,#include <minmax.h>,#include "include/minmax.h",' com32/libutil/sha256crypt.c
sed -i 's,#include "xcrypt.h",#include "include/xcrypt.h",' com32/libutil/sha256crypt.c
sed -i 's,#include <minmax.h>,#include "include/minmax.h",' com32/libutil/sha512crypt.c
sed -i 's,#include "xcrypt.h",#include "include/xcrypt.h",' com32/libutil/sha512crypt.c
sed -i 's,#include <base64.h>,#include "include/base64.h",' com32/libutil/base64.c
sed -i '/herror.*/d' utils/gethostip.c
sed -ri 's,__uint([0-9]+)_t,uint\1_t,g' efi/wrapper.c
sed -ri 's,__uint([0-9]+)_t,uint\1_t,g' efi/wrapper.h

PREFIXED_PATHS="BINDIR='/bin' LIBDIR='/lib' DATADIR='/share' MANDIR='/man' INCDIR='/include'"

make $PREFIXED_PATHS AUXDIR="$butch_prefix/lib/syslinux/bios" INSTALLROOT="$butch_install_dir" bios installer
make $PREFIXED_PATHS AUXDIR="$butch_prefix/lib/syslinux/bios" INSTALLROOT="$butch_install_dir" -j1 bios install

target=efi64
case "$A" in i[3-6]86) target=efi32 ;; esac
make $PREFIXED_PATHS AUXDIR="$butch_prefix/lib/syslinux" INSTALLROOT="$butch_install_dir" $target installer
make $PREFIXED_PATHS AUXDIR="$butch_prefix/lib/syslinux" INSTALLROOT="$butch_install_dir" -j1 $target install