2023-08-05 21:19:04 +01:00
|
|
|
# Template file for 'busybox'
|
2023-09-01 00:38:35 +01:00
|
|
|
pkgname=busybox-evolution
|
2023-08-05 21:19:04 +01:00
|
|
|
version=1.36.1
|
2023-10-29 15:34:13 +00:00
|
|
|
revision=5
|
2023-09-01 00:38:35 +01:00
|
|
|
hostmakedepends="perl pkg-config"
|
2023-08-05 21:19:04 +01:00
|
|
|
checkdepends="tar which zip"
|
2023-09-01 00:38:35 +01:00
|
|
|
short_desc="Swiss Army Knife of Embedded Linux (evolutionOS edition)"
|
|
|
|
maintainer="Tracker-Friendly <jliwin98@danwin1210.de>"
|
2023-08-05 21:19:04 +01:00
|
|
|
license="GPL-2.0-only"
|
|
|
|
homepage="https://www.busybox.net"
|
|
|
|
distfiles="${homepage}/downloads/busybox-${version}.tar.bz2"
|
|
|
|
checksum=b8cc24c9574d809e7279c3be349795c5d5ceb6fdf19ca709f80cde50e47de314
|
|
|
|
|
|
|
|
_alternatives_core="
|
|
|
|
ash:ash:/usr/bin/busybox
|
|
|
|
awk:awk:/usr/bin/busybox
|
|
|
|
hostname:hostname:/usr/bin/busybox
|
|
|
|
sh:sh:/usr/bin/busybox
|
|
|
|
vi:vi:/usr/bin/busybox
|
|
|
|
logger:logger:/usr/bin/busybox"
|
|
|
|
|
|
|
|
_alternatives="
|
|
|
|
${_alternatives_core}
|
|
|
|
ntpd:ntpd:/usr/bin/busybox
|
|
|
|
ntpd:ntpd:/etc/sv/busybox-ntpd"
|
|
|
|
|
|
|
|
alternatives="${_alternatives}"
|
|
|
|
register_shell="/usr/bin/ash"
|
|
|
|
|
|
|
|
_patch_config() {
|
|
|
|
local t="$1"
|
|
|
|
shift
|
|
|
|
while [ "$1" ]; do
|
|
|
|
local p="$1"
|
|
|
|
shift
|
|
|
|
echo "Applying $p..."
|
|
|
|
patch "${t}/.config" <"${FILESDIR}/dotconfig.d/${p}.patch"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
do_configure() {
|
|
|
|
mkdir -p src
|
|
|
|
mv * src || true
|
2023-09-05 17:28:40 +01:00
|
|
|
|
2023-09-01 00:38:35 +01:00
|
|
|
cp ${FILESDIR}/libbb.h src/include/libbb.h
|
2023-08-05 21:19:04 +01:00
|
|
|
|
|
|
|
local t
|
2023-09-01 00:38:35 +01:00
|
|
|
for t in busybox busybox-static; do
|
2023-08-05 21:19:04 +01:00
|
|
|
mkdir -p $t
|
|
|
|
cp -f ${FILESDIR}/dotconfig ${t}/.config
|
|
|
|
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
|
|
*-musl) vsed -i -e /CONFIG_FEATURE_VI_REGEX_SEARCH/s/y/n/ \
|
|
|
|
${t}/.config;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
if [ "$CROSS_BUILD" ]; then
|
|
|
|
vsed -i -e \
|
|
|
|
"s,\(CONFIG_CROSS_COMPILER_PREFIX\).*,\1=\"${XBPS_CROSS_TRIPLET}-\",g" \
|
|
|
|
${t}/.config
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2023-09-01 00:38:35 +01:00
|
|
|
_patch_config busybox-static static
|
2023-08-05 21:19:04 +01:00
|
|
|
|
2023-09-01 00:38:35 +01:00
|
|
|
for t in busybox busybox-static; do
|
2023-09-05 17:28:40 +01:00
|
|
|
make -C "${t}" KBUILD_SRC="${wrksrc}/src" -f "${wrksrc}/src/Makefile" oldconfig
|
2023-08-05 21:19:04 +01:00
|
|
|
make -C "${t}" KBUILD_SRC="${wrksrc}/src" -f "${wrksrc}/src/Makefile" prepare "${makejobs}"
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ "$SOURCE_DATE_EPOCH" ]; then
|
|
|
|
# rewrite date with the one from the date wrapper.
|
|
|
|
d=$(date +"%F %T %Z")
|
|
|
|
sed -i "s/\(#define AUTOCONF_TIMESTAMP\).*/\1 \"$d\"/" */include/autoconf.h
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
do_build() {
|
2023-09-01 00:38:35 +01:00
|
|
|
for t in busybox busybox-static; do
|
2023-08-05 21:19:04 +01:00
|
|
|
make -C "${t}" SKIP_STRIP=y "${makejobs}"
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
do_check() {
|
2023-09-01 00:38:35 +01:00
|
|
|
for t in busybox busybox-static; do
|
2023-08-05 21:19:04 +01:00
|
|
|
make -C "${t}" "${makejobs}" \
|
|
|
|
SKIP_KNOWN_BUGS=yes SKIP_INTERNET_TESTS=yes \
|
|
|
|
check
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install() {
|
|
|
|
vbin busybox/busybox_unstripped busybox
|
|
|
|
vman busybox/docs/busybox.1
|
|
|
|
}
|
|
|
|
|
|
|
|
busybox-static_package() {
|
|
|
|
short_desc+=" (statically linked)"
|
|
|
|
pkg_install() {
|
|
|
|
vbin busybox-static/busybox busybox.static
|
|
|
|
}
|
|
|
|
}
|