added other modified SlackBuilds, just for safe keeping...

This commit is contained in:
shelldweller 2023-07-05 20:21:07 -05:00
parent eb4e710a21
commit 2bcc074f66
43 changed files with 52949 additions and 0 deletions

11
genius/README Normal file
View File

@ -0,0 +1,11 @@
genius (mathematics tool and the GEL language)
Genius is a general purpose calculator program similiar
in some aspects to BC, Matlab, Maple or Mathematica. It
is useful both as a simple calculator and as a research
or educational tool. The syntax is very intuitive and
is designed to mimic how mathematics is usually written.
If you would like the GUI interface as well, it requires
libgnomeui, gtksourceview and vte2. If you have these dependencies,
pass the variable of GNOME=YES (or anything that isn't NO ;)

9
genius/doinst.sh Normal file
View File

@ -0,0 +1,9 @@
if [ -x /usr/bin/update-mime-database ]; then
/usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
fi
if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
if [ -x /usr/bin/gtk-update-icon-cache ]; then
/usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
fi
fi

108
genius/genius.SlackBuild Executable file
View File

@ -0,0 +1,108 @@
#!/bin/sh
# Slackware build script for genius
# Copyright 2009,2010,2018 Vincent Batts, vbatts@hashbangbash.com, http://hashbangbash.com/
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
PRGNAM=genius
VERSION=${VERSION:-1.0.24}
BUILD=${BUILD:-1}
TAG=${TAG:-_not-SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/blds}
GNOME=${GNOME:-NO}
GNOME_FLAGS="--disable-gtksourceview --disable-gnome"
#if [ "$GNOME" != "NO" ] ; then
# GNOME_FLAGS=""
#fi
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS -std=gnu89" \
CXXFLAGS="$SLKCFLAGS -std=gnu89" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--disable-scrollkeeper \
--disable-update-mimedb \
$GNOME_FLAGS \
--build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a TODO NEWS README AUTHORS ABOUT-NLS INSTALL ChangeLog \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz}

10
genius/genius.info Normal file
View File

@ -0,0 +1,10 @@
PRGNAM="genius"
VERSION="1.0.23"
HOMEPAGE="http://www.5z.com/jirka/genius.html"
DOWNLOAD="http://ftp.5z.com/pub/genius/genius-1.0.23.tar.xz"
MD5SUM="3e94a5898e59c069c564f00136c2450d"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="rarian"
MAINTAINER="Vincent Batts"
EMAIL="vbatts@hashbangbash.com"

19
genius/slack-desc Normal file
View File

@ -0,0 +1,19 @@
# 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 ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
genius: genius (math tool)
genius:
genius: genius is an all purpose math toolprogram similar in some aspects
genius: to BC, Matlab or Maple. It is useful both as a simple calculator
genius: and as a research or educational tool. The syntax is very intuitive
genius: and is designed to mimic how mathematics is usually written.
genius:
genius: Homepage http://www.5z.com/jirka/genius.html
genius:
genius:
genius:

6
jwm/README Normal file
View File

@ -0,0 +1,6 @@
JWM (Joe's Window Manager) is a lightweight stacking window manager
for the X Window System written by Joe Wingbermuehle. JWM is written
in C and uses only Xlib at a minimum.
It provides an interface similar to Windows 98 with a modern-looking
appearance and it can support some GNOME, Motif and Extended Window
Manager Hints.

99
jwm/jwm.SlackBuild Executable file
View File

@ -0,0 +1,99 @@
#!/bin/bash
# Slackware build script for jwm
# Written by Wainamoinen <wainamoinen@gmail.com>
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=jwm
VERSION=${VERSION:-2.4.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_shldwlr}
PKGTYPE=${PKGTYPE:-txz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/blds}
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xf $CWD/$PRGNAM-$VERSION.tar.xz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--build=$ARCH-slackware-linux \
--disable-debug
make
make install SYSCONF=$PKG/etc MANDIR=$PKG/usr/man BINDIR=$PKG/usr/bin DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a ABOUT-NLS CONTRIBUTING.md LICENSE README.md README.upgrading example.jwmrc xslt/jwm-2.3.xslt $PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKG/usr/share/$PRGNAM
cp -a contrib/*.svg contrib/*.xbm contrib/CREDITS $PKG/usr/share/$PRGNAM
mkdir -p $PKG/etc/X11/xinit
cp $CWD/xinitrc.jwm $PKG/etc/X11/xinit
chown -R root:root $PKG/etc/X11/xinit
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE

10
jwm/jwm.info Normal file
View File

@ -0,0 +1,10 @@
PRGNAM="jwm"
VERSION="2.4.2"
HOMEPAGE="http://joewing.net/projects/jwm/"
DOWNLOAD=" https://github.com/joewing/jwm/releases/download/v2.4.2/jwm-2.4.2.tar.xz"
MD5SUM="6ee49e3d525d6408aa51096fa8949413"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="shelldweller"
EMAIL="shelldweller@beauxbead.com"

19
jwm/slack-desc Normal file
View File

@ -0,0 +1,19 @@
# 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 ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
jwm: jwm (Joe's Window Manager)
jwm:
jwm: JWM (Joe's Window Manager) is a lightweight stacking window
jwm: manager for the X Window System written by Joe Wingbermuehle.
jwm: JWM is written in C and uses only Xlib at a minimum.
jwm: It provides an interface similar to Windows 98 with a modern-
jwm: looking appearance and it can support some GNOME, Motif and
jwm: Extended Window Manager Hints.
jwm:
jwm:
jwm:

26
jwm/xinitrc.jwm Normal file
View File

@ -0,0 +1,26 @@
#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f $userresources ]; then
xrdb -merge $userresources
fi
if [ -f $usermodmap ]; then
xmodmap $usermodmap
fi
exec /usr/bin/jwm

View File

@ -0,0 +1,175 @@
#!/bin/sh
# Copyright 2018, 2021 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# This script uses the SlackBuild scripts present here to build a
# complete set of kernel packages for the currently running architecture.
# It needs to be run once on 64-bit (uname -m = x86_64) and once on IA32
# (uname -m = i586 or i686).
cd $(dirname $0) ; CWD=$(pwd)
BUILD=${BUILD:-1}
if [ -z "$VERSION" ]; then
# Get the filename of the newest kernel tarball:
KERNEL_SOURCE_FILE="$(/bin/ls -t linux-*.tar.?z | head -n 1 )"
if echo $KERNEL_SOURCE_FILE | grep -q rc ; then # need to get rc versions a bit differently
VERSION=$(/bin/ls -t linux-*.tar.?z | head -n 1 | rev | cut -f 3- -d . | cut -f 1,2 -d - | rev)
else # normal release version
VERSION=$(/bin/ls -t linux-*.tar.?z | head -n 1 | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
fi
fi
TMP=${TMP:-/tmp}
# By default, install the packages as we build them and update the initrd.
INSTALL_PACKAGES=${INSTALL_PACKAGES:-YES}
# Clean kernels before building them. Not doing so quit working some time
# after 4.19.x.
export KERNEL_CLEAN=YES
# A list of recipes for build may be passed in the $RECIPES variable, otherwise
# we have defaults based on uname -m:
if [ -z "$RECIPES" ]; then
if uname -m | grep -wq x86_64 ; then
RECIPES="x86_64"
elif uname -m | grep -wq i.86 ; then
RECIPES="IA32_NO_SMP IA32_SMP"
else
echo "Error: no build recipes available for $(uname -m)"
exit 1
fi
fi
# Main build loop:
for recipe in $RECIPES ; do
# Build recipes are defined here. These will select the appropriate .config
# files and package naming scheme, and define the output location.
if [ "$recipe" = "x86_64" ]; then
# Recipe for x86_64:
CONFIG_SUFFIX=".x64"
unset LOCALVERSION
OUTPUT=${OUTPUT:-${TMP}/output-x86_64-${VERSION}}
elif [ "$recipe" = "IA32_SMP" ]; then
# Recipe for IA32_SMP:
unset CONFIG_SUFFIX
LOCALVERSION="-smp"
OUTPUT=${OUTPUT:-${TMP}/output-ia32-${VERSION}}
elif [ "$recipe" = "IA32_NO_SMP" ]; then
# Recipe for IA32_NO_SMP:
unset CONFIG_SUFFIX
unset LOCALVERSION
OUTPUT=${OUTPUT:-${TMP}/output-ia32-${VERSION}}
else
echo "Error: recipe ${recipe} not implemented"
exit 1
fi
echo
echo "*************************************************"
echo "* Building kernels for recipe ${recipe}..."
echo "*************************************************"
echo
# Build kernel-source package:
KERNEL_SOURCE_PACKAGE_NAME=$(PRINT_PACKAGE_NAME=YES KERNEL_CONFIG="config-generic${LOCALVERSION}-${VERSION}${LOCALVERSION}${CONFIG_SUFFIX}" VERSION=$VERSION BUILD=$BUILD ./kernel-source.SlackBuild)
KERNEL_CONFIG="config-generic${LOCALVERSION}-${VERSION}${LOCALVERSION}${CONFIG_SUFFIX}" VERSION=$VERSION BUILD=$BUILD ./kernel-source.SlackBuild
mkdir -p $OUTPUT
mv ${TMP}/${KERNEL_SOURCE_PACKAGE_NAME} $OUTPUT || exit 1
if [ "${INSTALL_PACKAGES}" = "YES" ]; then
installpkg ${OUTPUT}/${KERNEL_SOURCE_PACKAGE_NAME} || exit 1
fi
# Build kernel-huge package:
# We will build in the just-built kernel tree. First, let's put back the
# symlinks:
( cd $TMP/package-kernel-source
sh install/doinst.sh
)
KERNEL_HUGE_PACKAGE_NAME=$(PRINT_PACKAGE_NAME=YES KERNEL_NAME=huge KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-huge${LOCALVERSION}-${VERSION}${LOCALVERSION}${CONFIG_SUFFIX} CONFIG_SUFFIX=${CONFIG_SUFFIX} KERNEL_OUTPUT_DIRECTORY=$OUTPUT/kernels/huge$(echo ${LOCALVERSION} | tr -d -).s BUILD=$BUILD ./kernel-generic.SlackBuild)
KERNEL_NAME=huge KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-huge${LOCALVERSION}-${VERSION}${LOCALVERSION}${CONFIG_SUFFIX} CONFIG_SUFFIX=${CONFIG_SUFFIX} KERNEL_OUTPUT_DIRECTORY=$OUTPUT/kernels/huge$(echo ${LOCALVERSION} | tr -d -).s BUILD=$BUILD ./kernel-generic.SlackBuild
if [ -r ${TMP}/${KERNEL_HUGE_PACKAGE_NAME} ]; then
mv ${TMP}/${KERNEL_HUGE_PACKAGE_NAME} $OUTPUT
else
echo "kernel-source build failed."
exit 1
fi
if [ "${INSTALL_PACKAGES}" = "YES" ]; then
installpkg ${OUTPUT}/${KERNEL_HUGE_PACKAGE_NAME} || exit 1
fi
# Build kernel-generic package:
KERNEL_GENERIC_PACKAGE_NAME=$(PRINT_PACKAGE_NAME=YES KERNEL_NAME=generic KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-generic${LOCALVERSION}-${VERSION}${LOCALVERSION}${CONFIG_SUFFIX} CONFIG_SUFFIX=${CONFIG_SUFFIX} KERNEL_OUTPUT_DIRECTORY=$OUTPUT/kernels/generic$(echo ${LOCALVERSION} | tr -d -).s BUILD=$BUILD ./kernel-generic.SlackBuild)
KERNEL_NAME=generic KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-generic${LOCALVERSION}-${VERSION}${LOCALVERSION}${CONFIG_SUFFIX} CONFIG_SUFFIX=${CONFIG_SUFFIX} KERNEL_OUTPUT_DIRECTORY=$OUTPUT/kernels/generic$(echo ${LOCALVERSION} | tr -d -).s BUILD=$BUILD ./kernel-generic.SlackBuild
if [ -r ${TMP}/${KERNEL_GENERIC_PACKAGE_NAME} ]; then
mv ${TMP}/${KERNEL_GENERIC_PACKAGE_NAME} $OUTPUT
else
echo "kernel-generic build failed."
exit 1
fi
if [ "${INSTALL_PACKAGES}" = "YES" ]; then
installpkg ${OUTPUT}/${KERNEL_GENERIC_PACKAGE_NAME} || exit 1
fi
# Build kernel-modules (for the just built generic kernel, but most of them
# will also work with the huge kernel):
KERNEL_MODULES_PACKAGE_NAME=$(PRINT_PACKAGE_NAME=YES KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux KERNEL_CONFIG=$TMP/package-kernel-source/usr/src/linux/.config BUILD=$BUILD ./kernel-modules.SlackBuild)
KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux KERNEL_CONFIG=$TMP/package-kernel-source/usr/src/linux/.config BUILD=$BUILD ./kernel-modules.SlackBuild
if [ -r ${TMP}/${KERNEL_MODULES_PACKAGE_NAME} ]; then
mv ${TMP}/${KERNEL_MODULES_PACKAGE_NAME} $OUTPUT
else
echo "kernel-modules build failed."
exit 1
fi
if [ "${INSTALL_PACKAGES}" = "YES" ]; then
installpkg ${OUTPUT}/${KERNEL_MODULES_PACKAGE_NAME} || exit 1
fi
# Build kernel-headers:
KERNEL_HEADERS_PACKAGE_NAME=$(PRINT_PACKAGE_NAME=YES KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux BUILD=$BUILD ./kernel-headers.SlackBuild)
KERNEL_SOURCE=$TMP/package-kernel-source/usr/src/linux BUILD=$BUILD ./kernel-headers.SlackBuild
if [ -r ${TMP}/${KERNEL_HEADERS_PACKAGE_NAME} ]; then
mv ${TMP}/${KERNEL_HEADERS_PACKAGE_NAME} $OUTPUT
else
echo "kernel-headers build failed."
exit 1
fi
if [ "${INSTALL_PACKAGES}" = "YES" ]; then
upgradepkg --reinstall --install-new ${OUTPUT}/${KERNEL_HEADERS_PACKAGE_NAME} || exit 1
fi
# Update initrd:
if [ "${INSTALL_PACKAGES}" = "YES" ]; then
INITRD_VERSION="$(grep "Kernel Configuration" $TMP/package-kernel-source/usr/src/linux/.config | cut -f 3 -d ' ')"
INITRD_LOCALVERSION="$(cat $TMP/package-kernel-source/usr/src/linux/.config 2> /dev/null | grep CONFIG_LOCALVERSION= | cut -f 2 -d = | tr -d \")"
if [ -r /etc/mkinitrd.conf ]; then
mkinitrd -F /etc/mkinitrd.conf -k ${INITRD_VERSION}${INITRD_LOCALVERSION}
else # try this?
sh /usr/share/mkinitrd/mkinitrd_command_generator.sh -k ${INITRD_VERSION}${INITRD_LOCALVERSION} | sed "s/-c -k/-k/g" | bash
fi
fi
echo
echo "${recipe} kernel packages done!"
echo
done

View File

@ -0,0 +1,158 @@
#!/bin/sh
# Copyright 2018, 2020 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# To use this script, point it to a Linux kernel source tree and a .config
# file by setting the appropriate environment variables:
#
# KERNEL_SOURCE=/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-generic-4.14.23 ./kernel-generic.SlackBuild
#
# It can also build the huge (or any other) kernel:
#
# KERNEL_NAME=huge KERNEL_SOURCE=/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-huge-4.14.23 ./kernel-generic.SlackBuild
#
# By default, it will call the package "kernel-generic" and use the source and
# .config already in /usr/src/linux (if possible).
cd $(dirname $0) ; CWD=$(pwd)
KERNEL_NAME=${KERNEL_NAME:-generic}
KERNEL_SOURCE=${KERNEL_SOURCE:-/home/user/code/linux-libre/source}
KERNEL_CONFIG=${KERNEL_CONFIG:-/home/user/code/linux-libre/source/.config}
CONFIG_SUFFIX=${CONFIG_SUFFIX:-}
BUILD=${BUILD:-1}
if [ ! -r "${KERNEL_CONFIG}" ]; then
echo "Error: the KERNEL_CONFIG environment variable needs to be set to the"
echo ".config file to be used to build this kernel. Example:"
echo "KERNEL_NAME=generic KERNEL_SOURCE=/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-generic-4.14.23 ./kernel-generic.SlackBuild"
exit 1
fi
if [ ! -d "${KERNEL_SOURCE}" ]; then
echo "Error: kernel source directory ${KERNEL_SOURCE} does not exist."
exit 1
fi
# Get the kernel version from the kernel Makefile:
VERSION=$(grep "^VERSION = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev).$(grep "^PATCHLEVEL = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev).$(grep "^SUBLEVEL = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev)$(grep "^EXTRAVERSION = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev)
# Set LOCALVERSION to the value found inside the .config:
LOCALVERSION="$(cat ${KERNEL_SOURCE}/.config 2> /dev/null | grep CONFIG_LOCALVERSION= | cut -f 2 -d = | tr -d \")"
# The default kernel arch is x86 for all 32-bit and 64-bit x86:
if [ -z "${KERNEL_ARCH}" ]; then
case "$(uname -m)" in
i?86) KERNEL_ARCH=x86 ;;
x86_64) KERNEL_ARCH=x86 ;;
# Use uname -m for all other archs:
*) KERNEL_ARCH=$(uname -m) ;;
esac
fi
# If this variable is set to an output directory, we will also put copies of
# System.map.gz, bzImage, and config in there:
KERNEL_OUTPUT_DIRECTORY=${KERNEL_OUTPUT_DIRECTORY:-}
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
# We will need to copy the config and run make oldconfig and make
# prepare in order to generate kernel/bounds.s, where we can find
# the true $PACKAGE_ARCH.
if [ ! "${KERNEL_CONFIG}" = "${KERNEL_SOURCE}/.config" ]; then
cp -a ${KERNEL_CONFIG} ${KERNEL_SOURCE}/.config
fi
cd ${KERNEL_SOURCE}
make oldconfig 1> /dev/null 2> /dev/null
make prepare 1> /dev/null 2> /dev/null
PACKAGE_ARCH=$(cat kernel/bounds.s | grep -w "\-march=.*" | tr " " "\n" | grep -w "\-march=.*" | cut -f 2 -d = | tr - _)
echo "kernel-${KERNEL_NAME}${LOCALVERSION}-$(echo ${VERSION} | tr - _)$(echo ${LOCALVERSION} | tr - _)-${PACKAGE_ARCH}-$BUILD.txz"
exit 0
fi
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
TMP=${TMP:-/tmp}
PKG=$TMP/package-kernel-${KERNEL_NAME}
rm -rf $PKG
mkdir -p $TMP $PKG
# Set the variable $KERNEL_CLEAN to anything to run "make clean" before the
# build. Default is to start compiling in the tree as we found it.
if [ ! -z "${KERNEL_CLEAN}" ]; then
( cd ${KERNEL_SOURCE}
echo "Cleaning kernel source (make clean)..."
make clean
# Make sure header files aren't missing...
make prepare
# Don't package the kernel in the sources:
find . -name "*Image" -exec rm "{}" \+
# No need for these:
rm -f .config.old .version
find . -name "*.cmd" -exec rm -f "{}" \+
rm .*.d
)
fi
# Copy the .config into the kernel source directory (unless it's there already)
if [ ! "${KERNEL_CONFIG}" = "${KERNEL_SOURCE}/.config" ]; then
echo "Copying the .config file to the kernel source tree:"
cp -a --verbose ${KERNEL_CONFIG} ${KERNEL_SOURCE}/.config
fi
( cd ${KERNEL_SOURCE}
echo "Running make oldconfig..."
make oldconfig
echo "Building kernel..."
make $NUMJOBS bzImage || make bzImage || exit 1
# Output files to a directory, if requested:
if [ ! -z "${KERNEL_OUTPUT_DIRECTORY}" ]; then
echo "Copying files to ${KERNEL_OUTPUT_DIRECTORY}..."
mkdir -p ${KERNEL_OUTPUT_DIRECTORY}
rm -f ${KERNEL_OUTPUT_DIRECTORY}/*
cp -a --verbose System.map ${KERNEL_OUTPUT_DIRECTORY}
cp -a --verbose .config ${KERNEL_OUTPUT_DIRECTORY}/config
cp -a --verbose arch/${KERNEL_ARCH}/boot/bzImage ${KERNEL_OUTPUT_DIRECTORY}
gzip -9 ${KERNEL_OUTPUT_DIRECTORY}/System.map
fi
echo "Preparing the package in $PKG..."
mkdir -p $PKG/boot
cp -a --verbose System.map $PKG/boot/System.map-${KERNEL_NAME}${LOCALVERSION}-${VERSION}${LOCALVERSION}
cp -a --verbose .config $PKG/boot/config-${KERNEL_NAME}${LOCALVERSION}-${VERSION}${LOCALVERSION}${CONFIG_SUFFIX}
cp -a --verbose arch/${KERNEL_ARCH}/boot/bzImage $PKG/boot/vmlinuz-${KERNEL_NAME}${LOCALVERSION}-${VERSION}${LOCALVERSION}
# Make symlinks:
ln -sf System.map-${KERNEL_NAME}${LOCALVERSION}-${VERSION}${LOCALVERSION} $PKG/boot/System.map
ln -sf config-${KERNEL_NAME}${LOCALVERSION}-${VERSION}${LOCALVERSION}${CONFIG_SUFFIX} $PKG/boot/config
ln -sf vmlinuz-${KERNEL_NAME}${LOCALVERSION}-${VERSION}${LOCALVERSION} $PKG/boot/vmlinuz
ln -sf vmlinuz-${KERNEL_NAME}${LOCALVERSION}-${VERSION}${LOCALVERSION} $PKG/boot/vmlinuz-${KERNEL_NAME}${LOCALVERSION}
) || exit 1
# Fetch the kernel architecture from the source tree:
cd ${KERNEL_SOURCE}
PACKAGE_ARCH=$(cat kernel/bounds.s | grep -w "\-march=.*" | tr " " "\n" | grep -w "\-march=.*" | cut -f 2 -d = | tr - _)
mkdir $PKG/install
if [ -r $CWD/slack-desc/slack-desc.kernel-${KERNEL_NAME}${LOCALVERSION}.${PACKAGE_ARCH} ]; then
cat $CWD/slack-desc/slack-desc.kernel-${KERNEL_NAME}${LOCALVERSION}.${PACKAGE_ARCH} > $PKG/install/slack-desc
else
cat $CWD/slack-desc/slack-desc.kernel-template | sed "s/%PACKAGE_NAME%/kernel-${KERNEL_NAME}${LOCALVERSION}/g" > $PKG/install/slack-desc
fi
# Make the package:
cd $PKG
/sbin/makepkg -l y -c n $TMP/kernel-${KERNEL_NAME}${LOCALVERSION}-$(echo ${VERSION} | tr - _)$(echo ${LOCALVERSION} | tr - _)-${PACKAGE_ARCH}-$BUILD.txz

View File

@ -0,0 +1,90 @@
#!/bin/sh
# Copyright 2018 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# To use this script, point it to a Linux kernel source tree, and it will make
# the kernel-headers package using the .config to get all needed package
# version information:
#
# KERNEL_SOURCE=/usr/src/linux ./kernel-headers.SlackBuild
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=${PKGNAM:-kernel-headers}
BUILD=${BUILD:-1}
KERNEL_SOURCE=${KERNEL_SOURCE:-/home/user/code/linux-libre/source}
if [ -z "${HEADERS_ARCH}" ]; then
case "$(uname -m)" in
i?86) HEADERS_ARCH=x86 ;;
x86_64) HEADERS_ARCH=x86 ;;
# Use uname -m for all other archs:
*) HEADERS_ARCH=$(uname -m) ;;
esac
fi
if [ ! -d "${KERNEL_SOURCE}" ]; then
echo "Error: kernel source directory ${KERNEL_SOURCE} does not exist."
exit 1
elif [ ! -r ${KERNEL_SOURCE}/.config ]; then
echo "Error: a .config was not found in ${KERNEL_SOURCE}."
exit 1
fi
# Get the kernel version from the kernel Makefile:
VERSION=$(grep "^VERSION = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev).$(grep "^PATCHLEVEL = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev).$(grep "^SUBLEVEL = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev)$(grep "^EXTRAVERSION = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev)
# Set LOCALVERSION to the value found inside the .config:
LOCALVERSION="$(cat ${KERNEL_SOURCE}/.config 2> /dev/null | grep CONFIG_LOCALVERSION= | cut -f 2 -d = | tr -d \")"
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "kernel-headers-$(echo ${VERSION} | tr - _)$(echo ${LOCALVERSION} | tr - _)-${HEADERS_ARCH}-$BUILD.txz"
exit 0
fi
rm -rf $PKG
mkdir -p $TMP $PKG
mkdir -p $PKG/usr
# Generate the kernel headers and clean them up:
( cd ${KERNEL_SOURCE}
echo "Generating headers from the Linux kernel source tree in ${KERNEL_SOURCE}:"
make headers_install ARCH=${HEADERS_ARCH} INSTALL_HDR_PATH=$PKG/usr
cd $PKG/usr/include
# You won't want these files. The ones in libdrm work better.
rm -rf drm
# This next part seems pretty much cosmetic, but since we've been doing this
# for a long time (and others also do), we'll stick with it:
mv asm asm-${HEADERS_ARCH}
ln -sf asm-${HEADERS_ARCH} asm
# Remove unneeded dotfiles:
find . -name ".??*" -exec rm -f {} \+
)
mkdir -p $PKG/install
cat $CWD/slack-desc/slack-desc.kernel-headers > $PKG/install/slack-desc
# Make the package:
cd $PKG
/sbin/makepkg -l y -c n $TMP/kernel-headers-$(echo ${VERSION} | tr - _)$(echo ${LOCALVERSION} | tr - _)-${HEADERS_ARCH}-$BUILD.txz

View File

@ -0,0 +1,158 @@
#!/bin/sh
# Copyright 2018, 2020 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# To use this script, point it to a Linux kernel source tree and a .config
# file by setting the appropriate environment variables:
#
# KERNEL_SOURCE=/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-generic-4.14.23 ./kernel-generic.SlackBuild
#
# It can also build the huge (or any other) kernel:
#
# KERNEL_NAME=huge KERNEL_SOURCE=/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-huge-4.14.23 ./kernel-generic.SlackBuild
#
# By default, it will call the package "kernel-huge" and use the source and
# .config already in /usr/src/linux (if possible).
cd $(dirname $0) ; CWD=$(pwd)
KERNEL_NAME=${KERNEL_NAME:-huge}
KERNEL_SOURCE=${KERNEL_SOURCE:-/home/user/code/linux-libre/source}
KERNEL_CONFIG=${KERNEL_CONFIG:-/home/user/code/linux-libre/source/.config}
CONFIG_SUFFIX=${CONFIG_SUFFIX:-}
BUILD=${BUILD:-1}
if [ ! -r "${KERNEL_CONFIG}" ]; then
echo "Error: the KERNEL_CONFIG environment variable needs to be set to the"
echo ".config file to be used to build this kernel. Example:"
echo "KERNEL_NAME=huge KERNEL_SOURCE=/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-huge-4.14.23 ./kernel-huge.SlackBuild"
exit 1
fi
if [ ! -d "${KERNEL_SOURCE}" ]; then
echo "Error: kernel source directory ${KERNEL_SOURCE} does not exist."
exit 1
fi
# Get the kernel version from the kernel Makefile:
VERSION=$(grep "^VERSION = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev).$(grep "^PATCHLEVEL = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev).$(grep "^SUBLEVEL = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev)$(grep "^EXTRAVERSION = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev)
# Set LOCALVERSION to the value found inside the .config:
LOCALVERSION="$(cat ${KERNEL_SOURCE}/.config 2> /dev/null | grep CONFIG_LOCALVERSION= | cut -f 2 -d = | tr -d \")"
# The default kernel arch is x86 for all 32-bit and 64-bit x86:
if [ -z "${KERNEL_ARCH}" ]; then
case "$(uname -m)" in
i?86) KERNEL_ARCH=x86 ;;
x86_64) KERNEL_ARCH=x86 ;;
# Use uname -m for all other archs:
*) KERNEL_ARCH=$(uname -m) ;;
esac
fi
# If this variable is set to an output directory, we will also put copies of
# System.map.gz, bzImage, and config in there:
KERNEL_OUTPUT_DIRECTORY=${KERNEL_OUTPUT_DIRECTORY:-}
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
# We will need to copy the config and run make oldconfig and make
# prepare in order to generate kernel/bounds.s, where we can find
# the true $PACKAGE_ARCH.
if [ ! "${KERNEL_CONFIG}" = "${KERNEL_SOURCE}/.config" ]; then
cp -a ${KERNEL_CONFIG} ${KERNEL_SOURCE}/.config
fi
cd ${KERNEL_SOURCE}
make oldconfig 1> /dev/null 2> /dev/null
make prepare 1> /dev/null 2> /dev/null
PACKAGE_ARCH=$(cat kernel/bounds.s | grep -w "\-march=.*" | tr " " "\n" | grep -w "\-march=.*" | cut -f 2 -d = | tr - _)
echo "kernel-${KERNEL_NAME}${LOCALVERSION}-$(echo ${VERSION} | tr - _)$(echo ${LOCALVERSION} | tr - _)-${PACKAGE_ARCH}-$BUILD.txz"
exit 0
fi
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
TMP=${TMP:-/tmp}
PKG=$TMP/package-kernel-${KERNEL_NAME}
rm -rf $PKG
mkdir -p $TMP $PKG
# Set the variable $KERNEL_CLEAN to anything to run "make clean" before the
# build. Default is to start compiling in the tree as we found it.
if [ ! -z "${KERNEL_CLEAN}" ]; then
( cd ${KERNEL_SOURCE}
echo "Cleaning kernel source (make clean)..."
make clean
# Make sure header files aren't missing...
make prepare
# Don't package the kernel in the sources:
find . -name "*Image" -exec rm "{}" \+
# No need for these:
rm -f .config.old .version
find . -name "*.cmd" -exec rm -f "{}" \+
rm .*.d
)
fi
# Copy the .config into the kernel source directory (unless it's there already)
if [ ! "${KERNEL_CONFIG}" = "${KERNEL_SOURCE}/.config" ]; then
echo "Copying the .config file to the kernel source tree:"
cp -a --verbose ${KERNEL_CONFIG} ${KERNEL_SOURCE}/.config
fi
( cd ${KERNEL_SOURCE}
echo "Running make oldconfig..."
make oldconfig
echo "Building kernel..."
make $NUMJOBS bzImage || make bzImage || exit 1
# Output files to a directory, if requested:
if [ ! -z "${KERNEL_OUTPUT_DIRECTORY}" ]; then
echo "Copying files to ${KERNEL_OUTPUT_DIRECTORY}..."
mkdir -p ${KERNEL_OUTPUT_DIRECTORY}
rm -f ${KERNEL_OUTPUT_DIRECTORY}/*
cp -a --verbose System.map ${KERNEL_OUTPUT_DIRECTORY}
cp -a --verbose .config ${KERNEL_OUTPUT_DIRECTORY}/config
cp -a --verbose arch/${KERNEL_ARCH}/boot/bzImage ${KERNEL_OUTPUT_DIRECTORY}
gzip -9 ${KERNEL_OUTPUT_DIRECTORY}/System.map
fi
echo "Preparing the package in $PKG..."
mkdir -p $PKG/boot
cp -a --verbose System.map $PKG/boot/System.map-${KERNEL_NAME}${LOCALVERSION}-${VERSION}${LOCALVERSION}
cp -a --verbose .config $PKG/boot/config-${KERNEL_NAME}${LOCALVERSION}-${VERSION}${LOCALVERSION}${CONFIG_SUFFIX}
cp -a --verbose arch/${KERNEL_ARCH}/boot/bzImage $PKG/boot/vmlinuz-${KERNEL_NAME}${LOCALVERSION}-${VERSION}${LOCALVERSION}
# Make symlinks:
ln -sf System.map-${KERNEL_NAME}${LOCALVERSION}-${VERSION}${LOCALVERSION} $PKG/boot/System.map
ln -sf config-${KERNEL_NAME}${LOCALVERSION}-${VERSION}${LOCALVERSION}${CONFIG_SUFFIX} $PKG/boot/config
ln -sf vmlinuz-${KERNEL_NAME}${LOCALVERSION}-${VERSION}${LOCALVERSION} $PKG/boot/vmlinuz
ln -sf vmlinuz-${KERNEL_NAME}${LOCALVERSION}-${VERSION}${LOCALVERSION} $PKG/boot/vmlinuz-${KERNEL_NAME}${LOCALVERSION}
) || exit 1
# Fetch the kernel architecture from the source tree:
cd ${KERNEL_SOURCE}
PACKAGE_ARCH=$(cat kernel/bounds.s | grep -w "\-march=.*" | tr " " "\n" | grep -w "\-march=.*" | cut -f 2 -d = | tr - _)
mkdir $PKG/install
if [ -r $CWD/slack-desc/slack-desc.kernel-${KERNEL_NAME}${LOCALVERSION}.${PACKAGE_ARCH} ]; then
cat $CWD/slack-desc/slack-desc.kernel-${KERNEL_NAME}${LOCALVERSION}.${PACKAGE_ARCH} > $PKG/install/slack-desc
else
cat $CWD/slack-desc/slack-desc.kernel-template | sed "s/%PACKAGE_NAME%/kernel-${KERNEL_NAME}${LOCALVERSION}/g" > $PKG/install/slack-desc
fi
# Make the package:
cd $PKG
/sbin/makepkg -l y -c n $TMP/kernel-${KERNEL_NAME}${LOCALVERSION}-$(echo ${VERSION} | tr - _)$(echo ${LOCALVERSION} | tr - _)-${PACKAGE_ARCH}-$BUILD.txz

View File

@ -0,0 +1,135 @@
#!/bin/sh
# Copyright 2018, 2020 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# To use this script, point it to a Linux kernel source tree and a .config
# file by setting the appropriate environment variables:
#
# KERNEL_SOURCE=/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-generic-4.14.23 ./kernel-modules.SlackBuild
#
# By default, it will use the source and .config already in /usr/src/linux (if possible).
# KERNEL_NAME is optional, and we don't use it. Define it to "-name" if
# you'd like an extra string after "kernel" in the package name
# (i.e. "kernel-name-modules").
cd $(dirname $0) ; CWD=$(pwd)
KERNEL_NAME=${KERNEL_NAME:-}
KERNEL_SOURCE=${KERNEL_SOURCE:-/home/user/code/linux-libre/source}
KERNEL_CONFIG=${KERNEL_CONFIG:-/home/user/code/linux-libre/source/.config}
BUILD=${BUILD:-1}
if [ ! -r "${KERNEL_CONFIG}" ]; then
echo "Error: the KERNEL_CONFIG environment variable needs to be set to the"
echo ".config file to be used to build these modules. Example:"
echo "KERNEL_SOURCE=/usr/src/linux KERNEL_CONFIG=./kernel-configs/config-generic-4.14.23 ./kernel-modules.SlackBuild"
exit 1
fi
if [ ! -d "${KERNEL_SOURCE}" ]; then
echo "Error: kernel source directory ${KERNEL_SOURCE} does not exist."
exit 1
fi
# Get the kernel version from the kernel Makefile:
VERSION=$(grep "^VERSION = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev).$(grep "^PATCHLEVEL = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev).$(grep "^SUBLEVEL = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev)$(grep "^EXTRAVERSION = " ${KERNEL_SOURCE}/Makefile | rev | cut -f 1 -d ' ' | rev)
# Set LOCALVERSION to the value found inside the .config:
LOCALVERSION="$(cat ${KERNEL_SOURCE}/.config 2> /dev/null | grep CONFIG_LOCALVERSION= | cut -f 2 -d = | tr -d \")"
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
# We will need to copy the config and run make oldconfig and make
# prepare in order to generate kernel/bounds.s, where we can find
# the true $PACKAGE_ARCH.
if [ ! "${KERNEL_CONFIG}" = "${KERNEL_SOURCE}/.config" ]; then
cp -a ${KERNEL_CONFIG} ${KERNEL_SOURCE}/.config
fi
cd ${KERNEL_SOURCE}
make oldconfig 1> /dev/null 2> /dev/null
make prepare 1> /dev/null 2> /dev/null
PACKAGE_ARCH=$(cat kernel/bounds.s | grep -w "\-march=.*" | tr " " "\n" | grep -w "\-march=.*" | cut -f 2 -d = | tr - _)
echo "kernel${KERNEL_NAME}-modules${LOCALVERSION}-$(echo ${VERSION} | tr - _)$(echo ${LOCALVERSION} | tr - _)-${PACKAGE_ARCH}-$BUILD.txz"
exit 0
fi
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
TMP=${TMP:-/tmp}
PKG=$TMP/package-kernel${KERNEL_NAME}-modules
rm -rf $PKG
mkdir -p $TMP $PKG
# Set the variable $KERNEL_CLEAN to anything to run "make clean" before the
# build. Default is to start compiling in the tree as we found it.
if [ ! -z "${KERNEL_CLEAN}" ]; then
( cd ${KERNEL_SOURCE}
echo "Cleaning kernel source (make clean)..."
make clean
# Make sure header files aren't missing...
make prepare
# Don't package the kernel in the sources:
find . -name "*Image" -exec rm "{}" \+
# No need for these:
rm -f .config.old .version
find . -name "*.cmd" -exec rm -f "{}" \+
rm .*.d
)
fi
# Copy the .config into the kernel source directory (unless it's there already)
if [ ! "${KERNEL_CONFIG}" = "${KERNEL_SOURCE}/.config" ]; then
echo "Copying the .config file to the kernel source tree:"
cp -a --verbose ${KERNEL_CONFIG} ${KERNEL_SOURCE}/.config
fi
( cd ${KERNEL_SOURCE}
echo "Running make oldconfig..."
make oldconfig
echo "Running a preliminary make (needed to create modules.builtin.modinfo)..."
make $NUMJOBS || exit 1
echo "Building kernel modules..."
make $NUMJOBS modules || exit 1
echo "Installing kernel modules to $PKG..."
make INSTALL_MOD_PATH=$PKG modules_install || exit 1
# Fix build and source symlinks if they are pointing into /tmp:
( cd $PKG/lib/modules/${VERSION}${LOCALVERSION}
for symlink in build source ; do
target=$(readlink $symlink)
if echo $target | grep -q "^/tmp/package-kernel-source/" ; then
rm -f $symlink
ln -sf $(echo $target | sed "s|/tmp/package-kernel-source/|/|g") $symlink
fi
done
)
depmod -b $PKG -a ${VERSION}${LOCALVERSION}
) || exit 1
mkdir $PKG/install
cat $CWD/slack-desc/slack-desc.kernel-modules-template | sed "s/%PACKAGE_NAME%/kernel${KERNEL_NAME}-modules${LOCALVERSION}/g" > $PKG/install/slack-desc
# Fetch the kernel architecture from the source tree:
cd ${KERNEL_SOURCE}
PACKAGE_ARCH=$(cat kernel/bounds.s | grep -w "\-march=.*" | tr " " "\n" | grep -w "\-march=.*" | cut -f 2 -d = | tr - _)
# Make the package:
cd $PKG
/sbin/makepkg -l y -c n $TMP/kernel${KERNEL_NAME}-modules${LOCALVERSION}-$(echo ${VERSION} | tr - _)$(echo ${LOCALVERSION} | tr - _)-${PACKAGE_ARCH}-$BUILD.txz

View File

@ -0,0 +1,176 @@
#!/bin/sh
# Copyright 2018, 2020 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=${PKGNAM:-kernel-source}
BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
# If a $VERSION is not passed to this script, use the newest linux-*.tar.xz
# found in this directory:
VERSION=${VERSION:-$(/bin/ls -t linux-*.tar.?z | head -n 1 | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
if ! /bin/ls linux-*.tar.?z 1> /dev/null 2> /dev/null ; then
echo "Error: kernel source not found. (/bin/ls linux-*.tar.?z)"
fi
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
# Use uname -m for all archs:
*) ARCH=$(uname -m) ;;
esac
fi
# Kernel extraversion, such as "-smp" on 32-bit. There's usually no need to set
# this unless you're using something unusual. We use it to find which .config
# file to use, but we'll then use whatever CONFIG_LOCALVERSION is set to
# inside the .config.
LOCALVERSION=${LOCALVERSION:-""}
# If KERNEL_CONFIG (name of kernel .config file in ./kernel-configs to use)
# has not been passed to this script, then we will select one. We will prefer
# to use a generic, SMP-supporting .config with a version number exactly
# matching the kernel sources. But if there's no exact version match, we will
# start with the newest .config we can find that's of the appropriate type.
if [ -z "${KERNEL_CONFIG}" ]; then # figure out the best matching .config
if [ "$ARCH" = "x86_64" ]; then
CONFIG_SUFFIX=".x64"
fi
if [ -z "${LOCALVERSION}" ]; then
if echo $ARCH | grep -q -E "i?86$" ; then
# Default to SMP extraversion on 32-bit:
LOCALVERSION="-smp"
fi
fi
if [ -r "$CWD/kernel-configs/config-generic${LOCALVERSION}-${VERSION}$LOCALVERSION${CONFIG_SUFFIX}" ]; then
# Exact match!
KERNEL_CONFIG="config-generic${LOCALVERSION}-${VERSION}${LOCALVERSION}${CONFIG_SUFFIX}"
else # no exact match, so find newest with the same name:
FIND_MATCH="$(/bin/ls -t $CWD/kernel-configs/config-generic${LOCALVERSION}-*${LOCALVERSION}${CONFIG_SUFFIX} 2> /dev/null | head -n 1)"
if [ -r "${FIND_MATCH}" ]; then
KERNEL_CONFIG="$(basename ${FIND_MATCH})"
unset FIND_MATCH
else
echo "Error: no matching .config file could be found for this kernel. Tried:"
echo " $CWD/kernel-configs/config-generic${LOCALVERSION}-${VERSION}${LOCALVERSION}${CONFIG_SUFFIX} (not found)"
exit 1
fi
fi
else # We were given a name to use:
if [ ! -r "$CWD/kernel-configs/${KERNEL_CONFIG}" ]; then
echo "Error: specified kernel .config $CWD/kernel-configs/${KERNEL_CONFIG} was not found."
exit 1
fi
fi
# Set LOCALVERSION to the value found inside the .config:
LOCALVERSION="$(cat $CWD/kernel-configs/${KERNEL_CONFIG} | grep CONFIG_LOCALVERSION= | cut -f 2 -d = | tr -d \")"
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
# We will have to extract and patch the kernel sources to find out the kernel version:
TEMPDIR=$(mktemp -d)
cd $TEMPDIR
tar xf $CWD/linux-${VERSION}.tar.?z || exit 1
cd linux*
if [ -d $CWD/patches-${VERSION} ]; then
zcat $CWD/patches-${VERSION}/*.gz | patch -p1 --backup --suffix=.orig 1> /dev/null 2> /dev/null || exit 1
fi
PACKAGE_VERSION=$(grep "^VERSION = " Makefile | rev | cut -f 1 -d ' ' | rev).$(grep "^PATCHLEVEL = " Makefile | rev | cut -f 1 -d ' ' | rev).$(grep "^SUBLEVEL = " Makefile | rev | cut -f 1 -d ' ' | rev)$(grep "^EXTRAVERSION = " Makefile | rev | cut -f 1 -d ' ' | rev)
cd $CWD
rm -rf $TEMPDIR
echo "kernel-source-$(echo ${PACKAGE_VERSION} | tr - _)$(echo ${LOCALVERSION} | tr - _)-noarch-$BUILD.txz"
exit 0
fi
echo "Using kernel config: $CWD/kernel-configs/${KERNEL_CONFIG}"
rm -rf $PKG
mkdir -p $TMP $PKG
mkdir -p $PKG/usr/src
echo "Untarring $CWD/linux-${VERSION}.tar.?z in $PKG/usr/src..."
( cd $PKG/usr/src
tar xf $CWD/linux-${VERSION}.tar.?z || exit 1
echo "Making /usr/src/linux symlink..."
ln -sf linux-* linux
cd linux-*
if [ -d $CWD/patches-${VERSION} ]; then
echo "Applying kernel patches in $CWD/patches-${VERSION} and copying patches to $PKG/usr/src/linux-${VERSION}..."
zcat $CWD/patches-${VERSION}/*.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1
cp -a $CWD/patches-${VERSION}/*.gz .
fi
echo "Copying $CWD/kernel-configs/${KERNEL_CONFIG} to .config..."
cp -a $CWD/kernel-configs/${KERNEL_CONFIG} .config
echo "Fixing permissions/ownership..."
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
) || exit 1
# Kernel is now ready to configure. We will also build this kernel so that
# the installed kernel source package is fully configured, and building an
# out-of-tree module (such as the NVIDIA driver) won't require the user
# to build the kernel sources first.
( cd $PKG/usr/src/linux-${VERSION}
echo "Making oldconfig..."
make oldconfig
if [ ! -r $CWD/kernel-configs/config-generic${LOCALVERSION}-${VERSION}${LOCALVERSION}${CONFIG_SUFFIX} ]; then
echo "Saving new .config as: $CWD/kernel-configs/config-generic${LOCALVERSION}-${VERSION}${LOCALVERSION}${CONFIG_SUFFIX}"
cp -a .config $CWD/kernel-configs/config-generic${LOCALVERSION}-${VERSION}${LOCALVERSION}${CONFIG_SUFFIX}
fi
echo "Building kernel and modules (needed before clean for building NVIDIA to work)..."
make ${NUMJOBS} || exit 1
make ${NUMJOBS} modules || exit 1
echo "Cleaning up..."
make clean
# Make sure header files aren't missing...
make prepare
# Don't package the kernel in the sources:
find . -name "*Image" -exec rm "{}" \+
# No need for these:
rm -f .config.old .version
find . -name "*.cmd" -exec rm -f "{}" \+
rm .*.d
# Still some dotfiles laying around... probably fine though
) || exit 1
cd $PKG/usr/src/linux-${VERSION}
# Use the version number found in the Makefile in the package name. This is not
# always the same as the version in the source tarball's filename. For example,
# linux-4.14.tar.xz will have 4.14.0 as the version in the Makefile:
PACKAGE_VERSION=$(grep "^VERSION = " Makefile | rev | cut -f 1 -d ' ' | rev).$(grep "^PATCHLEVEL = " Makefile | rev | cut -f 1 -d ' ' | rev).$(grep "^SUBLEVEL = " Makefile | rev | cut -f 1 -d ' ' | rev)$(grep "^EXTRAVERSION = " Makefile | rev | cut -f 1 -d ' ' | rev)
mkdir $PKG/install
cat $CWD/slack-desc/slack-desc.kernel-source > $PKG/install/slack-desc
# Make the package:
cd $PKG
/sbin/makepkg -l y -c n $TMP/kernel-source-$(echo ${PACKAGE_VERSION} | tr - _)$(echo ${LOCALVERSION} | tr - _)-noarch-$BUILD.txz

View File

@ -0,0 +1,19 @@
# 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------------------------------------------------------|
kernel-generic-smp: kernel-generic-smp (a general purpose SMP Linux kernel)
kernel-generic-smp:
kernel-generic-smp: This is a Linux kernel with built-in support for most disk
kernel-generic-smp: controllers. To use filesystems, or to load support for a SCSI or
kernel-generic-smp: other controller, then you'll need to load one or more kernel
kernel-generic-smp: modules using an initial ramdisk, or initrd. For more information
kernel-generic-smp: about creating an initrd, see the README.initrd file in the /boot
kernel-generic-smp: directory.
kernel-generic-smp:
kernel-generic-smp: SMP is "Symmetric multiprocessing", or multiple CPU/core support.
kernel-generic-smp:

View File

@ -0,0 +1,19 @@
# 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------------------------------------------------------|
kernel-generic: kernel-generic (a general purpose single processor Linux kernel)
kernel-generic:
kernel-generic: A Linux kernel with built-in support for most disk controllers.
kernel-generic: For filesystem support, or if you need to load support for a SCSI or
kernel-generic: other controller, then you'll need to load one or more kernel modules
kernel-generic: using an initial ramdisk, or initrd. For more information about
kernel-generic: creating an initrd, see the README.initrd file in the /boot directory.
kernel-generic:
kernel-generic:
kernel-generic:
kernel-generic:

View File

@ -0,0 +1,19 @@
# 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------------------------------------------------------|
kernel-generic: kernel-generic (a general purpose SMP Linux kernel)
kernel-generic:
kernel-generic: This is a Linux kernel with built-in support for most disk
kernel-generic: controllers. To use filesystems, or to load support for a SCSI or
kernel-generic: other controller, then you'll need to load one or more kernel
kernel-generic: modules using an initial ramdisk, or initrd. For more information
kernel-generic: about creating an initrd, see the README.initrd file in the /boot
kernel-generic: directory.
kernel-generic:
kernel-generic: SMP is "Symmetric multiprocessing", or multiple CPU/core support.
kernel-generic:

View File

@ -0,0 +1,19 @@
# 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------------------------------------------------------|
kernel-headers: kernel-headers (Linux kernel include files)
kernel-headers:
kernel-headers: These are the include files from the Linux kernel.
kernel-headers:
kernel-headers: You'll need these to compile most system software for Linux.
kernel-headers:
kernel-headers:
kernel-headers:
kernel-headers:
kernel-headers:
kernel-headers:

View File

@ -0,0 +1,19 @@
# 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------------------------------------------------------|
kernel-huge-smp: kernel-huge-smp (a fully-loaded SMP Linux kernel)
kernel-huge-smp:
kernel-huge-smp: This is a Linux kernel with built-in support for most disk
kernel-huge-smp: controllers. If you're looking for a more stripped down kernel
kernel-huge-smp: (this one contains everything but the kitchen sink ;-), then install
kernel-huge-smp: the kernel-generic-smp in the /boot directory along with an initrd to
kernel-huge-smp: load support for your boot device and filesystem. For instructions
kernel-huge-smp: on the initrd, see README.initrd in the /boot directory.
kernel-huge-smp:
kernel-huge-smp: SMP is "Symmetric multiprocessing", or multiple CPU/core support.
kernel-huge-smp:

View File

@ -0,0 +1,19 @@
# 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------------------------------------------------------|
kernel-huge: kernel-huge (a fully-loaded single processor Linux kernel)
kernel-huge:
kernel-huge: This is a Linux kernel with built-in support for most disk controllers
kernel-huge: and filesystems. If you're looking for a more stripped down kernel
kernel-huge: (this one contains everything but the kitchen sink ;-), then install
kernel-huge: the kernel-generic from the /boot directory along with an initrd to
kernel-huge: load support for your boot device and filesystem. For instructions
kernel-huge: on the initrd, see README.initrd in the /boot directory.
kernel-huge:
kernel-huge:
kernel-huge:

View File

@ -0,0 +1,19 @@
# 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------------------------------------------------------|
kernel-huge: kernel-huge (a fully-loaded SMP Linux kernel)
kernel-huge:
kernel-huge: This is a Linux kernel with built-in support for most disk
kernel-huge: controllers. If you're looking for a more stripped down kernel
kernel-huge: (this one contains everything but the kitchen sink ;-), then install
kernel-huge: the kernel-generic in the /boot directory along with an initrd to
kernel-huge: load support for your boot device and filesystem. For instructions
kernel-huge: on the initrd, see README.initrd in the /boot directory.
kernel-huge:
kernel-huge: SMP is "Symmetric multiprocessing", or multiple CPU/core support.
kernel-huge:

View File

@ -0,0 +1,19 @@
# 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------------------------------------------------------|
%PACKAGE_NAME%: %PACKAGE_NAME% (Linux kernel modules)
%PACKAGE_NAME%:
%PACKAGE_NAME%: Kernel modules are pieces of code that can be loaded and unloaded into
%PACKAGE_NAME%: the kernel upon demand. They extend the functionality of the kernel
%PACKAGE_NAME%: without the need to reboot the system. These modules provide support
%PACKAGE_NAME%: for hardware such as USB devices, RAID controllers, network
%PACKAGE_NAME%: interfaces, and display devices, or add other additional capabilities
%PACKAGE_NAME%: to the kernel.
%PACKAGE_NAME%:
%PACKAGE_NAME%:
%PACKAGE_NAME%:

View File

@ -0,0 +1,19 @@
# 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------------------------------------------------------|
kernel-source: kernel-source (Linux kernel source)
kernel-source:
kernel-source: Source code for Linus Torvalds' Linux kernel.
kernel-source:
kernel-source: This is the complete and unmodified source code for the Linux kernel.
kernel-source:
kernel-source:
kernel-source:
kernel-source:
kernel-source:
kernel-source:

View File

@ -0,0 +1,19 @@
# 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------------------------------------------------------|
kernel-source: kernel-source (Linux kernel source)
kernel-source:
kernel-source: Source code for Linus Torvalds' Linux kernel.
kernel-source:
kernel-source: This is the complete and unmodified source code for the Linux kernel.
kernel-source:
kernel-source:
kernel-source:
kernel-source:
kernel-source:
kernel-source:

View File

@ -0,0 +1,19 @@
# 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------------------------------------------------------|
%PACKAGE_NAME%: %PACKAGE_NAME% (a Linux kernel)
%PACKAGE_NAME%:
%PACKAGE_NAME%: This is a Linux kernel with built-in support for most disk
%PACKAGE_NAME%: controllers. To use filesystems, or to load support for a SCSI or
%PACKAGE_NAME%: other controller, then you'll need to load one or more kernel
%PACKAGE_NAME%: modules using an initial ramdisk, or initrd. For more information
%PACKAGE_NAME%: about creating an initrd, see the README.initrd file in the /boot
%PACKAGE_NAME%: directory.
%PACKAGE_NAME%:
%PACKAGE_NAME%:
%PACKAGE_NAME%:

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

BIN
qt5-patch2/doinst.sh.gz Normal file

Binary file not shown.

View File

@ -0,0 +1,61 @@
#!/bin/bash
# Copyright 2021 Heinz Wiesinger, Amsterdam, The Netherlands
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
BRANCH="5.15.3"
rm -f qt-everywhere-src-*.tar*
git clone https://invent.kde.org/qt/qt/qt5.git
cd qt5
git checkout kde/5.15
./init-repository
# Sync qtwebengine version with the rest of qt5
sed -i -E "s/5.15.(.*)/5.15.3/" qtwebengine/.qmake.conf
for i in $(find . -type d -name "qt*" -maxdepth 1); do
cd $i
../qtbase/bin/syncqt.pl -version $BRANCH
cd ..
done
# Not in the release tarball for 5.15.2
rm -rf qtqa qtrepotools qtsystems qtpim qtfeedback qtdocgallery qtcanvas3d
rm -rf qtdatavis3d/tools qtcharts/tools
rm -f init-repository README.git .commit-template
VERSION="${BRANCH}_$(git log --format="%ad_%h" --date=short | head -n 1 | tr -d -)"
LONGDATE="$(git log -1 --format=%cd --date=format:%c )"
cd ..
mv qt5 qt-everywhere-src-$VERSION
tar --exclude-vcs -cf qt-everywhere-src-$VERSION.tar qt-everywhere-src-$VERSION
tar -cf qt5-gitmodules.tar qt-everywhere-src-$VERSION/**/.gitmodules qt-everywhere-src-$VERSION/.gitmodules
tar --concatenate --file=qt-everywhere-src-$VERSION.tar qt5-gitmodules.tar
plzip -9 -v qt-everywhere-src-$VERSION.tar
touch -d "$LONGDATE" qt-everywhere-src-$VERSION.tar.lz
rm -rf qt-everywhere-src-$VERSION
rm -f qt5-gitmodules.tar

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,27 @@
#!/bin/csh
# Environment path variables for the Qt package:
if ( ! $?QT5DIR ) then
# It's best to use the generic directory to avoid
# compiling in a version-containing path:
if ( -d /usr/lib@LIBDIRSUFFIX@/qt5 ) then
setenv QT5DIR /usr/lib@LIBDIRSUFFIX@/qt5
else
# Find the newest Qt directory and set $QT5DIR to that:
foreach qtd ( /usr/lib@LIBDIRSUFFIX@/qt5-* )
if ( -d $qtd ) then
setenv QT5DIR $qtd
endif
end
endif
endif
set path = ( $path $QT5DIR/bin )
# Unfortunately Chromium and derived projects (including QtWebEngine) seem
# to be suffering some bitrot when it comes to 32-bit support, so we are
# forced to disable the seccomp filter sandbox on 32-bit or else all of these
# applications crash. If anyone has a patch that gets these things running on
# 32-bit without this workaround, please let volkerdi or alienBOB know, or
# post your solution on LQ. Thanks. :-)
file /bin/cat | grep -wq 32-bit
if ( "$?" == "0" ) then
setenv QTWEBENGINE_CHROMIUM_FLAGS "--disable-seccomp-filter-sandbox"
endif

View File

@ -0,0 +1,26 @@
#!/bin/sh
# Environment variables for the Qt package.
#
# It's best to use the generic directory to avoid
# compiling in a version-containing path:
if [ -d /usr/lib@LIBDIRSUFFIX@/qt5 ]; then
QT5DIR=/usr/lib@LIBDIRSUFFIX@/qt5
else
# Find the newest Qt directory and set $QT5DIR to that:
for qtd in /usr/lib@LIBDIRSUFFIX@/qt5-* ; do
if [ -d $qtd ]; then
QT5DIR=$qtd
fi
done
fi
PATH="$PATH:$QT5DIR/bin"
export QT5DIR
# Unfortunately Chromium and derived projects (including QtWebEngine) seem
# to be suffering some bitrot when it comes to 32-bit support, so we are
# forced to disable the seccomp filter sandbox on 32-bit or else all of these
# applications crash. If anyone has a patch that gets these things running on
# 32-bit without this workaround, please let volkerdi or alienBOB know, or
# post your solution on LQ. Thanks. :-)
if file /bin/cat | grep -wq 32-bit ; then
export QTWEBENGINE_CHROMIUM_FLAGS="--disable-seccomp-filter-sandbox"
fi

357
qt5-patch2/qt5.SlackBuild Executable file
View File

@ -0,0 +1,357 @@
#!/bin/sh
# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# Merged some ideas from Alex Sarmardzic's script for qt4 at SlackBuilds.org
# ^^ Modified by Robby Workman <rworkman@slackware.com> for QT4 & KDE4
#
# Modifications 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Eric Hameleers, Eindhoven, NL
# Modifications for qt 5.2.0 2013 by Michael James, AU
# Modifications for qt 5.x by Eric Hameleers, Eindhoven, NL
cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=qt5
VERSION=$(ls qt-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
BUILD=${BUILD:-3_slack15.0}
PKGSRC=$(echo $VERSION | cut -d - -f 1)
#PKGVER=$(echo $VERSION | tr - _)
PKGVER="${VERSION}_nowebengine_nocodecs"
USE_CODECS=${USE_CODECS:-NO}
SYSTEM_FFMPEG=${SYSTEM_FFMPEG:-NO}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
i?86) ARCH=i586 ;;
arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
esac
export ARCH
fi
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
# the name of the created package would be, and then exit. This information
# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PKGNAM-${PKGVER}-${ARCH}-${BUILD}.txz"
exit 0
fi
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
SLKLDFLAGS=""
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
SLKLDFLAGS=""
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
SLKLDFLAGS=""
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
SLKLDFLAGS=""
SLKLDFLAGS="-L/usr/lib64"
LIBDIRSUFFIX="64"
elif [ "$ARCH" = "armv7hl" ]; then
# To prevent "qatomic_armv6.h error: output number 2 not directly addressable"
# More permanent solution is to patch gcc:
# http://bazaar.launchpad.net/~linaro-toolchain-dev/gcc-linaro/4.6/revision/106731
SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16 -fno-strict-volatile-bitfields"
SLKLDFLAGS=""
LIBDIRSUFFIX=""
else
SLKCFLAGS="-O2"
SLKLDFLAGS=""
LIBDIRSUFFIX=""
fi
case "$ARCH" in
arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
*) TARGET=$ARCH-slackware-linux ;;
esac
NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}
export NINJAJOBS="$NUMJOBS"
TMP=${TMP:-/tmp}
PKG=$TMP/package-${PKGNAM}
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf qt-everywhere-src-$VERSION
echo "Extracting qt-everywhere-src-$VERSION"
tar xf $CWD/qt-everywhere-src-$VERSION.tar.?z* --exclude=qtwebengine || exit 1
cd qt-everywhere-src-$PKGSRC || exit 1
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \+ -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \+
# Use -reduce-relocations only on i?86 and x86_64 architextures.
# https://bugreports.qt-project.org/browse/QTBUG-36129
if echo $ARCH | grep -q '\(i.86\|x86_64\)' 2>/dev/null; then
RELOCATIONS="-reduce-relocations"
else
RELOCATIONS=""
fi
# Fix path to mysql header:
zcat $CWD/patches/qt5.mysql.h.diff.gz | patch -p1 --verbose || exit 1
# Fix build with gcc11:
cd qtbase
zcat $CWD/patches/qt5-qtbase-gcc11.patch.gz | patch -p1 --verbose || exit 1
cd - 1>/dev/null
cd qtwebsockets
zcat $CWD/patches/qt5-qtwebsockets-gcc11.patch.gz | patch -p1 --verbose || exit 1
cd - 1>/dev/null
#cd qtwebengine
# zcat $CWD/patches/qt5-qtwebengine-gcc11.patch.gz | patch -p1 --verbose || exit 1
#cd - 1>/dev/null
# CMake generates wrong -isystem /usr/include compilations flags with Qt5::Gui
# and for it breaks KWin compilation with:
# /usr/include/c++/9.1.0/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
# See also https://bugzilla.redhat.com/1704474
cd qtbase
zcat $CWD/patches/qt5.qtbase_cmake_isystem_includes.patch.gz | patch -p1 --verbose || exit 1
cd - 1>/dev/null
# If PulseAudio is not found, use the _alsa $TAG and disable it in the build:
if ! pkg-config --exists libpulse 2>/dev/null ; then
PULSEAUDIO_OPTION="-no-pulseaudio -no-webengine-pulseaudio"
TAG="_alsa"
else
unset PULSEAUDIO_OPTION
unset TAG
fi
# Use our custom compiler and linker flags:
sed -e "s|^\(QMAKE_CFLAGS_RELEASE.*\)|\1 ${SLKCFLAGS}|" \
-i qtbase/mkspecs/common/gcc-base.conf || exit 1
sed -e "s|^\(QMAKE_LFLAGS_RELEASE.*\)|\1 ${SLKLDFLAGS}|" \
-i qtbase/mkspecs/common/g++-unix.conf || exit 1
if [ ! "$USE_CODECS" = "NO" ]; then
CODEC_OPTION="-proprietary-codecs -webengine-proprietary-codecs"
else
unset CODEC_OPTION
fi
if [ "$SYSTEM_FFMPEG" = "YES" ]; then
FFMPEG_OPTION="-webengine-ffmpeg"
else
unset FFMPEG_OPTION
fi
export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS"
export OPENSOURCE_CXXFLAGS="$SLKCFLAGS"
export QTDIR="${TMP}/qt-everywhere-src-${PKGSRC}"
export LD_LIBRARY_PATH="${QTDIR}/qtbase/lib:${QTDIR}/qttools/lib:${LD_LIBRARY_PATH}"
export QT_PLUGIN_PATH="${QTDIR}/qtbase/plugins"
./configure -v \
-confirm-license \
-opensource \
-prefix /usr \
-libdir /usr/lib${LIBDIRSUFFIX} \
-bindir /usr/lib${LIBDIRSUFFIX}/qt5/bin \
-sysconfdir /etc/xdg \
-headerdir /usr/include/qt5 \
-datadir /usr/share/qt5 \
-archdatadir /usr/lib${LIBDIRSUFFIX}/qt5 \
-docdir /usr/doc/qt5-$PKGVER \
-examplesdir /usr/doc/qt5-$PKGVER/examples \
-system-libpng \
-system-libjpeg \
-system-sqlite \
-system-zlib \
-plugin-sql-mysql \
-plugin-sql-sqlite \
-accessibility \
-alsa \
-dbus \
-glib \
-icu \
-opengl \
-openssl-linked \
-optimized-qmake \
-qpa "xcb;wayland" \
-qt-harfbuzz \
-verbose \
-xcb \
-egl \
-eglfs \
-nomake examples \
-nomake tests \
-no-mimetype-database \
-no-separate-debug-info \
-no-strip \
-no-use-gold-linker \
${CODEC_OPTION} \
${FFMPEG_OPTION} \
${PULSEAUDIO_OPTION} \
${RELOCATIONS} \
-no-pch
# No-precompiled-headers is ccache-friendly.
# Sometimes a failure happens when parallelizing make. Try again if make fails,
# but make a failure the second time around (single threaded) a fatal error:
#### DEBUG
make $NUMJOBS || exit 1
#make $NUMJOBS || make || exit 1
make install INSTALL_ROOT=$PKG || exit 1
# Strip binaries:
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
# Remove rpaths:
for file in $(find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : 2> /dev/null) ; do
if [ ! "$(patchelf --print-rpath $file 2> /dev/null)" = "" ]; then
patchelf --remove-rpath $file
fi
done
# Don't ship .la files:
rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
# Fix internal linking for Qt5WebEngineCore.pc ,
# thanks to Larry Hajali's SBo script:
#sed -i \
# -e 's|-Wl,--start-group.* -Wl,--end-group||' \
# -e "s|-L${PWD}/qtwebengine/src/core/api/Release||" \
# $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/Qt5WebEngineCore.pc
# Fix the path in prl files:
find "$PKG/usr/lib${LIBDIRSUFFIX}" -type f -name '*.prl' \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
# Fix the qmake path in pri file:
sed -i "s,${QTDIR}/qtbase,/usr/lib${LIBDIRSUFFIX}/qt5," \
$PKG/usr/lib${LIBDIRSUFFIX}/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri
# Install symlinks to the Qt5 binaries in the $PATH:
mkdir -p $PKG/usr/bin
for FILE in $PKG/usr/lib${LIBDIRSUFFIX}/qt5/bin/* ; do
ln -s ../lib${LIBDIRSUFFIX}/qt5/bin/$(basename $FILE) $PKG/usr/bin/$(basename $FILE)-qt5
done
# Set the QT5DIR variable in the environment:
mkdir -p $PKG/etc/profile.d
sed -e "s,@LIBDIRSUFFIX@,${LIBDIRSUFFIX},g" $CWD/profile.d/$PKGNAM.sh \
> $PKG/etc/profile.d/$PKGNAM.sh
sed -e "s,@LIBDIRSUFFIX@,${LIBDIRSUFFIX},g" $CWD/profile.d/$PKGNAM.csh \
> $PKG/etc/profile.d/$PKGNAM.csh
chmod 0755 $PKG/etc/profile.d/*
# Add menu entries for all those hidden but great Qt applications:
# Qt5 logo:
mkdir -p $PKG/usr/share/icons/hicolor/48x48/apps
convert qtdoc/doc/src/images/qt-logo.png -resize 48x48 $PKG/usr/share/icons/hicolor/48x48/apps/qt5-logo.png
# Assistant icons
install -p -m644 -D qttools/src/assistant/assistant/images/assistant.png $PKG/usr/share/icons/hicolor/32x32/apps/qt5-assistant.png
install -p -m644 -D qttools/src/assistant/assistant/images/assistant-128.png $PKG/usr/share/icons/hicolor/128x128/apps/qt5-assistant.png
# Designer icon
install -p -m644 -D qttools/src/designer/src/designer/images/designer.png $PKG/usr/share/icons/hicolor/128x128/apps/qt5-designer.png
# QDbusViewer icons
install -p -m644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer.png $PKG/usr/share/icons/hicolor/32x32/apps/qt5-qdbusviewer.png
install -p -m644 qttools/src/qdbus/qdbusviewer/images/qdbusviewer-128.png $PKG/usr/share/icons/hicolor/128x128/apps/qt5-qdbusviewer.png
# Linguist icons
for icon in qttools/src/linguist/linguist/images/icons/linguist-*-32.png ; do
size=$(echo $(basename ${icon}) | cut -d- -f2)
install -p -m644 -D ${icon} $PKG/usr/share/icons/hicolor/${size}x${size}/apps/qt5-linguist.png
done
# And the .desktop files too:
mkdir -p $PKG/usr/share/applications
cat <<EOF > $PKG/usr/share/applications/qt5-designer.desktop
[Desktop Entry]
Name=Qt5 Designer
GenericName=Interface Designer
Comment=Design GUIs for Qt5 applications
Exec=designer-qt5
Icon=qt5-designer
MimeType=application/x-designer;
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Development;
EOF
cat <<EOF > $PKG/usr/share/applications/qt5-assistant.desktop
[Desktop Entry]
Name=Qt5 Assistant
Comment=Shows Qt5 documentation and examples
Exec=assistant-qt5
Icon=qt5-assistant
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Development;Documentation;
EOF
cat <<EOF > $PKG/usr/share/applications/qt5-linguist.desktop
[Desktop Entry]
Name=Qt5 Linguist
Comment=Add translations to Qt5 applications
Exec=linguist-qt5
Icon=qt5-linguist
MimeType=text/vnd.trolltech.linguist;application/x-linguist;
Terminal=false
Encoding=UTF-8
Type=Application
Categories=Qt;Development;
EOF
cat <<EOF > $PKG/usr/share/applications/qt5-qdbusviewer.desktop
[Desktop Entry]
Name=Qt5 QDbusViewer
GenericName=Qt5 D-Bus Debugger
Comment=Debug D-Bus applications
Exec=qdbusviewer-qt5
Icon=qt5-qdbusviewer
Terminal=false
Type=Application
Categories=Qt;Development;Debugger;
EOF
# Add a documentation directory:
mkdir -p $PKG/usr/doc/$PKGNAM-$PKGVER
cp -a \
README qtbase/{header*,LGPL_EXCEPTION.txt,LICENSE*} \
$PKG/usr/doc/$PKGNAM-$PKGVER
if [ -d $PKG/usr/lib${LIBDIRSUFFIX}/qt5/doc/html ]; then
( cd $PKG/usr/doc/$PKGNAM-$PKGVER
ln -sf /usr/lib${LIBDIRSUFFIX}/qt5/doc/html .
)
fi
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $TMP/$PKGNAM-$PKGVER-$ARCH-${BUILD}${TAG}.txz

19
qt5-patch2/slack-desc Normal file
View File

@ -0,0 +1,19 @@
# 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------------------------------------------------------|
qt5: qt5 (a C++ graphical user interface toolkit)
qt5:
qt5: Qt is a complete and well-developed object-oriented framework for
qt5: developing graphical user interface (GUI) applications using C++.
qt5:
qt5: Homepage: http://www.qt.io/
qt5:
qt5:
qt5:
qt5:
qt5: