Files
BMLFS/build-scripts/iwd.build
2024-05-28 09:08:46 -05:00

118 lines
3.5 KiB
Bash

#! /bin/bash
# iwd
# Source: https://mirrors.edge.kernel.org/pub/linux/network/wireless/iwd-2.9.tar.xz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: ell dbus
# Recommended: NONE
# Optional: NONE
# LTO: Tested with GCC+Binutils
# Make sure kernel has these symbols enabled:
# CONFIG_CRYPTO_USER_API_HASH
# CONFIG_CRYPTO_USER_API_SKCIPHER
# CONFIG_KEY_DH_OPERATIONS
# CONFIG_CRYPTO_ECB
# CONFIG_CRYPTO_MD5
# CONFIG_CRYPTO_CBC
# CONFIG_CRYPTO_SHA256
# CONFIG_CRYPTO_AES
# CONFIG_CRYPTO_DES
# CONFIG_CRYPTO_CMAC
# CONFIG_CRYPTO_HMAC
# CONFIG_CRYPTO_SHA512
# CONFIG_CRYPTO_SHA1
# Additional symbols:
# CONFIG_CRYPTO_SHA1_SSSE3
# CONFIG_CRYPTO_AES_NI_INTEL
# CONFIG_CRYPTO_SHA512_SSSE3
# CONFIG_CRYPTO_AES_X86_64
# CONFIG_CRYPTO_DES3_EDE_X86_64
# CONFIG_CRYPTO_SHA256_SSSE3
# Apply fixed from Chimera Linux
patch -Np1 -i ../patches/iwd-chimera/fix-name-request.patch
patch -Np1 -i ../patches/iwd-chimera/portability.patch
patch -Np1 -i ../patches/iwd-chimera/resolvconf-default.patch
patch -Np1 -i ../patches/iwd-chimera/support-traditional-dbus-activation.patch
patch -Np1 -i ../patches/iwd-chimera/use-network-instead-of-wheel.patch
# Update configure script
autoreconf -fiv
# Configure source
# Add this CFLAGS if compiling with clang 17+
CFLAGS="-Wno-implicit-function-declaration -Wno-int-conversion " \
./configure --prefix=/usr \
--disable-systemd-service \
--enable-pie \
--enable-external-ell \
--enable-dbus-policy \
--enable-wired \
--localstatedir=/var \
--sysconfdir=/etc $BUILDTRUPLE
# Compile
make -j2 &&
# if not using a package manager:
# make install
# if using pkgtools from Slackware, then:
sudo -S make DESTDIR=${BUILD} install && \
sudo -S mkdir -pv /BMAN/install && \
sudo -S mkdir -pv /BMAN/usr/share && \
sudo -S mv $BUILD/usr/share/man /BMAN/usr/share/ && \
read -p "Press Enter to create pakage description." &&
cd $BUILD && sudo mkdir -v install &&
cat > /tmp/slack-desc << "EOF"
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
iwd: iwd (iNet Wireless Daemon)
iwd:
iwd: A wireless daemon for Linux that aims to replace WPA supplicant.
iwd:
iwd: Homepage: https://git.kernel.org/pub/scm/network/wireless/iwd.git
iwd:
iwd:
iwd:
iwd:
iwd:
EOF
sudo -S mv /tmp/slack-desc install/ &&
sudo -S mkdir -pv etc/iwd && \
cat > /tmp/main.conf << "EOF"
[General]
EnableNetworkConfiguration=true
[Network]
NameResolvingService=resolvconf
EnableIPv6=true
EOF
sudo -S mv /tmp/main.conf etc/iwd/ && \
read -p "Enter to build and install package" &&
sudo -S makepkg -l y -c n $PKGS/iwd-2.9-$PSUFFIX && \
cd /BMAN && \
cat > /tmp/slack-desc << "EOF"
iwd-doc: Manuals for iwd (iNet Wireless Daemon)
iwd-doc:
iwd-doc: A wireless daemon for Linux that aims to replace WPA supplicant.
iwd-doc:
iwd-doc: https://git.kernel.org/pub/scm/network/wireless/iwd.git
iwd-doc:
EOF
sudo -S mv /tmp/slack-desc install/ && \
sudo -S makepkg -l y -c n $PKGS/iwd-doc-2.9-$NOPSUFFIX && \
sudo -S rm -rf $BUILD/* /BMAN/*