sysutils: automated code cleanup

Signed-off-by: Ian Leonard <antonlacon@gmail.com>
This commit is contained in:
Ian Leonard 2021-01-19 19:34:16 +00:00
parent ea622a836a
commit b31ce30170
32 changed files with 422 additions and 422 deletions

View File

@ -6,7 +6,7 @@ PKG_VERSION="1.13"
PKG_SHA256="59d41ddb0c7a92d8ac155a82ed2875b7880c8957ea4308afa633c8b81e5b8887" PKG_SHA256="59d41ddb0c7a92d8ac155a82ed2875b7880c8957ea4308afa633c8b81e5b8887"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="http://www.alpinelinux.org" PKG_SITE="http://www.alpinelinux.org"
PKG_URL="http://dev.alpinelinux.org/archive/bkeymaps/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_URL="http://dev.alpinelinux.org/archive/bkeymaps/${PKG_NAME}-${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain busybox" PKG_DEPENDS_TARGET="toolchain busybox"
PKG_LONGDESC="bkeymaps: binary keyboard maps for busybox" PKG_LONGDESC="bkeymaps: binary keyboard maps for busybox"
@ -15,6 +15,6 @@ make_target() {
} }
makeinstall_target() { makeinstall_target() {
mkdir -p $INSTALL/usr/lib/keymaps mkdir -p ${INSTALL}/usr/lib/keymaps
cp -PR bkeymaps/* $INSTALL/usr/lib/keymaps cp -PR bkeymaps/* ${INSTALL}/usr/lib/keymaps
} }

View File

@ -16,164 +16,164 @@ PKG_LONGDESC="BusyBox combines tiny versions of many common UNIX utilities into
PKG_BUILD_FLAGS="-parallel -gold" PKG_BUILD_FLAGS="-parallel -gold"
# nano text editor # nano text editor
if [ "$NANO_EDITOR" = "yes" ]; then if [ "${NANO_EDITOR}" = "yes" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET nano" PKG_DEPENDS_TARGET+=" nano"
fi fi
# nfs support # nfs support
if [ "$NFS_SUPPORT" = yes ]; then if [ "${NFS_SUPPORT}" = yes ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET rpcbind" PKG_DEPENDS_TARGET+=" rpcbind"
fi fi
if [ "$TARGET_ARCH" = "x86_64" ]; then if [ "${TARGET_ARCH}" = "x86_64" ]; then
PKG_DEPENDS_TARGET+=" pciutils" PKG_DEPENDS_TARGET+=" pciutils"
fi fi
pre_build_target() { pre_build_target() {
PKG_MAKE_OPTS_TARGET="ARCH=$TARGET_ARCH \ PKG_MAKE_OPTS_TARGET="ARCH=${TARGET_ARCH} \
HOSTCC=$HOST_CC \ HOSTCC=${HOST_CC} \
CROSS_COMPILE=$TARGET_PREFIX \ CROSS_COMPILE=${TARGET_PREFIX} \
KBUILD_VERBOSE=1 \ KBUILD_VERBOSE=1 \
install" install"
mkdir -p $PKG_BUILD/.$TARGET_NAME mkdir -p ${PKG_BUILD}/.${TARGET_NAME}
cp -RP $PKG_BUILD/* $PKG_BUILD/.$TARGET_NAME cp -RP ${PKG_BUILD}/* ${PKG_BUILD}/.${TARGET_NAME}
} }
pre_build_host() { pre_build_host() {
PKG_MAKE_OPTS_HOST="ARCH=$TARGET_ARCH CROSS_COMPILE= KBUILD_VERBOSE=1 install" PKG_MAKE_OPTS_HOST="ARCH=${TARGET_ARCH} CROSS_COMPILE= KBUILD_VERBOSE=1 install"
mkdir -p $PKG_BUILD/.$HOST_NAME mkdir -p ${PKG_BUILD}/.${HOST_NAME}
cp -RP $PKG_BUILD/* $PKG_BUILD/.$HOST_NAME cp -RP ${PKG_BUILD}/* ${PKG_BUILD}/.${HOST_NAME}
} }
pre_build_init() { pre_build_init() {
PKG_MAKE_OPTS_INIT="ARCH=$TARGET_ARCH \ PKG_MAKE_OPTS_INIT="ARCH=${TARGET_ARCH} \
HOSTCC=$HOST_CC \ HOSTCC=${HOST_CC} \
CROSS_COMPILE=$TARGET_PREFIX \ CROSS_COMPILE=${TARGET_PREFIX} \
KBUILD_VERBOSE=1 \ KBUILD_VERBOSE=1 \
install" install"
mkdir -p $PKG_BUILD/.$TARGET_NAME-init mkdir -p ${PKG_BUILD}/.${TARGET_NAME}-init
cp -RP $PKG_BUILD/* $PKG_BUILD/.$TARGET_NAME-init cp -RP ${PKG_BUILD}/* ${PKG_BUILD}/.${TARGET_NAME}-init
} }
configure_host() { configure_host() {
cd $PKG_BUILD/.$HOST_NAME cd ${PKG_BUILD}/.${HOST_NAME}
cp $PKG_DIR/config/busybox-host.conf .config cp ${PKG_DIR}/config/busybox-host.conf .config
# set install dir # set install dir
sed -i -e "s|^CONFIG_PREFIX=.*$|CONFIG_PREFIX=\"$PKG_BUILD/.install_host\"|" .config sed -i -e "s|^CONFIG_PREFIX=.*$|CONFIG_PREFIX=\"${PKG_BUILD}/.install_host\"|" .config
make oldconfig make oldconfig
} }
configure_target() { configure_target() {
cd $PKG_BUILD/.$TARGET_NAME cd ${PKG_BUILD}/.${TARGET_NAME}
find_file_path config/busybox-target.conf find_file_path config/busybox-target.conf
cp $FOUND_PATH .config cp ${FOUND_PATH} .config
# set install dir # set install dir
sed -i -e "s|^CONFIG_PREFIX=.*$|CONFIG_PREFIX=\"$INSTALL/usr\"|" .config sed -i -e "s|^CONFIG_PREFIX=.*$|CONFIG_PREFIX=\"${INSTALL}/usr\"|" .config
if [ ! "$CRON_SUPPORT" = "yes" ] ; then if [ ! "${CRON_SUPPORT}" = "yes" ]; then
sed -i -e "s|^CONFIG_CROND=.*$|# CONFIG_CROND is not set|" .config sed -i -e "s|^CONFIG_CROND=.*$|# CONFIG_CROND is not set|" .config
sed -i -e "s|^CONFIG_FEATURE_CROND_D=.*$|# CONFIG_FEATURE_CROND_D is not set|" .config sed -i -e "s|^CONFIG_FEATURE_CROND_D=.*$|# CONFIG_FEATURE_CROND_D is not set|" .config
sed -i -e "s|^CONFIG_CRONTAB=.*$|# CONFIG_CRONTAB is not set|" .config sed -i -e "s|^CONFIG_CRONTAB=.*$|# CONFIG_CRONTAB is not set|" .config
sed -i -e "s|^CONFIG_FEATURE_CROND_SPECIAL_TIMES=.*$|# CONFIG_FEATURE_CROND_SPECIAL_TIMES is not set|" .config sed -i -e "s|^CONFIG_FEATURE_CROND_SPECIAL_TIMES=.*$|# CONFIG_FEATURE_CROND_SPECIAL_TIMES is not set|" .config
fi fi
if [ ! "$SAMBA_SUPPORT" = yes ]; then if [ ! "${SAMBA_SUPPORT}" = yes ]; then
sed -i -e "s|^CONFIG_FEATURE_MOUNT_CIFS=.*$|# CONFIG_FEATURE_MOUNT_CIFS is not set|" .config sed -i -e "s|^CONFIG_FEATURE_MOUNT_CIFS=.*$|# CONFIG_FEATURE_MOUNT_CIFS is not set|" .config
fi fi
# optimize for size # optimize for size
CFLAGS=`echo $CFLAGS | sed -e "s|-Ofast|-Os|"` CFLAGS=$(echo ${CFLAGS} | sed -e "s|-Ofast|-Os|")
CFLAGS=`echo $CFLAGS | sed -e "s|-O.|-Os|"` CFLAGS=$(echo ${CFLAGS} | sed -e "s|-O.|-Os|")
CFLAGS="$CFLAGS -I$SYSROOT_PREFIX/usr/include/tirpc" CFLAGS+=" -I${SYSROOT_PREFIX}/usr/include/tirpc"
LDFLAGS="$LDFLAGS -fwhole-program" LDFLAGS+=" -fwhole-program"
make oldconfig make oldconfig
} }
configure_init() { configure_init() {
cd $PKG_BUILD/.$TARGET_NAME-init cd ${PKG_BUILD}/.${TARGET_NAME}-init
find_file_path config/busybox-init.conf find_file_path config/busybox-init.conf
cp $FOUND_PATH .config cp ${FOUND_PATH} .config
# set install dir # set install dir
sed -i -e "s|^CONFIG_PREFIX=.*$|CONFIG_PREFIX=\"$INSTALL/usr\"|" .config sed -i -e "s|^CONFIG_PREFIX=.*$|CONFIG_PREFIX=\"${INSTALL}/usr\"|" .config
# optimize for size # optimize for size
CFLAGS=`echo $CFLAGS | sed -e "s|-Ofast|-Os|"` CFLAGS=$(echo ${CFLAGS} | sed -e "s|-Ofast|-Os|")
CFLAGS=`echo $CFLAGS | sed -e "s|-O.|-Os|"` CFLAGS=$(echo ${CFLAGS} | sed -e "s|-O.|-Os|")
CFLAGS="$CFLAGS -I$SYSROOT_PREFIX/usr/include/tirpc" CFLAGS+=" -I${SYSROOT_PREFIX}/usr/include/tirpc"
LDFLAGS="$LDFLAGS -fwhole-program" LDFLAGS+=" -fwhole-program"
make oldconfig make oldconfig
} }
makeinstall_host() { makeinstall_host() {
mkdir -p $TOOLCHAIN/bin mkdir -p ${TOOLCHAIN}/bin
cp -R $PKG_BUILD/.install_host/bin/* $TOOLCHAIN/bin cp -R ${PKG_BUILD}/.install_host/bin/* ${TOOLCHAIN}/bin
} }
makeinstall_target() { makeinstall_target() {
mkdir -p $INSTALL/usr/bin mkdir -p ${INSTALL}/usr/bin
[ $TARGET_ARCH = x86_64 ] && cp $PKG_DIR/scripts/getedid $INSTALL/usr/bin [ ${TARGET_ARCH} = x86_64 ] && cp ${PKG_DIR}/scripts/getedid ${INSTALL}/usr/bin
cp $PKG_DIR/scripts/createlog $INSTALL/usr/bin/ cp ${PKG_DIR}/scripts/createlog ${INSTALL}/usr/bin/
cp $PKG_DIR/scripts/dthelper $INSTALL/usr/bin cp ${PKG_DIR}/scripts/dthelper ${INSTALL}/usr/bin
ln -sf dthelper $INSTALL/usr/bin/dtfile ln -sf dthelper ${INSTALL}/usr/bin/dtfile
ln -sf dthelper $INSTALL/usr/bin/dtflag ln -sf dthelper ${INSTALL}/usr/bin/dtflag
ln -sf dthelper $INSTALL/usr/bin/dtname ln -sf dthelper ${INSTALL}/usr/bin/dtname
ln -sf dthelper $INSTALL/usr/bin/dtsoc ln -sf dthelper ${INSTALL}/usr/bin/dtsoc
cp $PKG_DIR/scripts/ledfix $INSTALL/usr/bin cp ${PKG_DIR}/scripts/ledfix ${INSTALL}/usr/bin
cp $PKG_DIR/scripts/lsb_release $INSTALL/usr/bin/ cp ${PKG_DIR}/scripts/lsb_release ${INSTALL}/usr/bin/
cp $PKG_DIR/scripts/apt-get $INSTALL/usr/bin/ cp ${PKG_DIR}/scripts/apt-get ${INSTALL}/usr/bin/
cp $PKG_DIR/scripts/sudo $INSTALL/usr/bin/ cp ${PKG_DIR}/scripts/sudo ${INSTALL}/usr/bin/
cp $PKG_DIR/scripts/pastebinit $INSTALL/usr/bin/ cp ${PKG_DIR}/scripts/pastebinit ${INSTALL}/usr/bin/
ln -sf pastebinit $INSTALL/usr/bin/paste ln -sf pastebinit ${INSTALL}/usr/bin/paste
mkdir -p $INSTALL/usr/lib/libreelec mkdir -p ${INSTALL}/usr/lib/libreelec
cp $PKG_DIR/scripts/functions $INSTALL/usr/lib/libreelec cp ${PKG_DIR}/scripts/functions ${INSTALL}/usr/lib/libreelec
cp $PKG_DIR/scripts/fs-resize $INSTALL/usr/lib/libreelec cp ${PKG_DIR}/scripts/fs-resize ${INSTALL}/usr/lib/libreelec
sed -e "s/@DISTRONAME@/$DISTRONAME/g" \ sed -e "s/@DISTRONAME@/${DISTRONAME}/g" \
-i $INSTALL/usr/lib/libreelec/fs-resize -i ${INSTALL}/usr/lib/libreelec/fs-resize
if listcontains "${FIRMWARE}" "rpi-eeprom"; then if listcontains "${FIRMWARE}" "rpi-eeprom"; then
cp $PKG_DIR/scripts/rpi-flash-firmware $INSTALL/usr/lib/libreelec cp ${PKG_DIR}/scripts/rpi-flash-firmware ${INSTALL}/usr/lib/libreelec
fi fi
mkdir -p $INSTALL/usr/lib/systemd/system-generators/ mkdir -p ${INSTALL}/usr/lib/systemd/system-generators/
cp $PKG_DIR/scripts/libreelec-target-generator $INSTALL/usr/lib/systemd/system-generators/ cp ${PKG_DIR}/scripts/libreelec-target-generator ${INSTALL}/usr/lib/systemd/system-generators/
mkdir -p $INSTALL/etc mkdir -p ${INSTALL}/etc
cp $PKG_DIR/config/profile $INSTALL/etc cp ${PKG_DIR}/config/profile ${INSTALL}/etc
cp $PKG_DIR/config/inputrc $INSTALL/etc cp ${PKG_DIR}/config/inputrc ${INSTALL}/etc
cp $PKG_DIR/config/suspend-modules.conf $INSTALL/etc cp ${PKG_DIR}/config/suspend-modules.conf ${INSTALL}/etc
# /etc/fstab is needed by... # /etc/fstab is needed by...
touch $INSTALL/etc/fstab touch ${INSTALL}/etc/fstab
# /etc/machine-id, needed by systemd and dbus # /etc/machine-id, needed by systemd and dbus
ln -sf /storage/.cache/systemd-machine-id $INSTALL/etc/machine-id ln -sf /storage/.cache/systemd-machine-id ${INSTALL}/etc/machine-id
# /etc/mtab is needed by udisks etc... # /etc/mtab is needed by udisks etc...
ln -sf /proc/self/mounts $INSTALL/etc/mtab ln -sf /proc/self/mounts ${INSTALL}/etc/mtab
# create /etc/hostname # create /etc/hostname
ln -sf /proc/sys/kernel/hostname $INSTALL/etc/hostname ln -sf /proc/sys/kernel/hostname ${INSTALL}/etc/hostname
} }
post_install() { post_install() {
ROOT_PWD="`$TOOLCHAIN/bin/cryptpw -m sha512 $ROOT_PASSWORD`" ROOT_PWD="$(${TOOLCHAIN}/bin/cryptpw -m sha512 ${ROOT_PASSWORD})"
echo "chmod 4755 $INSTALL/usr/bin/busybox" >> $FAKEROOT_SCRIPT echo "chmod 4755 ${INSTALL}/usr/bin/busybox" >> ${FAKEROOT_SCRIPT}
echo "chmod 000 $INSTALL/usr/cache/shadow" >> $FAKEROOT_SCRIPT echo "chmod 000 ${INSTALL}/usr/cache/shadow" >> ${FAKEROOT_SCRIPT}
add_user root "$ROOT_PWD" 0 0 "Root User" "/storage" "/bin/sh" add_user root "${ROOT_PWD}" 0 0 "Root User" "/storage" "/bin/sh"
add_group root 0 add_group root 0
add_group users 100 add_group users 100
@ -188,38 +188,38 @@ post_install() {
listcontains "${FIRMWARE}" "rpi-eeprom" && enable_service rpi-flash-firmware.service listcontains "${FIRMWARE}" "rpi-eeprom" && enable_service rpi-flash-firmware.service
# cron support # cron support
if [ "$CRON_SUPPORT" = "yes" ] ; then if [ "${CRON_SUPPORT}" = "yes" ]; then
mkdir -p $INSTALL/usr/lib/systemd/system mkdir -p ${INSTALL}/usr/lib/systemd/system
cp $PKG_DIR/system.d.opt/cron.service $INSTALL/usr/lib/systemd/system cp ${PKG_DIR}/system.d.opt/cron.service ${INSTALL}/usr/lib/systemd/system
enable_service cron.service enable_service cron.service
mkdir -p $INSTALL/usr/share/services mkdir -p ${INSTALL}/usr/share/services
cp -P $PKG_DIR/default.d/*.conf $INSTALL/usr/share/services cp -P ${PKG_DIR}/default.d/*.conf ${INSTALL}/usr/share/services
cp $PKG_DIR/system.d.opt/cron-defaults.service $INSTALL/usr/lib/systemd/system cp ${PKG_DIR}/system.d.opt/cron-defaults.service ${INSTALL}/usr/lib/systemd/system
enable_service cron-defaults.service enable_service cron-defaults.service
fi fi
} }
makeinstall_init() { makeinstall_init() {
mkdir -p $INSTALL/bin mkdir -p ${INSTALL}/bin
ln -sf busybox $INSTALL/usr/bin/sh ln -sf busybox ${INSTALL}/usr/bin/sh
chmod 4755 $INSTALL/usr/bin/busybox chmod 4755 ${INSTALL}/usr/bin/busybox
mkdir -p $INSTALL/etc mkdir -p ${INSTALL}/etc
touch $INSTALL/etc/fstab touch ${INSTALL}/etc/fstab
ln -sf /proc/self/mounts $INSTALL/etc/mtab ln -sf /proc/self/mounts ${INSTALL}/etc/mtab
if find_file_path initramfs/platform_init; then if find_file_path initramfs/platform_init; then
cp ${FOUND_PATH} $INSTALL cp ${FOUND_PATH} ${INSTALL}
sed -e "s/@BOOT_LABEL@/$DISTRO_BOOTLABEL/g" \ sed -e "s/@BOOT_LABEL@/${DISTRO_BOOTLABEL}/g" \
-e "s/@DISK_LABEL@/$DISTRO_DISKLABEL/g" \ -e "s/@DISK_LABEL@/${DISTRO_DISKLABEL}/g" \
-i $INSTALL/platform_init -i ${INSTALL}/platform_init
chmod 755 $INSTALL/platform_init chmod 755 ${INSTALL}/platform_init
fi fi
cp $PKG_DIR/scripts/functions $INSTALL cp ${PKG_DIR}/scripts/functions ${INSTALL}
cp $PKG_DIR/scripts/init $INSTALL cp ${PKG_DIR}/scripts/init ${INSTALL}
sed -e "s/@DISTRONAME@/$DISTRONAME/g" \ sed -e "s/@DISTRONAME@/${DISTRONAME}/g" \
-e "s/@KERNEL_NAME@/$KERNEL_NAME/g" \ -e "s/@KERNEL_NAME@/${KERNEL_NAME}/g" \
-i $INSTALL/init -i ${INSTALL}/init
chmod 755 $INSTALL/init chmod 755 ${INSTALL}/init
} }

View File

@ -7,13 +7,13 @@ PKG_VERSION="1.13.18"
PKG_SHA256="8078f5c25e34ab907ce06905d969dc8ef0ccbec367e1e1707c7ecf8460f4254e" PKG_SHA256="8078f5c25e34ab907ce06905d969dc8ef0ccbec367e1e1707c7ecf8460f4254e"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="https://dbus.freedesktop.org" PKG_SITE="https://dbus.freedesktop.org"
PKG_URL="https://dbus.freedesktop.org/releases/$PKG_NAME/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_URL="https://dbus.freedesktop.org/releases/${PKG_NAME}/${PKG_NAME}-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_TARGET="toolchain expat systemd" PKG_DEPENDS_TARGET="toolchain expat systemd"
PKG_LONGDESC="D-Bus is a message bus, used for sending messages between applications." PKG_LONGDESC="D-Bus is a message bus, used for sending messages between applications."
PKG_TOOLCHAIN="configure" PKG_TOOLCHAIN="configure"
PKG_CONFIGURE_OPTS_TARGET="export ac_cv_have_abstract_sockets=yes \ PKG_CONFIGURE_OPTS_TARGET="export ac_cv_have_abstract_sockets=yes \
--with-sysroot=$SYSROOT_PREFIX \ --with-sysroot=${SYSROOT_PREFIX} \
--libexecdir=/usr/lib/dbus \ --libexecdir=/usr/lib/dbus \
--disable-verbose-mode \ --disable-verbose-mode \
--disable-asserts \ --disable-asserts \
@ -34,8 +34,8 @@ PKG_CONFIGURE_OPTS_TARGET="export ac_cv_have_abstract_sockets=yes \
--with-system-socket=/run/dbus/system_bus_socket" --with-system-socket=/run/dbus/system_bus_socket"
post_makeinstall_target() { post_makeinstall_target() {
rm -rf $INSTALL/etc/rc.d rm -rf ${INSTALL}/etc/rc.d
rm -rf $INSTALL/usr/lib/dbus-1.0/include rm -rf ${INSTALL}/usr/lib/dbus-1.0/include
} }
post_install() { post_install() {
@ -43,6 +43,6 @@ post_install() {
add_group dbus 81 add_group dbus 81
add_group netdev 497 add_group netdev 497
echo "chmod 4750 $INSTALL/usr/lib/dbus/dbus-daemon-launch-helper" >> $FAKEROOT_SCRIPT echo "chmod 4750 ${INSTALL}/usr/lib/dbus/dbus-daemon-launch-helper" >> ${FAKEROOT_SCRIPT}
echo "chown 0:81 $INSTALL/usr/lib/dbus/dbus-daemon-launch-helper" >> $FAKEROOT_SCRIPT echo "chown 0:81 ${INSTALL}/usr/lib/dbus/dbus-daemon-launch-helper" >> ${FAKEROOT_SCRIPT}
} }

View File

@ -7,21 +7,21 @@ PKG_VERSION="332.14"
PKG_SHA256="a46bec392661a02d9683355baf4442d494e2bcde0ffb094aacc1e57ddc03b3d4" PKG_SHA256="a46bec392661a02d9683355baf4442d494e2bcde0ffb094aacc1e57ddc03b3d4"
PKG_LICENSE="APSL" PKG_LICENSE="APSL"
PKG_SITE="http://src.gnu-darwin.org/DarwinSourceArchive/expanded/diskdev_cmds/" PKG_SITE="http://src.gnu-darwin.org/DarwinSourceArchive/expanded/diskdev_cmds/"
PKG_URL="http://www.opensource.apple.com/tarballs/diskdev_cmds/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_URL="http://www.opensource.apple.com/tarballs/diskdev_cmds/${PKG_NAME}-${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain openssl" PKG_DEPENDS_TARGET="toolchain openssl"
PKG_LONGDESC="The fsck and mkfs utliities for hfs and hfsplus filesystems." PKG_LONGDESC="The fsck and mkfs utliities for hfs and hfsplus filesystems."
pre_make_target() { pre_make_target() {
PKG_MAKE_OPTS_TARGET="-f Makefile.lnx CC=$CC" PKG_MAKE_OPTS_TARGET="-f Makefile.lnx CC=${CC}"
export CFLAGS="$TARGET_CFLAGS -g3 -Wall -I$PKG_BUILD/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -D LINUX=1 -D BSD=1" export CFLAGS="${TARGET_CFLAGS} -g3 -Wall -I${PKG_BUILD}/include -DDEBUG_BUILD=0 -D_FILE_OFFSET_BITS=64 -D LINUX=1 -D BSD=1"
} }
makeinstall_target() { makeinstall_target() {
mkdir -p $INSTALL/usr/sbin mkdir -p ${INSTALL}/usr/sbin
cp fsck_hfs.tproj/fsck_hfs $INSTALL/usr/sbin cp fsck_hfs.tproj/fsck_hfs ${INSTALL}/usr/sbin
ln -sf fsck_hfs $INSTALL/usr/sbin/fsck.hfs ln -sf fsck_hfs ${INSTALL}/usr/sbin/fsck.hfs
ln -sf fsck_hfs $INSTALL/usr/sbin/fsck.hfsplus ln -sf fsck_hfs ${INSTALL}/usr/sbin/fsck.hfsplus
} }
make_init() { make_init() {

View File

@ -7,7 +7,7 @@ PKG_VERSION="4.1"
PKG_SHA256="e6b2aca70ccc3fe3687365009dd94a2e18e82b688ed4e260e04b7412471cc173" PKG_SHA256="e6b2aca70ccc3fe3687365009dd94a2e18e82b688ed4e260e04b7412471cc173"
PKG_LICENSE="GPLv3" PKG_LICENSE="GPLv3"
PKG_SITE="https://github.com/dosfstools/dosfstools" PKG_SITE="https://github.com/dosfstools/dosfstools"
PKG_URL="https://github.com/dosfstools/dosfstools/releases/download/v$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_URL="https://github.com/dosfstools/dosfstools/releases/download/v${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_HOST="toolchain:host" PKG_DEPENDS_HOST="toolchain:host"
PKG_DEPENDS_TARGET="toolchain" PKG_DEPENDS_TARGET="toolchain"
PKG_DEPENDS_INIT="toolchain dosfstools" PKG_DEPENDS_INIT="toolchain dosfstools"
@ -26,17 +26,17 @@ make_init() {
} }
makeinstall_init() { makeinstall_init() {
mkdir -p $INSTALL/usr/sbin mkdir -p ${INSTALL}/usr/sbin
cp $(get_install_dir dosfstools:target)/usr/sbin/fsck.fat $INSTALL/usr/sbin cp $(get_install_dir dosfstools:target)/usr/sbin/fsck.fat ${INSTALL}/usr/sbin
ln -sf fsck.fat $INSTALL/usr/sbin/fsck.msdos ln -sf fsck.fat ${INSTALL}/usr/sbin/fsck.msdos
ln -sf fsck.fat $INSTALL/usr/sbin/fsck.vfat ln -sf fsck.fat ${INSTALL}/usr/sbin/fsck.vfat
} }
makeinstall_host() { makeinstall_host() {
mkdir -p $TOOLCHAIN/sbin mkdir -p ${TOOLCHAIN}/sbin
cp src/mkfs.fat $TOOLCHAIN/sbin cp src/mkfs.fat ${TOOLCHAIN}/sbin
ln -sf mkfs.fat $TOOLCHAIN/sbin/mkfs.vfat ln -sf mkfs.fat ${TOOLCHAIN}/sbin/mkfs.vfat
cp src/fsck.fat $TOOLCHAIN/sbin cp src/fsck.fat ${TOOLCHAIN}/sbin
ln -sf fsck.fat $TOOLCHAIN/sbin/fsck.vfat ln -sf fsck.fat ${TOOLCHAIN}/sbin/fsck.vfat
cp src/fatlabel $TOOLCHAIN/sbin cp src/fatlabel ${TOOLCHAIN}/sbin
} }

View File

@ -7,23 +7,23 @@ PKG_VERSION="1.45.6"
PKG_SHA256="ffa7ae6954395abdc50d0f8605d8be84736465afc53b8938ef473fcf7ff44256" PKG_SHA256="ffa7ae6954395abdc50d0f8605d8be84736465afc53b8938ef473fcf7ff44256"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="http://e2fsprogs.sourceforge.net/" PKG_SITE="http://e2fsprogs.sourceforge.net/"
PKG_URL="https://www.kernel.org/pub/linux/kernel/people/tytso/$PKG_NAME/v$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_URL="https://www.kernel.org/pub/linux/kernel/people/tytso/${PKG_NAME}/v${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_HOST="toolchain:host" PKG_DEPENDS_HOST="toolchain:host"
PKG_DEPENDS_TARGET="toolchain" PKG_DEPENDS_TARGET="toolchain"
PKG_DEPENDS_INIT="toolchain" PKG_DEPENDS_INIT="toolchain"
PKG_LONGDESC="The filesystem utilities for the EXT2 filesystem, including e2fsck, mke2fs, dumpe2fs, fsck, and others." PKG_LONGDESC="The filesystem utilities for the EXT2 filesystem, including e2fsck, mke2fs, dumpe2fs, fsck, and others."
PKG_BUILD_FLAGS="-parallel" PKG_BUILD_FLAGS="-parallel"
if [ "$HFSTOOLS" = "yes" ]; then if [ "${HFSTOOLS}" = "yes" ]; then
PKG_DEPENDS_TARGET="$PKG_DEPENDS_TARGET diskdev_cmds" PKG_DEPENDS_TARGET+=" diskdev_cmds"
fi fi
PKG_CONFIGURE_OPTS_HOST="--prefix=$TOOLCHAIN/ \ PKG_CONFIGURE_OPTS_HOST="--prefix=${TOOLCHAIN}/ \
--bindir=$TOOLCHAIN/bin \ --bindir=${TOOLCHAIN}/bin \
--with-udev-rules-dir=no \ --with-udev-rules-dir=no \
--with-crond-dir=no \ --with-crond-dir=no \
--with-systemd-unit-dir=no \ --with-systemd-unit-dir=no \
--sbindir=$TOOLCHAIN/sbin \ --sbindir=${TOOLCHAIN}/sbin \
--enable-verbose-makecmds \ --enable-verbose-makecmds \
--disable-symlink-install \ --disable-symlink-install \
--disable-symlink-build \ --disable-symlink-build \
@ -42,7 +42,7 @@ PKG_CONFIGURE_OPTS_HOST="--prefix=$TOOLCHAIN/ \
--with-gnu-ld" --with-gnu-ld"
pre_configure() { pre_configure() {
PKG_CONFIGURE_OPTS_INIT="BUILD_CC=$HOST_CC \ PKG_CONFIGURE_OPTS_INIT="BUILD_CC=${HOST_CC} \
--with-udev-rules-dir=no \ --with-udev-rules-dir=no \
--with-crond-dir=no \ --with-crond-dir=no \
--with-systemd-unit-dir=no \ --with-systemd-unit-dir=no \
@ -70,44 +70,44 @@ pre_configure() {
--disable-fuse2fs \ --disable-fuse2fs \
--with-gnu-ld" --with-gnu-ld"
PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_INIT" PKG_CONFIGURE_OPTS_TARGET="${PKG_CONFIGURE_OPTS_INIT}"
} }
post_makeinstall_target() { post_makeinstall_target() {
make -C lib/et LIBMODE=644 DESTDIR=$SYSROOT_PREFIX install make -C lib/et LIBMODE=644 DESTDIR=${SYSROOT_PREFIX} install
rm -rf $INSTALL/usr/sbin/badblocks rm -rf ${INSTALL}/usr/sbin/badblocks
rm -rf $INSTALL/usr/sbin/blkid rm -rf ${INSTALL}/usr/sbin/blkid
rm -rf $INSTALL/usr/sbin/dumpe2fs rm -rf ${INSTALL}/usr/sbin/dumpe2fs
rm -rf $INSTALL/usr/sbin/e2freefrag rm -rf ${INSTALL}/usr/sbin/e2freefrag
rm -rf $INSTALL/usr/sbin/e2undo rm -rf ${INSTALL}/usr/sbin/e2undo
rm -rf $INSTALL/usr/sbin/e4defrag rm -rf ${INSTALL}/usr/sbin/e4defrag
rm -rf $INSTALL/usr/sbin/filefrag rm -rf ${INSTALL}/usr/sbin/filefrag
rm -rf $INSTALL/usr/sbin/fsck rm -rf ${INSTALL}/usr/sbin/fsck
rm -rf $INSTALL/usr/sbin/logsave rm -rf ${INSTALL}/usr/sbin/logsave
rm -rf $INSTALL/usr/sbin/mklost+found rm -rf ${INSTALL}/usr/sbin/mklost+found
} }
makeinstall_init() { makeinstall_init() {
mkdir -p $INSTALL/usr/sbin mkdir -p ${INSTALL}/usr/sbin
cp e2fsck/e2fsck $INSTALL/usr/sbin cp e2fsck/e2fsck ${INSTALL}/usr/sbin
ln -sf e2fsck $INSTALL/usr/sbin/fsck.ext2 ln -sf e2fsck ${INSTALL}/usr/sbin/fsck.ext2
ln -sf e2fsck $INSTALL/usr/sbin/fsck.ext3 ln -sf e2fsck ${INSTALL}/usr/sbin/fsck.ext3
ln -sf e2fsck $INSTALL/usr/sbin/fsck.ext4 ln -sf e2fsck ${INSTALL}/usr/sbin/fsck.ext4
if [ $INITRAMFS_PARTED_SUPPORT = "yes" ]; then if [ ${INITRAMFS_PARTED_SUPPORT} = "yes" ]; then
cp misc/mke2fs $INSTALL/usr/sbin cp misc/mke2fs ${INSTALL}/usr/sbin
ln -sf mke2fs $INSTALL/usr/sbin/mkfs.ext2 ln -sf mke2fs ${INSTALL}/usr/sbin/mkfs.ext2
ln -sf mke2fs $INSTALL/usr/sbin/mkfs.ext3 ln -sf mke2fs ${INSTALL}/usr/sbin/mkfs.ext3
ln -sf mke2fs $INSTALL/usr/sbin/mkfs.ext4 ln -sf mke2fs ${INSTALL}/usr/sbin/mkfs.ext4
fi fi
} }
makeinstall_host() { makeinstall_host() {
make -C lib/et LIBMODE=644 install make -C lib/et LIBMODE=644 install
make -C lib/ext2fs LIBMODE=644 install make -C lib/ext2fs LIBMODE=644 install
mkdir -p $TOOLCHAIN/sbin mkdir -p ${TOOLCHAIN}/sbin
cp e2fsck/e2fsck $TOOLCHAIN/sbin cp e2fsck/e2fsck ${TOOLCHAIN}/sbin
cp misc/mke2fs $TOOLCHAIN/sbin cp misc/mke2fs ${TOOLCHAIN}/sbin
cp misc/tune2fs $TOOLCHAIN/sbin cp misc/tune2fs ${TOOLCHAIN}/sbin
} }

View File

@ -11,11 +11,11 @@ PKG_LONGDESC="A simple way to add entropy at boot"
PKG_TOOLCHAIN="manual" PKG_TOOLCHAIN="manual"
makeinstall_target() { makeinstall_target() {
mkdir -p $INSTALL/usr/lib/entropy mkdir -p ${INSTALL}/usr/lib/entropy
cp add-entropy $INSTALL/usr/lib/entropy cp add-entropy ${INSTALL}/usr/lib/entropy
cp add-random-at-shutdown $INSTALL/usr/lib/entropy cp add-random-at-shutdown ${INSTALL}/usr/lib/entropy
chmod +x $INSTALL/usr/lib/entropy/* chmod +x ${INSTALL}/usr/lib/entropy/*
} }
post_install() { post_install() {

View File

@ -8,8 +8,8 @@ PKG_LONGDESC="ethmactool: udev rule for obtaining real MAC address or creating a
PKG_TOOLCHAIN="manual" PKG_TOOLCHAIN="manual"
makeinstall_target() { makeinstall_target() {
mkdir -p $INSTALL/usr/bin mkdir -p ${INSTALL}/usr/bin
cp $PKG_DIR/scripts/ethmactool-config $INSTALL/usr/bin cp ${PKG_DIR}/scripts/ethmactool-config ${INSTALL}/usr/bin
} }
post_install() { post_install() {

View File

@ -6,7 +6,7 @@ PKG_VERSION="3b753e91ae8c28dc34dd017a354d72b3c0715309"
PKG_SHA256="4eca52d0570fa568b3296a2c9bc2af252423e25c1a67654bd79680fc5a93092a" PKG_SHA256="4eca52d0570fa568b3296a2c9bc2af252423e25c1a67654bd79680fc5a93092a"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="https://github.com/LibreELEC/eventlircd" PKG_SITE="https://github.com/LibreELEC/eventlircd"
PKG_URL="https://github.com/LibreELEC/eventlircd/archive/$PKG_VERSION.tar.gz" PKG_URL="https://github.com/LibreELEC/eventlircd/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain systemd lirc" PKG_DEPENDS_TARGET="toolchain systemd lirc"
PKG_LONGDESC="The eventlircd daemon provides four functions for LIRC devices" PKG_LONGDESC="The eventlircd daemon provides four functions for LIRC devices"
PKG_TOOLCHAIN="autotools" PKG_TOOLCHAIN="autotools"
@ -16,12 +16,12 @@ PKG_CONFIGURE_OPTS_TARGET="--with-udev-dir=/usr/lib/udev \
post_makeinstall_target() { post_makeinstall_target() {
# install our own evmap files and udev rules # install our own evmap files and udev rules
rm -rf $INSTALL/etc/eventlircd.d rm -rf ${INSTALL}/etc/eventlircd.d
rm -rf $INSTALL/usr/lib/udev/rules.d rm -rf ${INSTALL}/usr/lib/udev/rules.d
rm -rf $INSTALL/usr/lib/udev/lircd_helper rm -rf ${INSTALL}/usr/lib/udev/lircd_helper
mkdir -p $INSTALL/etc/eventlircd.d mkdir -p ${INSTALL}/etc/eventlircd.d
cp $PKG_DIR/evmap/*.evmap $INSTALL/etc/eventlircd.d cp ${PKG_DIR}/evmap/*.evmap ${INSTALL}/etc/eventlircd.d
} }
post_install() { post_install() {

View File

@ -6,7 +6,7 @@ PKG_VERSION="0.0.1"
PKG_SHA256="f1d14a12d700b9650562f8ec8ca593e6033f2e18b3d1fd1f44af29875152547e" PKG_SHA256="f1d14a12d700b9650562f8ec8ca593e6033f2e18b3d1fd1f44af29875152547e"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="https://github.com/HiassofT/evrepeat" PKG_SITE="https://github.com/HiassofT/evrepeat"
PKG_URL="https://github.com/HiassofT/evrepeat/archive/$PKG_VERSION.tar.gz" PKG_URL="https://github.com/HiassofT/evrepeat/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain" PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="Tool to view and change linux input device repeat settings" PKG_LONGDESC="Tool to view and change linux input device repeat settings"

View File

@ -7,7 +7,7 @@ PKG_VERSION="2.9.9"
PKG_SHA256="d0e69d5d608cc22ff4843791ad097f554dd32540ddc9bed7638cc6fea7c1b4b5" PKG_SHA256="d0e69d5d608cc22ff4843791ad097f554dd32540ddc9bed7638cc6fea7c1b4b5"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="https://github.com/libfuse/libfuse/" PKG_SITE="https://github.com/libfuse/libfuse/"
PKG_URL="https://github.com/libfuse/libfuse/releases/download/$PKG_NAME-$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_URL="https://github.com/libfuse/libfuse/releases/download/${PKG_NAME}-${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain" PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="FUSE provides a simple interface for userspace programs to export a virtual filesystem to the Linux kernel." PKG_LONGDESC="FUSE provides a simple interface for userspace programs to export a virtual filesystem to the Linux kernel."
# fuse fails to build with GOLD linker on gcc-4.9 # fuse fails to build with GOLD linker on gcc-4.9
@ -22,6 +22,6 @@ PKG_CONFIGURE_OPTS_TARGET="MOUNT_FUSE_PATH=/usr/sbin \
--with-gnu-ld" --with-gnu-ld"
post_makeinstall_target() { post_makeinstall_target() {
rm -rf $INSTALL/etc/init.d rm -rf ${INSTALL}/etc/init.d
rm -rf $INSTALL/etc/udev rm -rf ${INSTALL}/etc/udev
} }

View File

@ -6,15 +6,15 @@ PKG_VERSION="1.0.6"
PKG_SHA256="ddc551d643a53f0bd4440345d3ae32c49b04a797e9c01036ea460b6bb4168ca8" PKG_SHA256="ddc551d643a53f0bd4440345d3ae32c49b04a797e9c01036ea460b6bb4168ca8"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="http://www.rodsbooks.com/gdisk/" PKG_SITE="http://www.rodsbooks.com/gdisk/"
PKG_URL="https://downloads.sourceforge.net/project/$PKG_NAME/$PKG_NAME/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_URL="https://downloads.sourceforge.net/project/${PKG_NAME}/${PKG_NAME}/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain popt crossguid" PKG_DEPENDS_TARGET="toolchain popt crossguid"
PKG_LONGDESC="GPT text-mode partitioning tools" PKG_LONGDESC="GPT text-mode partitioning tools"
make_target() { make_target() {
make sgdisk "CC=$CC" "CXX=$CXX" make sgdisk "CC=${CC}" "CXX=${CXX}"
} }
makeinstall_target() { makeinstall_target() {
mkdir -p $INSTALL/usr/sbin/ mkdir -p ${INSTALL}/usr/sbin/
cp -p sgdisk $INSTALL/usr/sbin/ cp -p sgdisk ${INSTALL}/usr/sbin/
} }

View File

@ -6,11 +6,11 @@ PKG_VERSION="1.20.0"
PKG_SHA256="aaf2b3d0cf3086317a4ee9c2a80af2520b59b303a71238742ee8bc20c4f2bbb6" PKG_SHA256="aaf2b3d0cf3086317a4ee9c2a80af2520b59b303a71238742ee8bc20c4f2bbb6"
PKG_LICENSE="GPLv2+" PKG_LICENSE="GPLv2+"
PKG_SITE="https://linuxtv.org/" PKG_SITE="https://linuxtv.org/"
PKG_URL="https://github.com/LibreELEC/ir-bpf-decoders/archive/v4l-utils-$PKG_VERSION.tar.gz" PKG_URL="https://github.com/LibreELEC/ir-bpf-decoders/archive/v4l-utils-${PKG_VERSION}.tar.gz"
PKG_LONGDESC="ir-bpf-decoders: precompiled binaries of IR BPF decoders from v4l-utils utils/keytable/bpf_protocols" PKG_LONGDESC="ir-bpf-decoders: precompiled binaries of IR BPF decoders from v4l-utils utils/keytable/bpf_protocols"
PKG_TOOLCHAIN="manual" PKG_TOOLCHAIN="manual"
makeinstall_target() { makeinstall_target() {
mkdir -p $INSTALL/usr/lib/udev/rc_keymaps/protocols mkdir -p ${INSTALL}/usr/lib/udev/rc_keymaps/protocols
cp $PKG_BUILD/*.o $INSTALL/usr/lib/udev/rc_keymaps/protocols cp ${PKG_BUILD}/*.o ${INSTALL}/usr/lib/udev/rc_keymaps/protocols
} }

View File

@ -7,16 +7,16 @@ PKG_VERSION="1.6.3"
PKG_SHA256="a61d5706136ae4c05bd48f86186bcfdbd88dd8bd5107e3e195c924cfc1b39bb4" PKG_SHA256="a61d5706136ae4c05bd48f86186bcfdbd88dd8bd5107e3e195c924cfc1b39bb4"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/" PKG_SITE="https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/"
PKG_URL="https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/snapshot/$PKG_NAME-$PKG_VERSION.tar.gz" PKG_URL="https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git/snapshot/${PKG_NAME}-${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain" PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="Keyutils is a set of utilities for managing the key retention facility in the kernel." PKG_LONGDESC="Keyutils is a set of utilities for managing the key retention facility in the kernel."
PKG_BUILD_FLAGS="+pic" PKG_BUILD_FLAGS="+pic"
PKG_MAKE_OPTS_TARGET="NO_ARLIB=0 NO_SOLIB=1 BINDIR=/usr/bin SBINDIR=/usr/sbin LIBDIR=/usr/lib USRLIBDIR=/usr/lib" PKG_MAKE_OPTS_TARGET="NO_ARLIB=0 NO_SOLIB=1 BINDIR=/usr/bin SBINDIR=/usr/sbin LIBDIR=/usr/lib USRLIBDIR=/usr/lib"
PKG_MAKEINSTALL_OPTS_TARGET="$PKG_MAKE_OPTS_TARGET" PKG_MAKEINSTALL_OPTS_TARGET="${PKG_MAKE_OPTS_TARGET}"
post_makeinstall_target() { post_makeinstall_target() {
rm -rf $INSTALL/usr/share rm -rf ${INSTALL}/usr/share
rmdir $INSTALL/etc/request-key.d rmdir ${INSTALL}/etc/request-key.d
ln -sf /storage/.config/request-key.d $INSTALL/etc/request-key.d ln -sf /storage/.config/request-key.d ${INSTALL}/etc/request-key.d
} }

View File

@ -6,7 +6,7 @@ PKG_VERSION="28"
PKG_SHA256="3969fc0f13daa98084256337081c442f8749310089e48aa695c9b4dfe1b3a26c" PKG_SHA256="3969fc0f13daa98084256337081c442f8749310089e48aa695c9b4dfe1b3a26c"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git" PKG_SITE="https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git"
PKG_URL="https://www.kernel.org/pub/linux/utils/kernel/kmod/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_URL="https://www.kernel.org/pub/linux/utils/kernel/kmod/${PKG_NAME}-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_HOST="toolchain:host" PKG_DEPENDS_HOST="toolchain:host"
PKG_DEPENDS_TARGET="toolchain" PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="kmod offers the needed flexibility and fine grained control over insertion, removal, configuration and listing of kernel modules." PKG_LONGDESC="kmod offers the needed flexibility and fine grained control over insertion, removal, configuration and listing of kernel modules."
@ -30,22 +30,22 @@ PKG_CONFIGURE_OPTS_TARGET="--enable-tools \
--without-zstd" --without-zstd"
post_makeinstall_host() { post_makeinstall_host() {
ln -sf kmod $TOOLCHAIN/bin/depmod ln -sf kmod ${TOOLCHAIN}/bin/depmod
} }
post_makeinstall_target() { post_makeinstall_target() {
# make symlinks for compatibility # make symlinks for compatibility
mkdir -p $INSTALL/usr/sbin mkdir -p ${INSTALL}/usr/sbin
ln -sf /usr/bin/kmod $INSTALL/usr/sbin/lsmod ln -sf /usr/bin/kmod ${INSTALL}/usr/sbin/lsmod
ln -sf /usr/bin/kmod $INSTALL/usr/sbin/insmod ln -sf /usr/bin/kmod ${INSTALL}/usr/sbin/insmod
ln -sf /usr/bin/kmod $INSTALL/usr/sbin/rmmod ln -sf /usr/bin/kmod ${INSTALL}/usr/sbin/rmmod
ln -sf /usr/bin/kmod $INSTALL/usr/sbin/modinfo ln -sf /usr/bin/kmod ${INSTALL}/usr/sbin/modinfo
ln -sf /usr/bin/kmod $INSTALL/usr/sbin/modprobe ln -sf /usr/bin/kmod ${INSTALL}/usr/sbin/modprobe
ln -sf /usr/bin/kmod $INSTALL/usr/sbin/depmod ln -sf /usr/bin/kmod ${INSTALL}/usr/sbin/depmod
mkdir -p $INSTALL/etc mkdir -p ${INSTALL}/etc
ln -sf /storage/.config/modprobe.d $INSTALL/etc/modprobe.d ln -sf /storage/.config/modprobe.d ${INSTALL}/etc/modprobe.d
# add user modprobe.d dir # add user modprobe.d dir
mkdir -p $INSTALL/usr/config/modprobe.d mkdir -p ${INSTALL}/usr/config/modprobe.d
} }

View File

@ -7,7 +7,7 @@ PKG_VERSION="1.10.1"
PKG_SHA256="0330fe8357ece915db9366c1b9a6648941aea6f724b73ad6e71401127aa08932" PKG_SHA256="0330fe8357ece915db9366c1b9a6648941aea6f724b73ad6e71401127aa08932"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="http://www.freedesktop.org/wiki/Software/libevdev/" PKG_SITE="http://www.freedesktop.org/wiki/Software/libevdev/"
PKG_URL="http://www.freedesktop.org/software/libevdev/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_URL="http://www.freedesktop.org/software/libevdev/${PKG_NAME}-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_TARGET="toolchain" PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="libevdev is a wrapper library for evdev devices." PKG_LONGDESC="libevdev is a wrapper library for evdev devices."
PKG_BUILD_FLAGS="+pic" PKG_BUILD_FLAGS="+pic"
@ -19,5 +19,5 @@ PKG_MESON_OPTS_TARGET=" \
-Dtests=disabled" -Dtests=disabled"
post_makeinstall_target() { post_makeinstall_target() {
rm -rf $INSTALL/usr/bin rm -rf ${INSTALL}/usr/bin
} }

View File

@ -7,7 +7,7 @@ PKG_VERSION="9bbcb6484c91e2594614412e12ae85a144839634" # 0.2.17 + fixes
PKG_SHA256="983c6fa0b46b67805a81eb600a6c4728b645ac7b014b4897d5aa212576105567" PKG_SHA256="983c6fa0b46b67805a81eb600a6c4728b645ac7b014b4897d5aa212576105567"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="http://libhid.alioth.debian.org/" PKG_SITE="http://libhid.alioth.debian.org/"
PKG_URL="https://github.com/chad3814/libhid/archive/$PKG_VERSION.tar.gz" PKG_URL="https://github.com/chad3814/libhid/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain libusb-compat libusb" PKG_DEPENDS_TARGET="toolchain libusb-compat libusb"
PKG_LONGDESC="libhid provides a generic and flexible way to access and interact with USB HID devices." PKG_LONGDESC="libhid provides a generic and flexible way to access and interact with USB HID devices."
PKG_TOOLCHAIN="autotools" PKG_TOOLCHAIN="autotools"
@ -18,5 +18,5 @@ PKG_CONFIGURE_OPTS_TARGET="--disable-shared \
--disable-swig" --disable-swig"
post_makeinstall_target() { post_makeinstall_target() {
rm -rf $INSTALL/usr rm -rf ${INSTALL}/usr
} }

View File

@ -13,6 +13,6 @@ PKG_LONGDESC="The libusb project's aim is to create a Library for use by user le
PKG_CONFIGURE_OPTS_TARGET="--disable-log --disable-debug-log --disable-examples-build" PKG_CONFIGURE_OPTS_TARGET="--disable-log --disable-debug-log --disable-examples-build"
post_makeinstall_target() { post_makeinstall_target() {
rm -rf $INSTALL/usr/bin rm -rf ${INSTALL}/usr/bin
sed -e "s:\(['= ]\)/usr:\\1$SYSROOT_PREFIX/usr:g" -i $SYSROOT_PREFIX/usr/bin/libusb-config sed -e "s:\(['= ]\)/usr:\\1${SYSROOT_PREFIX}/usr:g" -i ${SYSROOT_PREFIX}/usr/bin/libusb-config
} }

View File

@ -7,7 +7,7 @@ PKG_VERSION="0.10.1"
PKG_SHA256="8b753c60df2a7f5dcda2db72c38e448ca300c3b4f6000c1501fcb0bd5df414f2" PKG_SHA256="8b753c60df2a7f5dcda2db72c38e448ca300c3b4f6000c1501fcb0bd5df414f2"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="http://www.lirc.org" PKG_SITE="http://www.lirc.org"
PKG_URL="https://sourceforge.net/projects/lirc/files/LIRC/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_URL="https://sourceforge.net/projects/lirc/files/LIRC/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.bz2"
PKG_DEPENDS_TARGET="toolchain libftdi1 libusb-compat libxslt alsa-lib" PKG_DEPENDS_TARGET="toolchain libftdi1 libusb-compat libxslt alsa-lib"
PKG_LONGDESC="LIRC is a package that allows you to decode and send infra-red signals." PKG_LONGDESC="LIRC is a package that allows you to decode and send infra-red signals."
PKG_TOOLCHAIN="autotools" PKG_TOOLCHAIN="autotools"
@ -23,7 +23,7 @@ pre_configure_target() {
export HAVE_UINPUT=yes export HAVE_UINPUT=yes
export PYTHON=: export PYTHON=:
export PYTHON_VERSION=${PKG_PYTHON_VERSION#python} export PYTHON_VERSION=${PKG_PYTHON_VERSION#python}
if [ -e ${SYSROOT_PREFIX}/usr/include/linux/input-event-codes.h ] ; then if [ -e ${SYSROOT_PREFIX}/usr/include/linux/input-event-codes.h ]; then
export DEVINPUT_HEADER=${SYSROOT_PREFIX}/usr/include/linux/input-event-codes.h export DEVINPUT_HEADER=${SYSROOT_PREFIX}/usr/include/linux/input-event-codes.h
else else
export DEVINPUT_HEADER=${SYSROOT_PREFIX}/usr/include/linux/input.h export DEVINPUT_HEADER=${SYSROOT_PREFIX}/usr/include/linux/input.h
@ -31,21 +31,21 @@ pre_configure_target() {
} }
post_makeinstall_target() { post_makeinstall_target() {
rm -rf $INSTALL/usr/lib/systemd rm -rf ${INSTALL}/usr/lib/systemd
rm -rf $INSTALL/lib rm -rf ${INSTALL}/lib
rm -rf $INSTALL/usr/share rm -rf ${INSTALL}/usr/share
rm -rf $INSTALL/etc rm -rf ${INSTALL}/etc
mkdir -p $INSTALL/etc/lirc mkdir -p ${INSTALL}/etc/lirc
cp -r $PKG_DIR/config/lirc_options.conf $INSTALL/etc/lirc cp -r ${PKG_DIR}/config/lirc_options.conf ${INSTALL}/etc/lirc
ln -s /storage/.config/lircd.conf $INSTALL/etc/lirc/lircd.conf ln -s /storage/.config/lircd.conf ${INSTALL}/etc/lirc/lircd.conf
mkdir -p $INSTALL/usr/lib/libreelec mkdir -p ${INSTALL}/usr/lib/libreelec
cp $PKG_DIR/scripts/lircd_helper $INSTALL/usr/lib/libreelec cp ${PKG_DIR}/scripts/lircd_helper ${INSTALL}/usr/lib/libreelec
cp $PKG_DIR/scripts/lircd_uinput_helper $INSTALL/usr/lib/libreelec cp ${PKG_DIR}/scripts/lircd_uinput_helper ${INSTALL}/usr/lib/libreelec
mkdir -p $INSTALL/usr/share/services mkdir -p ${INSTALL}/usr/share/services
cp -P $PKG_DIR/default.d/*.conf $INSTALL/usr/share/services cp -P ${PKG_DIR}/default.d/*.conf ${INSTALL}/usr/share/services
} }
post_install() { post_install() {

View File

@ -7,7 +7,7 @@ PKG_VERSION="2017.3.23AR.5"
PKG_SHA256="04ccf583b495806cefb71850e5899e50aed5e7bf23365259f2badaa9af21e5ed" PKG_SHA256="04ccf583b495806cefb71850e5899e50aed5e7bf23365259f2badaa9af21e5ed"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="https://jp-andre.pagesperso-orange.fr/" PKG_SITE="https://jp-andre.pagesperso-orange.fr/"
PKG_URL="https://jp-andre.pagesperso-orange.fr/$PKG_NAME-$PKG_VERSION.tgz" PKG_URL="https://jp-andre.pagesperso-orange.fr/${PKG_NAME}-${PKG_VERSION}.tgz"
PKG_DEPENDS_TARGET="toolchain fuse libgcrypt" PKG_DEPENDS_TARGET="toolchain fuse libgcrypt"
PKG_LONGDESC="A NTFS driver with read and write support." PKG_LONGDESC="A NTFS driver with read and write support."
PKG_TOOLCHAIN="autotools" PKG_TOOLCHAIN="autotools"
@ -25,18 +25,18 @@ PKG_CONFIGURE_OPTS_TARGET="--exec-prefix=/usr/ \
post_makeinstall_target() { post_makeinstall_target() {
# dont include ntfsprogs. # dont include ntfsprogs.
for i in $INSTALL/usr/bin/*; do for i in ${INSTALL}/usr/bin/*; do
if [ "$(basename $i)" != "ntfs-3g" ]; then if [ "$(basename ${i})" != "ntfs-3g" ]; then
rm $i rm ${i}
fi fi
done done
rm -rf $INSTALL/sbin rm -rf ${INSTALL}/sbin
rm -rf $INSTALL/usr/sbin/ntfsclone rm -rf ${INSTALL}/usr/sbin/ntfsclone
rm -rf $INSTALL/usr/sbin/ntfscp rm -rf ${INSTALL}/usr/sbin/ntfscp
rm -rf $INSTALL/usr/sbin/ntfsundelete rm -rf ${INSTALL}/usr/sbin/ntfsundelete
mkdir -p $INSTALL/usr/sbin mkdir -p ${INSTALL}/usr/sbin
ln -sf /usr/bin/ntfs-3g $INSTALL/usr/sbin/mount.ntfs ln -sf /usr/bin/ntfs-3g ${INSTALL}/usr/sbin/mount.ntfs
ln -sf /usr/sbin/mkntfs $INSTALL/usr/sbin/mkfs.ntfs ln -sf /usr/sbin/mkntfs ${INSTALL}/usr/sbin/mkfs.ntfs
} }

View File

@ -7,7 +7,7 @@ PKG_VERSION="bf399411ed8a2f4047f928653ac8dd02ffd0f662"
PKG_SHA256="92b9f0a27a9a373b14eab7b12f1bfff5d4857695a688dc4434df8e7623354588" PKG_SHA256="92b9f0a27a9a373b14eab7b12f1bfff5d4857695a688dc4434df8e7623354588"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="https://github.com/mikechristie/open-iscsi" PKG_SITE="https://github.com/mikechristie/open-iscsi"
PKG_URL="https://github.com/mikechristie/open-iscsi/archive/$PKG_VERSION.tar.gz" PKG_URL="https://github.com/mikechristie/open-iscsi/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_INIT="toolchain util-linux" PKG_DEPENDS_INIT="toolchain util-linux"
PKG_LONGDESC="The open-iscsi package allows you to mount iSCSI targets." PKG_LONGDESC="The open-iscsi package allows you to mount iSCSI targets."
PKG_TOOLCHAIN="configure" PKG_TOOLCHAIN="configure"
@ -15,18 +15,18 @@ PKG_TOOLCHAIN="configure"
PKG_MAKE_OPTS_INIT="user" PKG_MAKE_OPTS_INIT="user"
pre_configure_init() { pre_configure_init() {
export OPTFLAGS="$CFLAGS $LDFLAGS" export OPTFLAGS="${CFLAGS} ${LDFLAGS}"
} }
configure_init() { configure_init() {
cd utils/open-isns cd utils/open-isns
./configure --host=$TARGET_NAME \ ./configure --host=${TARGET_NAME} \
--build=$HOST_NAME \ --build=${HOST_NAME} \
--with-security=no --with-security=no
cd ../.. cd ../..
} }
makeinstall_init() { makeinstall_init() {
mkdir -p $INSTALL/usr/sbin mkdir -p ${INSTALL}/usr/sbin
cp -P $PKG_BUILD/usr/iscsistart $INSTALL/usr/sbin cp -P ${PKG_BUILD}/usr/iscsistart ${INSTALL}/usr/sbin
} }

View File

@ -26,14 +26,14 @@ PKG_CONFIGURE_OPTS_TARGET="--disable-docs \
--without-icu \ --without-icu \
--without-kernel-modules \ --without-kernel-modules \
--with-udev-rules-dir=/usr/lib/udev/rules.d/ \ --with-udev-rules-dir=/usr/lib/udev/rules.d/ \
--with-sysroot=$SYSROOT_PREFIX" --with-sysroot=${SYSROOT_PREFIX}"
post_unpack() { post_unpack() {
mv $PKG_BUILD/$PKG_NAME/* $PKG_BUILD/ mv ${PKG_BUILD}/${PKG_NAME}/* ${PKG_BUILD}/
sed -e 's|.*common-agent/etc/config/Makefile.*||' -i $PKG_BUILD/configure.ac sed -e 's|.*common-agent/etc/config/Makefile.*||' -i ${PKG_BUILD}/configure.ac
mkdir -p $PKG_BUILD/common-agent/etc/config mkdir -p ${PKG_BUILD}/common-agent/etc/config
# Hack to allow package to be bumped without linking against old libraries # Hack to allow package to be bumped without linking against old libraries
rm -f ${SYSROOT_PREFIX}/usr/lib/libvmtools* rm -f ${SYSROOT_PREFIX}/usr/lib/libvmtools*
@ -44,13 +44,13 @@ pre_configure_target() {
} }
post_makeinstall_target() { post_makeinstall_target() {
rm -rf $INSTALL/sbin rm -rf ${INSTALL}/sbin
rm -rf $INSTALL/usr/share rm -rf ${INSTALL}/usr/share
rm -rf $INSTALL/etc/vmware-tools/scripts/vmware/network rm -rf ${INSTALL}/etc/vmware-tools/scripts/vmware/network
chmod -x $INSTALL/usr/lib/udev/rules.d/*.rules chmod -x ${INSTALL}/usr/lib/udev/rules.d/*.rules
find $INSTALL/etc/vmware-tools/ -type f | xargs sed -i '/.*expr.*/d' find ${INSTALL}/etc/vmware-tools/ -type f | xargs sed -i '/.*expr.*/d'
} }
post_install() { post_install() {

View File

@ -7,7 +7,7 @@ PKG_VERSION="3.3"
PKG_SHA256="57e2b4bd87018625c515421d4524f6e3b55175b472302056391c5f7eccb83d44" PKG_SHA256="57e2b4bd87018625c515421d4524f6e3b55175b472302056391c5f7eccb83d44"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="http://www.gnu.org/software/parted/" PKG_SITE="http://www.gnu.org/software/parted/"
PKG_URL="http://ftpmirror.gnu.org/parted/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_URL="http://ftpmirror.gnu.org/parted/${PKG_NAME}-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_HOST="toolchain:host util-linux:host" PKG_DEPENDS_HOST="toolchain:host util-linux:host"
PKG_DEPENDS_TARGET="toolchain util-linux parted:host" PKG_DEPENDS_TARGET="toolchain util-linux parted:host"
PKG_DEPENDS_INIT="toolchain util-linux:init parted" PKG_DEPENDS_INIT="toolchain util-linux:init parted"
@ -19,7 +19,7 @@ PKG_CONFIGURE_OPTS_TARGET="--disable-device-mapper \
--disable-rpath \ --disable-rpath \
--with-gnu-ld" --with-gnu-ld"
PKG_CONFIGURE_OPTS_HOST="$PKG_CONFIGURE_OPTS_TARGET" PKG_CONFIGURE_OPTS_HOST="${PKG_CONFIGURE_OPTS_TARGET}"
pre_configure_init() { pre_configure_init() {
: # reuse pre_configure_target() : # reuse pre_configure_target()
@ -34,11 +34,11 @@ make_init() {
} }
makeinstall_init() { makeinstall_init() {
mkdir -p $INSTALL/sbin mkdir -p ${INSTALL}/sbin
cp ../.$TARGET_NAME/parted/parted $INSTALL/sbin cp ../.${TARGET_NAME}/parted/parted ${INSTALL}/sbin
cp ../.$TARGET_NAME/partprobe/partprobe $INSTALL/sbin cp ../.${TARGET_NAME}/partprobe/partprobe ${INSTALL}/sbin
} }
pre_configure_target() { pre_configure_target() {
export CFLAGS+=" -I$PKG_BUILD/lib" export CFLAGS+=" -I${PKG_BUILD}/lib"
} }

View File

@ -8,31 +8,31 @@ PKG_SHA256="9d40b97be8b6a2cdf96aead5a61881d1f7e4e0da9544a9bac4fba1ae9dcd40eb"
PKG_ARCH="x86_64" PKG_ARCH="x86_64"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="http://mj.ucw.cz/pciutils.shtml" PKG_SITE="http://mj.ucw.cz/pciutils.shtml"
PKG_URL="http://www.kernel.org/pub/software/utils/pciutils/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_URL="http://www.kernel.org/pub/software/utils/pciutils/${PKG_NAME}-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_TARGET="toolchain kmod systemd" PKG_DEPENDS_TARGET="toolchain kmod systemd"
PKG_LONGDESC="Utilities for inspecting devices connected to the PCI bus and the PCI vendor/product ID database." PKG_LONGDESC="Utilities for inspecting devices connected to the PCI bus and the PCI vendor/product ID database."
PKG_MAKE_OPTS="PREFIX=/usr SHARED=no STRIP= IDSDIR=/usr/share" PKG_MAKE_OPTS="PREFIX=/usr SHARED=no STRIP= IDSDIR=/usr/share"
make_target() { make_target() {
make OPT="$CFLAGS" \ make OPT="${CFLAGS}" \
CROSS_COMPILE=${TARGET_PREFIX} \ CROSS_COMPILE=${TARGET_PREFIX} \
HOST=$TARGET_ARCH-linux \ HOST=${TARGET_ARCH}-linux \
$PKG_MAKE_OPTS \ ${PKG_MAKE_OPTS} \
ZLIB=no DNS=no LIBKMOD=yes HWDB=yes ZLIB=no DNS=no LIBKMOD=yes HWDB=yes
} }
makeinstall_target() { makeinstall_target() {
make $PKG_MAKE_OPTS DESTDIR=$SYSROOT_PREFIX install make ${PKG_MAKE_OPTS} DESTDIR=${SYSROOT_PREFIX} install
make $PKG_MAKE_OPTS DESTDIR=$SYSROOT_PREFIX install-lib make ${PKG_MAKE_OPTS} DESTDIR=${SYSROOT_PREFIX} install-lib
make $PKG_MAKE_OPTS DESTDIR=$INSTALL install-lib make ${PKG_MAKE_OPTS} DESTDIR=${INSTALL} install-lib
if [ "$TARGET_ARCH" = x86_64 ]; then if [ "${TARGET_ARCH}" = x86_64 ]; then
make $PKG_MAKE_OPTS DESTDIR=$INSTALL install make ${PKG_MAKE_OPTS} DESTDIR=${INSTALL} install
fi fi
} }
post_makeinstall_target() { post_makeinstall_target() {
rm -rf $INSTALL/usr/sbin/setpci rm -rf ${INSTALL}/usr/sbin/setpci
rm -rf $INSTALL/usr/sbin/update-pciids rm -rf ${INSTALL}/usr/sbin/update-pciids
rm -rf $INSTALL/usr/share rm -rf ${INSTALL}/usr/share
} }

View File

@ -7,7 +7,7 @@ PKG_VERSION="4.8"
PKG_SHA256="f79b0cfea71b37a8eeec8490db6c5f7ae7719c35587f21edb0617f370eeff633" PKG_SHA256="f79b0cfea71b37a8eeec8490db6c5f7ae7719c35587f21edb0617f370eeff633"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="http://www.gnu.org/software/sed/" PKG_SITE="http://www.gnu.org/software/sed/"
PKG_URL="http://ftpmirror.gnu.org/sed/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_URL="http://ftpmirror.gnu.org/sed/${PKG_NAME}-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_HOST="ccache:host" PKG_DEPENDS_HOST="ccache:host"
PKG_LONGDESC="The sed (Stream EDitor) editor is a stream or batch (non-interactive) editor." PKG_LONGDESC="The sed (Stream EDitor) editor is a stream or batch (non-interactive) editor."

View File

@ -7,7 +7,7 @@ PKG_VERSION="247"
PKG_SHA256="77146f7b27334aa69ef6692bed92c3c893685150f481e7254b81d4ea0f66c640" PKG_SHA256="77146f7b27334aa69ef6692bed92c3c893685150f481e7254b81d4ea0f66c640"
PKG_LICENSE="LGPL2.1+" PKG_LICENSE="LGPL2.1+"
PKG_SITE="http://www.freedesktop.org/wiki/Software/systemd" PKG_SITE="http://www.freedesktop.org/wiki/Software/systemd"
PKG_URL="https://github.com/systemd/systemd/archive/v$PKG_VERSION.tar.gz" PKG_URL="https://github.com/systemd/systemd/archive/v${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain libcap kmod util-linux entropy libidn2 wait-time-sync" PKG_DEPENDS_TARGET="toolchain libcap kmod util-linux entropy libidn2 wait-time-sync"
PKG_LONGDESC="A system and session manager for Linux, compatible with SysV and LSB init scripts." PKG_LONGDESC="A system and session manager for Linux, compatible with SysV and LSB init scripts."
@ -99,158 +99,158 @@ PKG_MESON_OPTS_TARGET="--libdir=/usr/lib \
-Dkmod-path=/usr/bin/kmod \ -Dkmod-path=/usr/bin/kmod \
-Dmount-path=/usr/bin/mount \ -Dmount-path=/usr/bin/mount \
-Dumount-path=/usr/bin/umount \ -Dumount-path=/usr/bin/umount \
-Ddebug-tty=$DEBUG_TTY \ -Ddebug-tty=${DEBUG_TTY} \
-Dversion-tag=${PKG_VERSION}" -Dversion-tag=${PKG_VERSION}"
pre_configure_target() { pre_configure_target() {
export TARGET_CFLAGS="$TARGET_CFLAGS -fno-schedule-insns -fno-schedule-insns2 -Wno-format-truncation" export TARGET_CFLAGS="${TARGET_CFLAGS} -fno-schedule-insns -fno-schedule-insns2 -Wno-format-truncation"
export LC_ALL=en_US.UTF-8 export LC_ALL=en_US.UTF-8
} }
post_makeinstall_target() { post_makeinstall_target() {
# remove unneeded stuff # remove unneeded stuff
safe_remove $INSTALL/etc/init.d safe_remove ${INSTALL}/etc/init.d
safe_remove $INSTALL/etc/systemd/system safe_remove ${INSTALL}/etc/systemd/system
safe_remove $INSTALL/etc/xdg safe_remove ${INSTALL}/etc/xdg
safe_remove $INSTALL/etc/X11 safe_remove ${INSTALL}/etc/X11
safe_remove $INSTALL/usr/bin/kernel-install safe_remove ${INSTALL}/usr/bin/kernel-install
safe_remove $INSTALL/usr/lib/kernel/install.d safe_remove ${INSTALL}/usr/lib/kernel/install.d
safe_remove $INSTALL/usr/lib/rpm safe_remove ${INSTALL}/usr/lib/rpm
safe_remove $INSTALL/usr/lib/systemd/user safe_remove ${INSTALL}/usr/lib/systemd/user
safe_remove $INSTALL/usr/lib/tmpfiles.d/etc.conf safe_remove ${INSTALL}/usr/lib/tmpfiles.d/etc.conf
safe_remove $INSTALL/usr/lib/tmpfiles.d/home.conf safe_remove ${INSTALL}/usr/lib/tmpfiles.d/home.conf
safe_remove $INSTALL/usr/share/factory safe_remove ${INSTALL}/usr/share/factory
# clean up hwdb # clean up hwdb
safe_remove $INSTALL/usr/lib/udev/hwdb.d/20-OUI.hwdb safe_remove ${INSTALL}/usr/lib/udev/hwdb.d/20-OUI.hwdb
safe_remove $INSTALL/usr/lib/udev/hwdb.d/20-acpi-vendor.hwdb safe_remove ${INSTALL}/usr/lib/udev/hwdb.d/20-acpi-vendor.hwdb
safe_remove $INSTALL/usr/lib/udev/hwdb.d/20-bluetooth-vendor-product.hwdb safe_remove ${INSTALL}/usr/lib/udev/hwdb.d/20-bluetooth-vendor-product.hwdb
safe_remove $INSTALL/usr/lib/udev/hwdb.d/20-net-ifname.hwdb safe_remove ${INSTALL}/usr/lib/udev/hwdb.d/20-net-ifname.hwdb
safe_remove $INSTALL/usr/lib/udev/hwdb.d/20-sdio-classes.hwdb safe_remove ${INSTALL}/usr/lib/udev/hwdb.d/20-sdio-classes.hwdb
safe_remove $INSTALL/usr/lib/udev/hwdb.d/20-sdio-vendor-model.hwdb safe_remove ${INSTALL}/usr/lib/udev/hwdb.d/20-sdio-vendor-model.hwdb
# remove Network adaper renaming rule, this is confusing # remove Network adaper renaming rule, this is confusing
safe_remove $INSTALL/usr/lib/udev/rules.d/80-net-setup-link.rules safe_remove ${INSTALL}/usr/lib/udev/rules.d/80-net-setup-link.rules
safe_remove $INSTALL/usr/lib/udev/rules.d/71-seat.rules safe_remove ${INSTALL}/usr/lib/udev/rules.d/71-seat.rules
safe_remove $INSTALL/usr/lib/udev/rules.d/73-seat-late.rules safe_remove ${INSTALL}/usr/lib/udev/rules.d/73-seat-late.rules
# remove getty units, we dont want a console # remove getty units, we dont want a console
safe_remove $INSTALL/usr/lib/systemd/system/autovt@.service safe_remove ${INSTALL}/usr/lib/systemd/system/autovt@.service
safe_remove $INSTALL/usr/lib/systemd/system/console-getty.service safe_remove ${INSTALL}/usr/lib/systemd/system/console-getty.service
safe_remove $INSTALL/usr/lib/systemd/system/container-getty@.service safe_remove ${INSTALL}/usr/lib/systemd/system/container-getty@.service
safe_remove $INSTALL/usr/lib/systemd/system/getty.target safe_remove ${INSTALL}/usr/lib/systemd/system/getty.target
safe_remove $INSTALL/usr/lib/systemd/system/getty@.service safe_remove ${INSTALL}/usr/lib/systemd/system/getty@.service
safe_remove $INSTALL/usr/lib/systemd/system/serial-getty@.service safe_remove ${INSTALL}/usr/lib/systemd/system/serial-getty@.service
safe_remove $INSTALL/usr/lib/systemd/system/*.target.wants/getty.target safe_remove ${INSTALL}/usr/lib/systemd/system/*.target.wants/getty.target
# remove other notused or nonsense stuff (our /etc is ro) # remove other notused or nonsense stuff (our /etc is ro)
safe_remove $INSTALL/usr/lib/systemd/systemd-update-done safe_remove ${INSTALL}/usr/lib/systemd/systemd-update-done
safe_remove $INSTALL/usr/lib/systemd/system/systemd-update-done.service safe_remove ${INSTALL}/usr/lib/systemd/system/systemd-update-done.service
safe_remove $INSTALL/usr/lib/systemd/system/*.target.wants/systemd-update-done.service safe_remove ${INSTALL}/usr/lib/systemd/system/*.target.wants/systemd-update-done.service
# remove systemd-hwdb-update. we have own hwdb.service # remove systemd-hwdb-update. we have own hwdb.service
safe_remove $INSTALL/usr/lib/systemd/system/systemd-hwdb-update.service safe_remove ${INSTALL}/usr/lib/systemd/system/systemd-hwdb-update.service
# remove nspawn # remove nspawn
safe_remove $INSTALL/usr/bin/systemd-nspawn safe_remove ${INSTALL}/usr/bin/systemd-nspawn
safe_remove $INSTALL/usr/lib/systemd/system/systemd-nspawn@.service safe_remove ${INSTALL}/usr/lib/systemd/system/systemd-nspawn@.service
# remove unneeded generators # remove unneeded generators
for gen in $INSTALL/usr/lib/systemd/system-generators/*; do for gen in ${INSTALL}/usr/lib/systemd/system-generators/*; do
case "$gen" in case "${gen}" in
*/systemd-debug-generator) */systemd-debug-generator)
# keep it # keep it
;; ;;
*) *)
safe_remove "$gen" safe_remove "${gen}"
;; ;;
esac esac
done done
# remove catalog # remove catalog
safe_remove $INSTALL/usr/lib/systemd/catalog safe_remove ${INSTALL}/usr/lib/systemd/catalog
# remove partition # remove partition
safe_remove $INSTALL/usr/lib/systemd/systemd-growfs safe_remove ${INSTALL}/usr/lib/systemd/systemd-growfs
safe_remove $INSTALL/usr/lib/systemd/systemd-makefs safe_remove ${INSTALL}/usr/lib/systemd/systemd-makefs
# distro preset policy # distro preset policy
safe_remove $INSTALL/usr/lib/systemd/system-preset/* safe_remove ${INSTALL}/usr/lib/systemd/system-preset/*
echo "disable *" > $INSTALL/usr/lib/systemd/system-preset/99-default.preset echo "disable *" > ${INSTALL}/usr/lib/systemd/system-preset/99-default.preset
safe_remove $INSTALL/usr/lib/systemd/user-preset/* safe_remove ${INSTALL}/usr/lib/systemd/user-preset/*
echo "disable *" > $INSTALL/usr/lib/systemd/user-preset/90-systemd.preset echo "disable *" > ${INSTALL}/usr/lib/systemd/user-preset/90-systemd.preset
# remove networkd # remove networkd
safe_remove $INSTALL/usr/lib/systemd/network safe_remove ${INSTALL}/usr/lib/systemd/network
# remove systemd-time-wait-sync (not detecting slew time updates, using package wait-time-sync) # remove systemd-time-wait-sync (not detecting slew time updates, using package wait-time-sync)
safe_remove $INSTALL/usr/lib/systemd/system/systemd-time-wait-sync.service safe_remove ${INSTALL}/usr/lib/systemd/system/systemd-time-wait-sync.service
safe_remove $INSTALL/usr/lib/systemd/systemd-time-wait-sync safe_remove ${INSTALL}/usr/lib/systemd/systemd-time-wait-sync
# tune journald.conf # tune journald.conf
sed -e "s,^.*Compress=.*$,Compress=no,g" -i $INSTALL/etc/systemd/journald.conf sed -e "s,^.*Compress=.*$,Compress=no,g" -i ${INSTALL}/etc/systemd/journald.conf
sed -e "s,^.*SplitMode=.*$,SplitMode=none,g" -i $INSTALL/etc/systemd/journald.conf sed -e "s,^.*SplitMode=.*$,SplitMode=none,g" -i ${INSTALL}/etc/systemd/journald.conf
sed -e "s,^.*RuntimeMaxUse=.*$,RuntimeMaxUse=2M,g" -i $INSTALL/etc/systemd/journald.conf sed -e "s,^.*RuntimeMaxUse=.*$,RuntimeMaxUse=2M,g" -i ${INSTALL}/etc/systemd/journald.conf
sed -e "s,^.*RuntimeMaxFileSize=.*$,RuntimeMaxFileSize=128K,g" -i $INSTALL/etc/systemd/journald.conf sed -e "s,^.*RuntimeMaxFileSize=.*$,RuntimeMaxFileSize=128K,g" -i ${INSTALL}/etc/systemd/journald.conf
sed -e "s,^.*SystemMaxUse=.*$,SystemMaxUse=10M,g" -i $INSTALL/etc/systemd/journald.conf sed -e "s,^.*SystemMaxUse=.*$,SystemMaxUse=10M,g" -i ${INSTALL}/etc/systemd/journald.conf
# tune logind.conf # tune logind.conf
sed -e "s,^.*HandleLidSwitch=.*$,HandleLidSwitch=ignore,g" -i $INSTALL/etc/systemd/logind.conf sed -e "s,^.*HandleLidSwitch=.*$,HandleLidSwitch=ignore,g" -i ${INSTALL}/etc/systemd/logind.conf
sed -e "s,^.*HandlePowerKey=.*$,HandlePowerKey=ignore,g" -i $INSTALL/etc/systemd/logind.conf sed -e "s,^.*HandlePowerKey=.*$,HandlePowerKey=ignore,g" -i ${INSTALL}/etc/systemd/logind.conf
# replace systemd-machine-id-setup with ours # replace systemd-machine-id-setup with ours
safe_remove $INSTALL/usr/lib/systemd/system/systemd-machine-id-commit.service safe_remove ${INSTALL}/usr/lib/systemd/system/systemd-machine-id-commit.service
safe_remove $INSTALL/usr/lib/systemd/system/*.target.wants/systemd-machine-id-commit.service safe_remove ${INSTALL}/usr/lib/systemd/system/*.target.wants/systemd-machine-id-commit.service
safe_remove $INSTALL/usr/bin/systemd-machine-id-setup safe_remove ${INSTALL}/usr/bin/systemd-machine-id-setup
mkdir -p $INSTALL/usr/bin mkdir -p ${INSTALL}/usr/bin
cp $PKG_DIR/scripts/systemd-machine-id-setup $INSTALL/usr/bin cp ${PKG_DIR}/scripts/systemd-machine-id-setup ${INSTALL}/usr/bin
cp $PKG_DIR/scripts/userconfig-setup $INSTALL/usr/bin cp ${PKG_DIR}/scripts/userconfig-setup ${INSTALL}/usr/bin
cp $PKG_DIR/scripts/usercache-setup $INSTALL/usr/bin cp ${PKG_DIR}/scripts/usercache-setup ${INSTALL}/usr/bin
cp $PKG_DIR/scripts/environment-setup $INSTALL/usr/bin cp ${PKG_DIR}/scripts/environment-setup ${INSTALL}/usr/bin
# use systemd to set cpufreq governor and tunables # use systemd to set cpufreq governor and tunables
find_file_path scripts/cpufreq && cp -PRv $FOUND_PATH $INSTALL/usr/bin find_file_path scripts/cpufreq && cp -PRv ${FOUND_PATH} ${INSTALL}/usr/bin
mkdir -p $INSTALL/usr/sbin mkdir -p ${INSTALL}/usr/sbin
cp $PKG_DIR/scripts/kernel-overlays-setup $INSTALL/usr/sbin cp ${PKG_DIR}/scripts/kernel-overlays-setup ${INSTALL}/usr/sbin
cp $PKG_DIR/scripts/network-base-setup $INSTALL/usr/sbin cp ${PKG_DIR}/scripts/network-base-setup ${INSTALL}/usr/sbin
cp $PKG_DIR/scripts/systemd-timesyncd-setup $INSTALL/usr/sbin cp ${PKG_DIR}/scripts/systemd-timesyncd-setup ${INSTALL}/usr/sbin
# /etc/resolv.conf and /etc/hosts must be writable # /etc/resolv.conf and /etc/hosts must be writable
ln -sf /run/libreelec/resolv.conf $INSTALL/etc/resolv.conf ln -sf /run/libreelec/resolv.conf ${INSTALL}/etc/resolv.conf
ln -sf /run/libreelec/hosts $INSTALL/etc/hosts ln -sf /run/libreelec/hosts ${INSTALL}/etc/hosts
ln -sf /run/libreelec/environment $INSTALL/etc/environment ln -sf /run/libreelec/environment ${INSTALL}/etc/environment
# provide 'halt', 'shutdown', 'reboot' & co. # provide 'halt', 'shutdown', 'reboot' & co.
ln -sf /usr/bin/systemctl $INSTALL/usr/sbin/halt ln -sf /usr/bin/systemctl ${INSTALL}/usr/sbin/halt
ln -sf /usr/bin/systemctl $INSTALL/usr/sbin/poweroff ln -sf /usr/bin/systemctl ${INSTALL}/usr/sbin/poweroff
ln -sf /usr/bin/systemctl $INSTALL/usr/sbin/reboot ln -sf /usr/bin/systemctl ${INSTALL}/usr/sbin/reboot
ln -sf /usr/bin/systemctl $INSTALL/usr/sbin/runlevel ln -sf /usr/bin/systemctl ${INSTALL}/usr/sbin/runlevel
ln -sf /usr/bin/systemctl $INSTALL/usr/sbin/shutdown ln -sf /usr/bin/systemctl ${INSTALL}/usr/sbin/shutdown
ln -sf /usr/bin/systemctl $INSTALL/usr/sbin/telinit ln -sf /usr/bin/systemctl ${INSTALL}/usr/sbin/telinit
# strip # strip
debug_strip $INSTALL/usr debug_strip ${INSTALL}/usr
# defaults # defaults
mkdir -p $INSTALL/usr/config mkdir -p ${INSTALL}/usr/config
cp -PR $PKG_DIR/config/* $INSTALL/usr/config cp -PR ${PKG_DIR}/config/* ${INSTALL}/usr/config
safe_remove $INSTALL/etc/modules-load.d safe_remove ${INSTALL}/etc/modules-load.d
ln -sf /storage/.config/modules-load.d $INSTALL/etc/modules-load.d ln -sf /storage/.config/modules-load.d ${INSTALL}/etc/modules-load.d
ln -sf /storage/.config/logind.conf.d $INSTALL/etc/systemd/logind.conf.d ln -sf /storage/.config/logind.conf.d ${INSTALL}/etc/systemd/logind.conf.d
ln -sf /storage/.config/sleep.conf.d $INSTALL/etc/systemd/sleep.conf.d ln -sf /storage/.config/sleep.conf.d ${INSTALL}/etc/systemd/sleep.conf.d
ln -sf /storage/.config/timesyncd.conf.d $INSTALL/etc/systemd/timesyncd.conf.d ln -sf /storage/.config/timesyncd.conf.d ${INSTALL}/etc/systemd/timesyncd.conf.d
safe_remove $INSTALL/etc/sysctl.d safe_remove ${INSTALL}/etc/sysctl.d
ln -sf /storage/.config/sysctl.d $INSTALL/etc/sysctl.d ln -sf /storage/.config/sysctl.d ${INSTALL}/etc/sysctl.d
safe_remove $INSTALL/etc/tmpfiles.d safe_remove ${INSTALL}/etc/tmpfiles.d
ln -sf /storage/.config/tmpfiles.d $INSTALL/etc/tmpfiles.d ln -sf /storage/.config/tmpfiles.d ${INSTALL}/etc/tmpfiles.d
safe_remove $INSTALL/etc/udev/hwdb.d safe_remove ${INSTALL}/etc/udev/hwdb.d
ln -sf /storage/.config/hwdb.d $INSTALL/etc/udev/hwdb.d ln -sf /storage/.config/hwdb.d ${INSTALL}/etc/udev/hwdb.d
safe_remove $INSTALL/etc/udev/rules.d safe_remove ${INSTALL}/etc/udev/rules.d
ln -sf /storage/.config/udev.rules.d $INSTALL/etc/udev/rules.d ln -sf /storage/.config/udev.rules.d ${INSTALL}/etc/udev/rules.d
} }
post_install() { post_install() {

View File

@ -12,7 +12,7 @@ PKG_LONGDESC="This package contains the Terminus Font"
PKG_TOOLCHAIN="manual" PKG_TOOLCHAIN="manual"
pre_configure_init() { pre_configure_init() {
cd $PKG_BUILD cd ${PKG_BUILD}
rm -rf .${TARGET_NAME}-${TARGET} rm -rf .${TARGET_NAME}-${TARGET}
} }

View File

@ -7,24 +7,24 @@ PKG_VERSION="2020f"
PKG_SHA256="e53b70c3ed8597a081e2c12ec049802433b5e022d3d20db4e8bda80d760d7cee" PKG_SHA256="e53b70c3ed8597a081e2c12ec049802433b5e022d3d20db4e8bda80d760d7cee"
PKG_LICENSE="Public Domain" PKG_LICENSE="Public Domain"
PKG_SITE="http://www.iana.org/time-zones" PKG_SITE="http://www.iana.org/time-zones"
PKG_URL="https://github.com/eggert/tz/archive/$PKG_VERSION.tar.gz" PKG_URL="https://github.com/eggert/tz/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain" PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="Time zone and daylight-saving time data." PKG_LONGDESC="Time zone and daylight-saving time data."
pre_configure_target() { pre_configure_target() {
PKG_MAKE_OPTS_TARGET="CC=$HOST_CC LDFLAGS=" PKG_MAKE_OPTS_TARGET="CC=${HOST_CC} LDFLAGS="
} }
makeinstall_target() { makeinstall_target() {
make TZDIR="$INSTALL/usr/share/zoneinfo" REDO=posix_only TOPDIR="$INSTALL" install make TZDIR="${INSTALL}/usr/share/zoneinfo" REDO=posix_only TOPDIR="${INSTALL}" install
} }
post_makeinstall_target() { post_makeinstall_target() {
rm -rf $INSTALL/usr/bin $INSTALL/usr/sbin rm -rf ${INSTALL}/usr/bin ${INSTALL}/usr/sbin
rm -rf $INSTALL/etc rm -rf ${INSTALL}/etc
mkdir -p $INSTALL/etc mkdir -p ${INSTALL}/etc
ln -sf /var/run/localtime $INSTALL/etc/localtime ln -sf /var/run/localtime ${INSTALL}/etc/localtime
} }
post_install() { post_install() {

View File

@ -6,7 +6,7 @@ PKG_VERSION="0.4.4"
PKG_SHA256="ce8c51fd4d589cda7be56e75b42188deeb258c66fc911a9b3a70a3945c157739" PKG_SHA256="ce8c51fd4d589cda7be56e75b42188deeb258c66fc911a9b3a70a3945c157739"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="https://github.com/IgnorantGuru/udevil" PKG_SITE="https://github.com/IgnorantGuru/udevil"
PKG_URL="https://github.com/IgnorantGuru/udevil/raw/pkg/$PKG_VERSION/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_URL="https://github.com/IgnorantGuru/udevil/raw/pkg/${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_TARGET="toolchain systemd glib" PKG_DEPENDS_TARGET="toolchain systemd glib"
PKG_LONGDESC="Mounts and unmounts removable devices and networks without a password." PKG_LONGDESC="Mounts and unmounts removable devices and networks without a password."
@ -21,11 +21,11 @@ makeinstall_target() {
} }
post_makeinstall_target() { post_makeinstall_target() {
mkdir -p $INSTALL/etc/udevil mkdir -p ${INSTALL}/etc/udevil
cp $PKG_DIR/config/udevil.conf $INSTALL/etc/udevil cp ${PKG_DIR}/config/udevil.conf ${INSTALL}/etc/udevil
mkdir -p $INSTALL/usr/bin mkdir -p ${INSTALL}/usr/bin
cp -PR src/udevil $INSTALL/usr/bin cp -PR src/udevil ${INSTALL}/usr/bin
} }
post_install() { post_install() {

View File

@ -7,12 +7,12 @@ PKG_VERSION="013"
PKG_SHA256="9e23494fcc78b7a80ee29a07dd179c95ae2f71509c35728dbbabc2d1cca41338" PKG_SHA256="9e23494fcc78b7a80ee29a07dd179c95ae2f71509c35728dbbabc2d1cca41338"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="http://www.linux-usb.org/" PKG_SITE="http://www.linux-usb.org/"
PKG_URL="http://kernel.org/pub/linux/utils/usb/usbutils/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_URL="http://kernel.org/pub/linux/utils/usb/usbutils/${PKG_NAME}-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_TARGET="toolchain libusb systemd" PKG_DEPENDS_TARGET="toolchain libusb systemd"
PKG_LONGDESC="This package contains various utilities for inspecting and setting of devices connected to the USB bus." PKG_LONGDESC="This package contains various utilities for inspecting and setting of devices connected to the USB bus."
PKG_TOOLCHAIN="autotools" PKG_TOOLCHAIN="autotools"
post_makeinstall_target() { post_makeinstall_target() {
rm -rf $INSTALL/usr/bin/lsusb.py rm -rf ${INSTALL}/usr/bin/lsusb.py
rm -rf $INSTALL/usr/bin/usbhid-dump rm -rf ${INSTALL}/usr/bin/usbhid-dump
} }

View File

@ -6,7 +6,7 @@ PKG_NAME="util-linux"
PKG_VERSION="2.36.1" PKG_VERSION="2.36.1"
PKG_SHA256="09fac242172cd8ec27f0739d8d192402c69417617091d8c6e974841568f37eed" PKG_SHA256="09fac242172cd8ec27f0739d8d192402c69417617091d8c6e974841568f37eed"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_URL="http://www.kernel.org/pub/linux/utils/util-linux/v$(get_pkg_version_maj_min)/$PKG_NAME-$PKG_VERSION.tar.xz" PKG_URL="http://www.kernel.org/pub/linux/utils/util-linux/v$(get_pkg_version_maj_min)/${PKG_NAME}-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_HOST="ccache:host autoconf:host automake:host intltool:host libtool:host pkg-config:host" PKG_DEPENDS_HOST="ccache:host autoconf:host automake:host intltool:host libtool:host pkg-config:host"
PKG_DEPENDS_TARGET="toolchain" PKG_DEPENDS_TARGET="toolchain"
PKG_DEPENDS_INIT="toolchain" PKG_DEPENDS_INIT="toolchain"
@ -45,7 +45,7 @@ UTILLINUX_CONFIG_DEFAULT="--disable-gtk-doc \
--without-python \ --without-python \
--without-systemdsystemunitdir" --without-systemdsystemunitdir"
PKG_CONFIGURE_OPTS_TARGET="$UTILLINUX_CONFIG_DEFAULT \ PKG_CONFIGURE_OPTS_TARGET="${UTILLINUX_CONFIG_DEFAULT} \
--enable-libuuid \ --enable-libuuid \
--enable-libblkid \ --enable-libblkid \
--enable-libmount \ --enable-libmount \
@ -56,40 +56,40 @@ PKG_CONFIGURE_OPTS_TARGET="$UTILLINUX_CONFIG_DEFAULT \
--enable-blkid \ --enable-blkid \
--enable-lscpu" --enable-lscpu"
if [ "$SWAP_SUPPORT" = "yes" ]; then if [ "${SWAP_SUPPORT}" = "yes" ]; then
PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --enable-swapon" PKG_CONFIGURE_OPTS_TARGET+=" --enable-swapon"
fi fi
PKG_CONFIGURE_OPTS_HOST="--enable-static \ PKG_CONFIGURE_OPTS_HOST="--enable-static \
--disable-shared \ --disable-shared \
$UTILLINUX_CONFIG_DEFAULT \ ${UTILLINUX_CONFIG_DEFAULT} \
--enable-uuidgen \ --enable-uuidgen \
--enable-libuuid" --enable-libuuid"
PKG_CONFIGURE_OPTS_INIT="$UTILLINUX_CONFIG_DEFAULT \ PKG_CONFIGURE_OPTS_INIT="${UTILLINUX_CONFIG_DEFAULT} \
--enable-libblkid \ --enable-libblkid \
--enable-libmount \ --enable-libmount \
--enable-fsck" --enable-fsck"
if [ "$INITRAMFS_PARTED_SUPPORT" = "yes" ]; then if [ "${INITRAMFS_PARTED_SUPPORT}" = "yes" ]; then
PKG_CONFIGURE_OPTS_INIT="$PKG_CONFIGURE_OPTS_INIT --enable-mkfs --enable-libuuid" PKG_CONFIGURE_OPTS_INIT+=" --enable-mkfs --enable-libuuid"
fi fi
post_makeinstall_target() { post_makeinstall_target() {
if [ "$SWAP_SUPPORT" = "yes" ]; then if [ "${SWAP_SUPPORT}" = "yes" ]; then
mkdir -p $INSTALL/usr/lib/libreelec mkdir -p ${INSTALL}/usr/lib/libreelec
cp -PR $PKG_DIR/scripts/mount-swap $INSTALL/usr/lib/libreelec cp -PR ${PKG_DIR}/scripts/mount-swap ${INSTALL}/usr/lib/libreelec
mkdir -p $INSTALL/etc mkdir -p ${INSTALL}/etc
cat $PKG_DIR/config/swap.conf | \ cat ${PKG_DIR}/config/swap.conf | \
sed -e "s,@SWAPFILESIZE@,$SWAPFILESIZE,g" \ sed -e "s,@SWAPFILESIZE@,${SWAPFILESIZE},g" \
-e "s,@SWAP_ENABLED_DEFAULT@,$SWAP_ENABLED_DEFAULT,g" \ -e "s,@SWAP_ENABLED_DEFAULT@,${SWAP_ENABLED_DEFAULT},g" \
> $INSTALL/etc/swap.conf > ${INSTALL}/etc/swap.conf
fi fi
} }
post_install () { post_install () {
if [ "$SWAP_SUPPORT" = "yes" ]; then if [ "${SWAP_SUPPORT}" = "yes" ]; then
enable_service swap.service enable_service swap.service
fi fi
} }

View File

@ -9,7 +9,7 @@ PKG_VERSION="1.20.0"
PKG_SHA256="956118713f7ccb405c55c7088a6a2490c32d54300dd9a30d8d5008c28d3726f7" PKG_SHA256="956118713f7ccb405c55c7088a6a2490c32d54300dd9a30d8d5008c28d3726f7"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="http://linuxtv.org/" PKG_SITE="http://linuxtv.org/"
PKG_URL="http://linuxtv.org/downloads/v4l-utils/$PKG_NAME-$PKG_VERSION.tar.bz2" PKG_URL="http://linuxtv.org/downloads/v4l-utils/${PKG_NAME}-${PKG_VERSION}.tar.bz2"
PKG_DEPENDS_TARGET="toolchain alsa-lib systemd elfutils ir-bpf-decoders" PKG_DEPENDS_TARGET="toolchain alsa-lib systemd elfutils ir-bpf-decoders"
PKG_LONGDESC="Linux V4L2 and DVB API utilities and v4l libraries (libv4l)." PKG_LONGDESC="Linux V4L2 and DVB API utilities and v4l libraries (libv4l)."
PKG_TOOLCHAIN="autotools" PKG_TOOLCHAIN="autotools"
@ -22,39 +22,39 @@ PKG_CONFIGURE_OPTS_TARGET="--without-jpeg \
pre_configure_target() { pre_configure_target() {
# cec-ctl fails to build in subdirs # cec-ctl fails to build in subdirs
cd $PKG_BUILD cd ${PKG_BUILD}
rm -rf .$TARGET_NAME rm -rf .${TARGET_NAME}
} }
make_target() { make_target() {
make -C utils/keytable CFLAGS="$TARGET_CFLAGS" make -C utils/keytable CFLAGS="${TARGET_CFLAGS}"
make -C utils/ir-ctl CFLAGS="$TARGET_CFLAGS" make -C utils/ir-ctl CFLAGS="${TARGET_CFLAGS}"
if [ "$CEC_FRAMEWORK_SUPPORT" = "yes" ]; then if [ "${CEC_FRAMEWORK_SUPPORT}" = "yes" ]; then
make -C utils/libcecutil CFLAGS="$TARGET_CFLAGS" make -C utils/libcecutil CFLAGS="${TARGET_CFLAGS}"
make -C utils/cec-ctl CFLAGS="$TARGET_CFLAGS" make -C utils/cec-ctl CFLAGS="${TARGET_CFLAGS}"
fi fi
make -C lib CFLAGS="$TARGET_CFLAGS" make -C lib CFLAGS="${TARGET_CFLAGS}"
make -C utils/dvb CFLAGS="$TARGET_CFLAGS" make -C utils/dvb CFLAGS="${TARGET_CFLAGS}"
make -C utils/v4l2-ctl CFLAGS="$TARGET_CFLAGS" make -C utils/v4l2-ctl CFLAGS="${TARGET_CFLAGS}"
} }
makeinstall_target() { makeinstall_target() {
make install DESTDIR=$INSTALL PREFIX=/usr -C utils/keytable make install DESTDIR=${INSTALL} PREFIX=/usr -C utils/keytable
make install DESTDIR=$INSTALL PREFIX=/usr -C utils/ir-ctl make install DESTDIR=${INSTALL} PREFIX=/usr -C utils/ir-ctl
if [ "$CEC_FRAMEWORK_SUPPORT" = "yes" ]; then if [ "${CEC_FRAMEWORK_SUPPORT}" = "yes" ]; then
make install DESTDIR=$INSTALL PREFIX=/usr -C utils/cec-ctl make install DESTDIR=${INSTALL} PREFIX=/usr -C utils/cec-ctl
fi fi
make install DESTDIR=$INSTALL PREFIX=/usr -C utils/dvb make install DESTDIR=${INSTALL} PREFIX=/usr -C utils/dvb
make install DESTDIR=$INSTALL PREFIX=/usr -C utils/v4l2-ctl make install DESTDIR=${INSTALL} PREFIX=/usr -C utils/v4l2-ctl
cp ${PKG_BUILD}/contrib/lircd2toml.py ${INSTALL}/usr/bin/ cp ${PKG_BUILD}/contrib/lircd2toml.py ${INSTALL}/usr/bin/
} }
create_multi_keymap() { create_multi_keymap() {
local f name map local f name map
name="$1" name="${1}"
shift 1 shift 1
( (
for f in "$@" ; do for f in "$@"; do
map="${INSTALL}/usr/lib/udev/rc_keymaps/${f}.toml" map="${INSTALL}/usr/lib/udev/rc_keymaps/${f}.toml"
[ -e "${map}" ] && cat "${map}" [ -e "${map}" ] && cat "${map}"
done done
@ -64,35 +64,35 @@ create_multi_keymap() {
post_makeinstall_target() { post_makeinstall_target() {
local f keymap local f keymap
rm -rf $INSTALL/etc/rc_keymaps rm -rf ${INSTALL}/etc/rc_keymaps
ln -sf /storage/.config/rc_keymaps $INSTALL/etc/rc_keymaps ln -sf /storage/.config/rc_keymaps ${INSTALL}/etc/rc_keymaps
mkdir -p $INSTALL/usr/config mkdir -p ${INSTALL}/usr/config
cp -PR $PKG_DIR/config/* $INSTALL/usr/config cp -PR ${PKG_DIR}/config/* ${INSTALL}/usr/config
rm -rf $INSTALL/usr/lib/udev/rules.d rm -rf ${INSTALL}/usr/lib/udev/rules.d
mkdir -p $INSTALL/usr/lib/udev/rules.d mkdir -p ${INSTALL}/usr/lib/udev/rules.d
cp -PR $PKG_DIR/udev.d/*.rules $INSTALL/usr/lib/udev/rules.d cp -PR ${PKG_DIR}/udev.d/*.rules ${INSTALL}/usr/lib/udev/rules.d
# install additional keymaps without overwriting upstream maps # install additional keymaps without overwriting upstream maps
( (
set -C set -C
for f in $PKG_DIR/keymaps/* ; do for f in ${PKG_DIR}/keymaps/*; do
if [ -e $f ] ; then if [ -e ${f} ]; then
keymap=$(basename $f) keymap=$(basename ${f})
cat $f > $INSTALL/usr/lib/udev/rc_keymaps/$keymap cat ${f} > ${INSTALL}/usr/lib/udev/rc_keymaps/${keymap}
fi fi
done done
) )
# create multi keymap to support several remotes OOTB # create multi keymap to support several remotes OOTB
if [ -n "$IR_REMOTE_KEYMAPS" ]; then if [ -n "${IR_REMOTE_KEYMAPS}" ]; then
create_multi_keymap libreelec_multi $IR_REMOTE_KEYMAPS create_multi_keymap libreelec_multi ${IR_REMOTE_KEYMAPS}
# use multi-keymap instead of default one # use multi-keymap instead of default one
sed -i '/^\*\s*rc-rc6-mce\s*rc6_mce/d' $INSTALL/etc/rc_maps.cfg sed -i '/^\*\s*rc-rc6-mce\s*rc6_mce/d' ${INSTALL}/etc/rc_maps.cfg
cat << EOF >> $INSTALL/etc/rc_maps.cfg cat << EOF >> ${INSTALL}/etc/rc_maps.cfg
# #
# Custom LibreELEC configuration starts here # Custom LibreELEC configuration starts here
# #