Compare commits

...

No commits in common. 'master' and 'vim' have entirely different histories.
master ... vim

  1. 95
      14.2/convert32-supported
  2. 144
      14.2/convert32pkg.sh
  3. 229
      14.2/kernel.SlackBuild
  4. 151
      14.2/makechroot-minimal.sh
  5. 63
      14.2/makechroot.sh
  6. 58
      14.2/massconvert32.sh
  7. 188
      14.2/update-repo.sh
  8. 143
      15.0/makechroot-minimal.sh
  9. 63
      15.0/makechroot.sh
  10. BIN
      ctags-5.8.tar.xz
  11. BIN
      doinst.sh.gz
  12. 120
      gvim.desktop
  13. BIN
      gvim.png
  14. 15
      readme.txt
  15. 19
      slack-desc.vim
  16. 230
      vim.SlackBuild
  17. BIN
      vim.vimrc.diff.gz

95
14.2/convert32-supported

@ -1,95 +0,0 @@
# List of tested packages using convert32pkg.
# This list is safe to use with massconvert32.sh and safe to install.
# Note that these are from slackware 14.2, including patches. -current is unsupported.
# a
bzip2
dbus
eudev
xz
# ap
cups
mpg123
# d
libtool
llvm
# l
alsa-lib
atk
cairo
elfutils
expat
freetype
gdk-pixbuf2
glib2
glibc
gmp
gst-plugins-base
gstreamer
gtk+2
harfbuzz
icu4c
lcms2
libexif
libffi
libgphoto2
libidn
libieee1284
libjpeg-turbo
libnl3
libpcap
libpng
libtiff
libunistring
libusb
libxml2
libxslt
ncurses
orc
pango
sdl
svgalib
v4l-utils
zlib
gamin
# n
cyrus-sasl
gnutls
libgcrypt
libgpg-error
nettle
openldap-client
openssl
p11-kit
# x
fontconfig
glu
libX11
libXau
libXcomposite
libXcursor
libXdamage
libXdmcp
libXext
libXfixes
libXi
libXinerama
libXrandr
libXrender
libXv
libXvMC
libXxf86vm
libdrm
libpciaccess
libxcb
libxshmfence
mesa
pixman
# xap
sane

144
14.2/convert32pkg.sh

@ -1,144 +0,0 @@
#!/bin/sh -e
pkginfodir='/var/log/packages/'
pkgscriptdir='/var/log/scripts/'
if [ "$#" -lt 1 ]; then
echo "Usage: $0 <package32> [package64]" 1>&2
exit 1
fi
pkg32="$(realpath "$1")"
unset pkg64
[ "$2" ] && pkg64="$(realpath "$2")"
# Extract all package info
# See /sbin/installpkg
pkgbase="$(echo "$pkg32" | sed -e 's?.*/??;s/\.t[bglx]z$//')"
pkgext="$(echo "$pkg32" | sed -e 's?.*/??;s/.*\.\(t[bglx]z\)$/\1/')"
pkgname="$(echo "$pkgbase" | sed -e 's?-[^-]*-[^-]*-[^-]*$??')"
pkgver="$(echo "$pkgbase" | sed -e 's?.*-\([^-]*\)-[^-]*-[^-]*$?\1?')"
pkgarch="$(echo "$pkgbase" | sed -e 's?.*-[^-]*-\([^-]*\)-[^-]*$?\1?')"
pkgbuild="$(echo "$pkgbase" | sed -e 's?.*-[^-]*-[^-]*-\([^-]*\)$?\1?')"
case "$pkgarch" in
i?86) pkgarch=x86_64 ;;
*)
echo "Unsupported package architecture '$pkgarch'. Can't proceed." 1>&2
exit 1
;;
esac
pkginfo="$pkginfodir/$pkgname-$pkgver-$pkgarch-$pkgbuild"
pkgscript="$pkgscriptdir/$pkgname-$pkgver-$pkgarch-$pkgbuild"
case "$pkgext" in
tgz) tool=gzip ;;
tbz) tool=bzip2 ;;
tlz) tool=lzma ;;
txz) tool=xz ;;
esac
temp="$(mktemp -d)"
trap "rm -rf '$temp'" EXIT
cd "$temp"
explodepkg "$pkg32"
# Remove all files present in the 64bit package
if [ "$pkg64" ]; then
echo
echo "Removing files:"
$tool -cd "$pkg64" | tar-1.13 t | grep -v '^install/' | while read -r file; do
echo "./$file"
rm -f "./$file" 2> /dev/null || true
done
else
if [ ! -f "$pkginfo" ]; then
echo "Package '$pkgname-$pkgver-$pkgarch-$pkgbuild' is not installed. Can't proceed." 1>&2
exit 1
fi
# See /sbin/removepkg
if fgrep './' "$pkginfo" 1> /dev/null 2>&1; then
TRIGGER='^\.\/'
else
TRIGGER='FILE LIST:'
fi
echo
echo 'Removing files:'
sed -n "/$TRIGGER/,/^$/p" "$pkginfo" | fgrep -v 'FILE LIST:' | grep -v '^install/' | while read -r file; do
echo "./$file"
rm -f "./$file" 2> /dev/null || true
done
fi
# Clean empty directories
echo
echo 'Empty directories:'
find . -type d -empty -print -delete
# Remove all symlinks present in the 64bit package
if [ -f install/doinst.sh ]; then
if [ "$pkg64" ]; then
if ! $tool -cd "$pkg64" | tar-1.13 xO install/doinst.sh > install/doinst.64; then
echo "Failed to extract install/doinst.sh from '$pkg64'. Can't proceed." 1>&2
exit 1
fi
else
if [ ! -f "$pkgscript" ]; then
echo "Package '$pkgname-$pkgver-$pkgarch-$pkgbuild' is installed but has no installation script. Can't proceed." 1>&2
exit 1
fi
cp "$pkgscript" install/doinst.64
fi
# There's some packages that need special treatment
if [ "$pkgname" = 'glib2' -o "$pkgname" = 'cups' -o "$pkgname" = 'sane' ]; then
sed -i -e '/^for file in/,/^done/d' install/doinst.sh
fi
if [ "$pkgname" = 'cups' ]; then
sed -i -e '/^if \[ -e etc\/rc.d\/rc.cups \]; then/,/^fi/d' install/doinst.sh
fi
if [ "$pkgname" = 'eudev' ]; then
sed -i -e '/^if \[ \(-e etc\/rc.d\/rc.udev\|-r etc\/rc.d\/rc.udev.new\) \]; then/,/^fi/d' install/doinst.sh
fi
if [ "$pkgname" = 'dbus' ]; then
sed -i -e '/^if \[ \(-e etc\/rc.d\/rc.messagebus\|-r etc\/rc.d\/rc.messagebus.new\) \]; then/,/^fi/d' install/doinst.sh
fi
# Extract all lines treating with symlinks or config files. See /sbin/removepkg
sed -n -e 's,^[ ]*( [ ]*cd[ ]* .* [ ]*; [ ]*\(rm\|ln\) [ ]*-\(rf\|sf\)[ ]* .* [ ]*)[ ]*$,&,p' \
-e 's,^[ ]*config .*[ ]*$,&,p' install/doinst.64 > install/doinst
rm install/doinst.64
echo
echo 'Removed lines in doinst.sh:'
if [ -s install/doinst ]; then
fgrep -xf install/doinst install/doinst.sh || true
# Remove all symlinks present in the 64bit package
fgrep -vxf install/doinst install/doinst.sh > install/doinst.sh.new || true
mv install/doinst.sh.new install/doinst.sh
# If the resulting doinst.sh is empty, remove it.
if [ ! -s install/doinst.sh ]; then
rm install/doinst.sh
fi
fi
rm install/doinst
fi
# Rename package in slack-desc
if [ -f install/slack-desc ]; then
sed -i -e '/^\$\|#\| *|/!s/^[^:]*:/convert32-&/' install/slack-desc
fi
if ! find . | grep -v '^.$\|^./install' > /dev/null; then
echo
echo 'Package is empty. Not running makepkg.' 1>&2
exit 0
fi
makepkg -l n -c n "$OLDPWD/convert32-$pkgname-$pkgver-$pkgarch-$pkgbuild.$pkgext"

229
14.2/kernel.SlackBuild

@ -1,229 +0,0 @@
#!/bin/sh
set -e
# This is a SlackBuild script for building as-original-as-possible kernel packages.
# It combines existing SlackBuilds and other files in the slackware source tree with vanilla SlackBuild conventions in a way that is clean and functional.
# Unlike the "official" method of building a Slackware kernel, it builds and installs everything in $TMP, so it doesn't taint the host system, and you can build it as a regular user under fakeroot, if you wanted to.
# This often means that the $PKG directory is used as an intermediate directory to run a SlackBuild in, and that said SlackBuilds may need to be modified to run properly in $PKG.
# This script is tailored for x86_64. i?86 support is untested, and would need more modifications (such as building the -smp kernels and fixing $TMP in the packaging SlackBuilds).
# Other architectures can be added, provided the source tree for them is anywhere close to the original slackware tree.
# This SlackBuild should be placed in the "source/k" directory of the source DVD.
# However, this directory doesn't contain all the files we need, as they're scattered all throughout the slackware tree.
# This code may help prepare the source directory:
if [ "$1" = prepare ]; then
shift
if [ $# -lt 3 ]; then
echo Usage: $0 prepare \<source\> \<install\> \<output\> 1>&2
echo e.g. $0 prepare /mnt/tmp/slackware-14.2-source-dvd/source /mnt/tmp/slackware64-14.2-install-dvd/slackware64 ./kernel 1>&2
exit 1
fi
SOURCE=$1
INSTALL=$2
OUT=$3
# Copy the "source/k" directory
cp -aT $SOURCE/k $OUT
# Copy the "source/d/kernel-headers" and "source/a/kernel-firmware" directories into it
cp -at $OUT $SOURCE/d/kernel-headers $SOURCE/a/kernel-firmware
# Copy "slackware*/k/kernel-source-*-noarch-*.txt" to use as slack-desc for kernel-source into it
mkdir -p $OUT/kernel-source
cp -aT $INSTALL/k/kernel-source-*-noarch-*.txt $OUT/kernel-source/slack-desc
# Copy the SlackBuild
cp -at $OUT $0
exit
fi
PKGNAM=${PKGNAM:-linux}
BASEVER=${BASEVER:-4.4.14}
VERSION=${VERSION:-$BASEVER}
ARCH=${ARCH:-x86_64}
KARCH=${KARCH:-x86}
BUILD=${BUILD:-1}
CWD=$(pwd)
TMP=${TMP:-/tmp/kernel}
NUMJOBS=${NUMJOBS:-" -j7 "}
export VERSION ARCH BUILD TMP
# Extract the kernel source
mkdir -p $TMP
cd $TMP
rm -rf $PKGNAM-$BASEVER $PKGNAM-$VERSION
tar xvf $CWD/$PKGNAM-$BASEVER.tar.xz
# Rename the kernel source directory to the proper VERSION
# This is useful if you're applying stable patches and the actual VERSION is different from the one the tarball is named after
if [ "$BASEVER" != "$VERSION" ]; then
mv $PKGNAM-$BASEVER $PKGNAM-$VERSION
fi
# Apply patches
cd $PKGNAM-$VERSION
#xzcat $CWD/patch-x.x.xx.xz | patch -p1 --verbose
#
# Build kernel-headers
#
cd $TMP/$PKGNAM-$VERSION
# Install the kernel headers
PKG=$TMP/package-kernel-headers
rm -rf $PKG
mkdir -p $PKG/usr
make $NUMJOBS INSTALL_HDR_PATH=$PKG/usr headers_install
# Apply some modifications that are present in the original kernel-headers package
find $PKG/usr -type f -a ! -name '*.h' -delete
rm -rf $PKG/usr/include/drm
mv $PKG/usr/include/asm $PKG/usr/include/asm-$KARCH
ln -sf asm-$KARCH $PKG/usr/include/asm
# Install the slack-desc
mkdir -p $PKG/install
cat $CWD/kernel-headers/slack-desc > $PKG/install/slack-desc
# Create the package
cd $PKG
/sbin/makepkg -l y -c n $TMP/kernel-headers-$(echo $VERSION | tr - _)-$KARCH-$BUILD.txz
#
# Build kernel-huge
#
cd $TMP/$PKGNAM-$VERSION
# Build the kernel image
make $NUMJOBS mrproper
cat $CWD/config-$ARCH/config-huge-* > .config
make $NUMJOBS oldconfig
make $NUMJOBS bzImage
# Prepare the directory to run the packaging SlackBuild in
PKG=$TMP/kernel-huge
rm -rf $PKG
mkdir -p $PKG
cp arch/$KARCH/boot/bzImage $PKG
cp System.map $PKG
cp .config $PKG/config
# Copy the packaging SlackBuild
cp -aT $CWD/packaging-$ARCH/kernel-huge $PKG
# Run the packaging SlackBuild
cd $PKG
./kernel-huge.SlackBuild
#
# Build kernel-generic
#
cd $TMP/$PKGNAM-$VERSION
# Build the kernel image
make $NUMJOBS mrproper
cat $CWD/config-$ARCH/config-generic-* > .config
make $NUMJOBS oldconfig
make $NUMJOBS bzImage
# Prepare the directory to run the packaging SlackBuild in
PKG=$TMP/kernel-generic
rm -rf $PKG
mkdir -p $PKG
cp arch/$KARCH/boot/bzImage $PKG
cp System.map $PKG
cp .config $PKG/config
# Copy the packaging SlackBuild
cp -aT $CWD/packaging-$ARCH/kernel-generic $PKG
# Run the packaging SlackBuild
cd $PKG
./kernel-generic.SlackBuild
#
# Build kernel-modules
#
cd $TMP/$PKGNAM-$VERSION
# Build the kernel modules with the already-present kernel-generic config
make $NUMJOBS modules
# Prepare the directory to run the packaging SlackBuild in
PKG=$TMP/kernel-modules
rm -rf $PKG
mkdir -p $PKG
make $NUMJOBS INSTALL_MOD_PATH=$PKG modules_install
# Point the build and source links to the proper source directory in /usr/src, as packaged in kernel-source
rm -f $PKG/lib/modules/$VERSION/build $PKG/lib/modules/$VERSION/source
ln -s /usr/src/$PKGNAM-$VERSION $PKG/lib/modules/$VERSION/build
ln -s /usr/src/$PKGNAM-$VERSION $PKG/lib/modules/$VERSION/source
# Copy the packaging SlackBuild
cp -aT $CWD/packaging-$ARCH/kernel-modules $PKG
# Prefix absolute module paths in the SlackBuild with $CWD, since we installed the modules there
sed -i -e 's@/lib/modules/@$CWD&@' $PKG/kernel-modules.SlackBuild
# Run the packaging SlackBuild
cd $PKG
KERNELRELEASE=$VERSION ./kernel-modules.SlackBuild
#
# Build kernel-source
#
cd $TMP/$PKGNAM-$VERSION
# Cleanup the source directory that was prepared and built with the kernel-generic config
make $NUMJOBS clean
make $NUMJOBS prepare
rm .version .config.old
# Install the kernel source
PKG=$TMP/package-kernel-source
rm -rf $PKG
mkdir -p $PKG/usr/src
ln -s $PKGNAM-$VERSION $PKG/usr/src/$PKGNAM
# Install the slack-desc
mkdir -p $PKG/install
cat $CWD/kernel-source/slack-desc > $PKG/install/slack-desc
# Create the package
cd $PKG
mv $TMP/$PKGNAM-$VERSION usr/src
/sbin/makepkg -l y -c n $TMP/kernel-source-$(echo $VERSION | tr - _)-noarch-$BUILD.txz
#
# Build kernel-firmware
#
cd $TMP
# Prepare the directory to run the packaging SlackBuild in
PKG=$TMP/kernel-firmware
rm -rf $PKG
mkdir -p $PKG
cp -aT $CWD/kernel-firmware $PKG
# Use --depth=1 to cause git to not to download the entire history
sed -i -e 's/git clone/& --depth=1/' $PKG/kernel-firmware.SlackBuild
# Run the packaging SlackBuild
cd $PKG
unset VERSION # The script uses `date` to make a $VERSION
./kernel-firmware.SlackBuild

151
14.2/makechroot-minimal.sh

@ -1,151 +0,0 @@
#!/bin/sh
set -eu
if [ "$(id -u)" != 0 ]; then
echo "This script needs root permissions!" 1>&2
exit 1
fi
if [ "$#" -lt 2 ]; then
echo "Usage: $0 [-a arch] [-v version] [-m mirror] [-b localmirror]" 1>&2
exit 1
fi
version='14.2'
arch="$(uname -m)"
mirror='https://mirrors.slackware.com/slackware'
base=''
# Minimal amount of packages required to run installpkg, removepkg and upgradepkg
# bzip2 and gzip are optional, but required to support .tgz and .tbz packages
# All of these exist in the 'a' package set
packages_pkgtools='
aaa_base
aaa_elflibs
bash
bzip2
coreutils
etc
findutils
glibc-solibs
grep
gzip
pkgtools
sed
tar
util-linux
xz
'
# Minimal amount of packages required to run slackpkg without the dialog interface
# gnupg is optional, but required to verify the GPG signatures of packages
# ca-certificates, openssl, bin and perl are optional, but required for HTTPS support
# These exist over the 'a', 'ap' and 'n' package sets
# perl exists in the 'd' package set
# openssl and ca-certificates need to be installed last (after perl and bin, at least) for the doinst.sh to run correctly
packages_slackpkg='
bin
diffutils
gawk
gnupg
openssl-solibs
perl
slackpkg
wget
which
openssl
ca-certificates
'
# Parse arguments
while getopts "v:a:m:b:" opt; do
case "$opt" in
v) version="$OPTARG" ;;
a) arch="$OPTARG" ;;
m) mirror="$OPTARG" ;;
b) base="$(realpath "$OPTARG")" # Path to local mirror, to get the files from.
esac
done
# Build final variables
case "$arch" in
x86_64)
pkgmain='slackware64'
;;
*)
pkgmain='slackware'
;;
esac
release="$pkgmain-$version"
initrd='isolinux/initrd.img'
checksums='CHECKSUMS.md5'
# Create working directory
temp="$(mktemp -d -t "$(basename "$0")".XXXXXX)"
trap "rm -rf '$temp'" EXIT
destdir="$PWD"
cd "$temp"
# Function to download (or copy) a file
get() {
if [ "$base" ]; then
cp "$base/$1" "$2"
else
wget "$mirror/$release/$1" -O "$2"
fi
}
# Function to verify files based on the checksums file
check() {
printf '%s' "$(tail +13 CHECKSUMS.md5 | grep "^[0-9a-f]* ./$1$" | cut -d ' ' -f 1) $2" | md5sum -c --quiet -
}
# Get the full path to a package
package() {
tail +13 CHECKSUMS.md5 | grep "^[0-9a-f]* ./$pkgmain/[^/]*/$1-[^-]*-[^-]*-[^-]*\.t.z$" | cut -d ' ' -f 3- | cut -c 3-
}
# Download checksums
get "$checksums" CHECKSUMS.md5
# Download installer initrd.img
get "$initrd" initrd.img
check "$initrd" initrd.img
# Unpack and prepare the installer
zcat initrd.img | cpio -id
rm -rf initrd.img mnt pkg
mkdir -p mnt/pkg pkg
# Download packages
for pkg in $packages_pkgtools; do
path="$(package "$pkg")"
name="$(basename "$path")"
get "$path" "pkg/$name"
check "$path" "pkg/$name"
echo "$name" >> pkg/_
done
for pkg in $packages_slackpkg; do
path="$(package "$pkg")"
name="$(basename "$path")"
get "$path" "mnt/pkg/$name"
check "$path" "mnt/pkg/$name"
echo "$name" >> mnt/pkg/_
done
# Bootstrap pkgtools and it's dependencies
env -i chroot . sh -l -c 'while read pkg; do /usr/lib/setup/installpkg --root /mnt --terse "/pkg/$pkg"; done < /pkg/_'
# Install slackpkg and it's dependencies
env -i chroot mnt sh -l -c 'while read pkg; do /sbin/installpkg --terse "/pkg/$pkg"; done < /pkg/_'
# Configuration
printf '%s\n' "$mirror/$release/" >> mnt/etc/slackpkg/mirrors
# Compress the package
tar cvJf "$destdir/$release.tar.xz" --sort=name --exclude=./pkg -C mnt .

63
14.2/makechroot.sh

@ -1,63 +0,0 @@
#!/bin/sh -e
set -e
if [ "$(id -u)" != 0 ]; then
echo "This script needs root permissions!" 1>&2
exit 1
fi
if [ "$#" -lt 2 ]; then
echo "Usage: $0 <slackware> <chroot>" 1>&2
exit 1
fi
slackware="$(realpath "$1")"
chroot="$(realpath "$2")"
temp="$(mktemp -d -t makechroot.XXXXXX)"
# Make sure we clean up properly before exitting
cleanup() {
mountpoint -q "$temp/mnt" && umount "$temp/mnt"
mountpoint -q "$temp/dvd" && umount "$temp/dvd"
rm -rf "$temp"
}
trap 'cleanup' EXIT
# Extract the initrd
cd "$temp"
gzip -cd "$slackware/isolinux/initrd.img" | cpio -id
# Mount the dvd
mkdir dvd
mount --bind "$slackware" dvd
# Mount the destination
mkdir -p "$chroot"
mount --bind "$chroot" mnt
# Install the packages
env -i chroot . sh -l -c '
/usr/lib/setup/installpkg --root /mnt --terse /dvd/slackware*/*/*.t?z
cd /mnt
for script in \
04.mkfontdir \
05.fontconfig \
07.update-desktop-database \
07.update-mime-database \
08.gtk-update-icon-cache \
11.cacerts \
cups-genppdupdate
do
var/log/setup/setup.$script
done
chroot . /usr/bin/update-gtk-immodules > /dev/null 2>&1
chroot . /usr/bin/update-gdk-pixbuf-loaders > /dev/null 2>&1
chroot . /usr/bin/update-pango-querymodules > /dev/null 2>&1
chroot . /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas > /dev/null 2>&1
'
# We only run a few setup scripts that do not require user interaction, and deal with updating caches and such, which is not done (properly) by the doinst.sh scripts.
# To get a full list, run: bzcat MANIFEST.bz2 | awk '{print $6}' | grep '^var/log/setup/setup\.' | sort
# Besides the setup scripts, we also need to run some programs which are usually ran from /etc/rc.d/rc.M, but not from the setup scripts.
# This is tailored to Slackware 14.2. I'm unsure whether it'll work properly on any other version.

58
14.2/massconvert32.sh

@ -1,58 +0,0 @@
#!/bin/sh
set -e
# DISCLAIMER
# Don't ever think of installing every single package generated with this script.
# While it *should* not cause any problems, doing so is simply overkill, untested, and not recommended in the least.
if [ "$#" -lt 2 ]; then
echo "Usage: $0 <slackware> <slackware64> [whitelist]" 1>&2
exit 1
fi
scriptdir="$(realpath "$(dirname "$0")")"
slackware="$1"
slackware64="$2"
whitelist="$3"
find "$slackware" -type f -name "*.t?z" -printf '%P\n' | sort | while read -r pkg; do
# See /sbin/installpkg
pkgbase="$(echo "$pkg" | sed -e 's?.*/??;s/\.t[bglx]z$//')"
pkgext="$(echo "$pkg" | sed -e 's?.*/??;s/.*\.\(t[bglx]z\)$/\1/')"
pkgname="$(echo "$pkgbase" | sed -e 's?-[^-]*-[^-]*-[^-]*$??')"
pkgver="$(echo "$pkgbase" | sed -e 's?.*-\([^-]*\)-[^-]*-[^-]*$?\1?')"
pkgarch="$(echo "$pkgbase" | sed -e 's?.*-[^-]*-\([^-]*\)-[^-]*$?\1?')"
if [ "$whitelist" ]; then
if ! grep -v '^#' "$whitelist" | fgrep -xq "$pkgname"; then
continue
fi
fi
case "$pkgarch" in
i?86) pkgarch=x86_64 ;;
# Architecture-independent stuff
noarch|fw) continue ;;
# Only kernel-headers uses x86 as pkgarch. That doesn't need conversion.
x86) continue ;;
*)
echo "WARNING: Package '$pkg' has an unsupported architecture: '$pkgarch'"
exit
;;
esac
if [ ! -f "$slackware64/$(dirname "$pkg")/$pkgname-$pkgver-$pkgarch-"*".$pkgext" ]; then
echo "WARNING: Package '$pkg' doesn't exist in slackware64, or there were multiple with different build versions."
continue
fi
rpkg="$(realpath "$slackware/$pkg")"
rpkg64="$(realpath "$slackware64/$(dirname "$pkg")/$pkgname-$pkgver-$pkgarch-"*".$pkgext")"
mkdir -p "$(dirname "$pkg")"
( cd "$(dirname "$pkg")"
"$scriptdir/convert32pkg.sh" "$rpkg" "$rpkg64"
)
done

188
14.2/update-repo.sh

@ -1,188 +0,0 @@
#!/bin/sh
set -e
gpgkey=''
timestamp="$(LC_ALL=C date -u)"
cachedir='.cache'
# Cleanup
if [ "$1" = 'clean' ]; then
rm -rf "$cachedir" ChangeLog.txt PACKAGES.TXT MANIFEST.bz2 FILELIST.TXT CHECKSUMS.md5 CHECKSUMS.md5.asc GPG-KEY
find . -regex '.*\.t[bglx]z$' | while read -r package; do
pkgbase="$(echo "$package" | sed 's?.*/??;s/\.t[bglx]z$//')"
rm -f "$(dirname "$package")/$pkgbase.txt"
rm -f "$package.asc"
done
exit
fi
mkdir -p "$cachedir"
# Process all packages
find . -regex '.*\.t[bglx]z$' | while read -r package; do
case "$package" in
*.tgz)
tool=gzip
;;
*.tbz)
tool=bzip2
;;
*.tlz)
tool=lzma
;;
*.txz)
tool=xz
;;
esac
# See the pkgbase and package_name functions in /sbin/installpkg
pkgbase="$(echo "$package" | sed 's?.*/??;s/\.t[bglx]z$//')"
pkgdir="$(dirname "$package")"
pkgname="$(echo "$pkgbase" | sed 's?-[^-]*-[^-]*-[^-]*$??')"
pkgtxt="$pkgdir/$pkgbase.txt"
pkgmeta="$cachedir/$pkgdir/$pkgbase.meta"
pkgmanifest="$cachedir/$pkgdir/$pkgbase.manifest"
pkgsize="$cachedir/$pkgdir/$pkgbase.size"
pkgusize="$cachedir/$pkgdir/$pkgbase.usize"
pkgsum="$cachedir/$pkgdir/$pkgbase.checksum"
if [ -f "$pkgtxt" -a \
-f "$pkgmeta" -a \
-f "$pkgmanifest" -a \
-f "$pkgsize" -a \
-f "$pkgusize" -a \
-f "$pkgsum" ]; then
if [ "$gpgkey" ]; then
if [ -f "$package.asc" ]; then
md5sum --status -c "$pkgsum" && continue
fi
else
md5sum --status -c "$pkgsum" && continue
fi
fi
echo "Adding $package..."
mkdir -p "$cachedir/$pkgdir"
# Decompress the package
tmppkg="$(mktemp)"
$tool -cd "$package" > "$tmppkg"
# Get package size
du -k "$package" | cut -f 1 > "$pkgsize"
du -k "$tmppkg" | cut -f 1 > "$pkgusize"
# Generate .txt file (see /usr/bin/slackdtxt)
(tar xOf "$tmppkg" install/slack-desc 2> /dev/null || echo "$pkgname:") | egrep -v '^($|#| *\|)' > "$pkgtxt"
# Create manifest for this package
cat > "$pkgmanifest" << EOF
++========================================
||
|| Package: $package
||
++========================================
$(TZ=EST tar tvvf "$tmppkg")
EOF
# Create metadata for this package
# Source for the sed line: https://stackoverflow.com/questions/1444406/how-can-i-delete-duplicate-lines-in-a-file-in-unix#1444433
cat > "$pkgmeta" << EOF
PACKAGE NAME: $(basename "$package")
PACKAGE LOCATION: $pkgdir
PACKAGE SIZE (compressed): $(cat "$pkgsize" | xargs) K
PACKAGE SIZE (uncompressed): $(cat "$pkgusize" | xargs) K
PACKAGE DESCRIPTION:
$(cat "$pkgtxt" | sed -e '$!N; /^\(.*\)\n\1$/!P; D')
EOF
# Sign the package
rm -f "$package.asc"
[ "$gpgkey" ] && gpg -bas --use-agent --batch -u "$gpgkey" "$package"
# Remove decompressed package
rm -f "$tmppkg"
# Save checksum
md5sum "$package" > "$pkgsum"
done
# Generate shitty ChangeLog.txt
echo "$timestamp" > ChangeLog.txt
# Create GPG-KEY
if [ "$gpgkey" ]; then
gpg --list-keys "$gpgkey" > GPG-KEY
gpg -a --export "$gpgkey" >> GPG-KEY
fi
# Generate PACKAGES.TXT
echo "Generating PACKAGES.TXT..."
cat > PACKAGES.TXT << EOF
PACKAGES.TXT; $timestamp
This file provides details on the Slackware packages found
in this directory.
Total size of all packages (compressed): $(expr \( 0$(find "$cachedir" -type f -name '*.size' | xargs cat | xargs printf ' + %s') \) / 1024 || true) MB
Total size of all packages (uncompressed): $(expr \( 0$(find "$cachedir" -type f -name '*.usize' | xargs cat | xargs printf ' + %s') \) / 1024 || true) MB
EOF
# https://stackoverflow.com/questions/4255603/sort-files-by-basename#4256095
find "$cachedir" -type f -name '*.meta' | perl -e 'print sort{($p=$a)=~s!.*/!!;($q=$b)=~s!.*/!!;$p cmp$q}<>' | xargs cat >> PACKAGES.TXT
echo >> PACKAGES.TXT
# Generate MANIFEST.bz2
echo "Generating MANIFEST.bz2..."
find "$cachedir" -type f -name '*.manifest' | sort | xargs cat | bzip2 -9 -z > MANIFEST.bz2
# Generate FILELIST.TXT
echo "Generating FILELIST.TXT..."
cat > FILELIST.TXT << EOF
$timestamp
Here is the file list for this directory. If you are using a
mirror site and find missing or extra files in the disk
subdirectories, please have the archive administrator refresh
the mirror.
EOF
find . ! -path "./$cachedir/*" -a ! -name "$cachedir" | sort | xargs fakeroot ls -ld --time-style=long-iso > FILELIST.TXT
# Generate CHECKSUMS.md5
echo "Generating CHECKSUMS.md5..."
cat > CHECKSUMS.md5 << EOF
These are the MD5 message digests for the files in this directory.
If you want to test your files, use 'md5sum' and compare the values to
the ones listed here.
To test all these files, use this command:
tail +13 CHECKSUMS.md5 | md5sum -c --quiet - | less
'md5sum' can be found in the GNU coreutils package on ftp.gnu.org in
/pub/gnu, or at any GNU mirror site.
MD5 message digest Filename
EOF
find . -type f -a ! -path "./$cachedir/*" | sort | xargs md5sum >> CHECKSUMS.md5
# Sign CHECKSUMS.md5
rm -f CHECKSUMS.md5.asc
[ "$gpgkey" ] && gpg -bas --use-agent --batch -u "$gpgkey" CHECKSUMS.md5
# Remove tmpdir
rm -rf "$tmpdir"

143
15.0/makechroot-minimal.sh

@ -1,143 +0,0 @@
#!/bin/sh
set -eu
if [ "$(id -u)" != 0 ]; then
echo "This script needs root permissions!" 1>&2
exit 1
fi
if [ "$#" -lt 1 ]; then
echo "Usage: $0 [-a arch] [-m mirror] <chroot>" 1>&2
exit 1
fi
arch="$(uname -m)"
mirror='https://mirrors.slackware.com/slackware/slackware64-current'
# Minimal amount of packages required to run installpkg, removepkg, upgradepkg, explodepkg and makepkg
# All of these exist in the 'a' package set
packages_pkgtools='
aaa_base
aaa_elflibs
bash
coreutils
etc
findutils
glibc-solibs
grep
pkgtools
sed
tar
util-linux
which
xz
'
# Minimal amount of packages required to run slackpkg without the dialog interface
# Supporting https, gpg, and upgrade-all.
# These exist over the 'a', 'ap', 'n' and 'l' package sets
# ca-certificates needs to be installed after openssl for the doinst.sh to run correctly
packages_extra='
bzip2
diffutils
gawk
gnupg
gzip
libpsl
libunistring
pcre2
slackpkg
wget
openssl
ca-certificates
'
# Parse arguments
while getopts "a:m:" opt; do
case "$opt" in
a) arch="$OPTARG" ;;
m)
if [ -d "$OPTARG" ]; then
mirror="$(realpath "$OPTARG")"
else
mirror="$OPTARG"
fi
;;
esac
done
shift $(expr $OPTIND - 1)
[ "$#" -ge 1 ] && [ "$1" = "--" ] && shift
# Build final variables
case "$arch" in
x86_64) pkgmain='slackware64' ;;
*) pkgmain='slackware' ;;
esac
initrd='isolinux/initrd.img'
checksums='CHECKSUMS.md5'
chroot="$(realpath "$1")"
# Create working directory
temp="$(mktemp -d -t "$(basename "$0")".XXXXXX)"
cleanup() {
if mountpoint -q "$temp/mnt/pkg"; then
umount "$temp/mnt/pkg"
rmdir "$temp/mnt/pkg"
fi
mountpoint -q "$temp/mnt" && umount "$temp/mnt"
rm -rf "$temp"
}
trap 'cleanup' EXIT
cd "$temp"
# Function to download (or copy) a file
get() {
if [ -d "$mirror" ]; then
cp "$mirror/$1" "$2"
else
wget "$mirror/$1" -O "$2"
fi
}
# Function to verify files based on the checksums file
check() {
printf '%s' "$(tail +13 CHECKSUMS.md5 | grep "^[0-9a-f]* ./$1$" | cut -d ' ' -f 1) $2" | md5sum -c --quiet -
}
# Get the full path to a package
package() {
tail +13 CHECKSUMS.md5 | grep "^[0-9a-f]* ./$pkgmain/[^/]*/$1-[^-]*-[^-]*-[^-]*\.t.z$" | cut -d ' ' -f 3- | cut -c 3-
}
# Download checksums
get "$checksums" CHECKSUMS.md5
# Download installer initrd.img
get "$initrd" initrd.img
check "$initrd" initrd.img
# Unpack and prepare the installer
xz -cd initrd.img | cpio -id
rm -f initrd.img
mkdir -p pkg "$chroot"
mount --bind "$chroot" mnt
mkdir -p mnt/pkg
mount --bind pkg mnt/pkg
# Download packages
for pkg in $packages_pkgtools $packages_extra; do
path="$(package "$pkg")"
name="$(basename "$path")"
get "$path" "pkg/$name"
check "$path" "pkg/$name"
done
for pkg in $packages_pkgtools; do echo "$(basename "$(package "$pkg")")" >> pkg/__; done
for pkg in $packages_extra; do echo "$(basename "$(package "$pkg")")" >> pkg/_; done
# Bootstrap pkgtools and its dependencies
env -i chroot . sh -l -c 'while read pkg; do /sbin/installpkg --root /mnt --terse "/pkg/$pkg"; done < /pkg/__'
# Install slackpkg and its dependencies
env -i chroot mnt sh -l -c 'while read pkg; do /sbin/installpkg --terse "/pkg/$pkg"; done < /pkg/_'

63
15.0/makechroot.sh

@ -1,63 +0,0 @@
#!/bin/sh -e
set -e
if [ "$(id -u)" != 0 ]; then
echo "This script needs root permissions!" 1>&2
exit 1
fi
if [ "$#" -lt 2 ]; then
echo "Usage: $0 <slackware> <chroot>" 1>&2
exit 1
fi
slackware="$(realpath "$1")"
chroot="$(realpath "$2")"
temp="$(mktemp -d -t makechroot.XXXXXX)"
# Make sure we clean up properly before exitting
cleanup() {
mountpoint -q "$temp/mnt" && umount "$temp/mnt"
mountpoint -q "$temp/dvd" && umount "$temp/dvd"
rm -rf "$temp"
}
trap 'cleanup' EXIT
# Extract the initrd
cd "$temp"
xz -cd "$slackware/isolinux/initrd.img" | cpio -id
# Mount the dvd
mkdir dvd
mount --bind "$slackware" dvd
# Mount the destination
mkdir -p "$chroot"
mount --bind "$chroot" mnt
# Install the packages
env -i chroot . sh -l -c '
/sbin/installpkg --root /mnt --terse /dvd/slackware*/*/*.t?z
cd /mnt
for script in \
04.mkfontdir \
05.fontconfig \
07.update-desktop-database \
07.update-mime-database \
08.gtk-update-icon-cache \
11.cacerts \
cups-genppdupdate
do
var/lib/pkgtools/setup/setup.$script
done
chroot . /usr/bin/update-gtk-immodules > /dev/null 2>&1
HOME=/root chroot . /usr/bin/update-gdk-pixbuf-loaders > /dev/null 2>&1
chroot . /usr/bin/update-pango-querymodules > /dev/null 2>&1
chroot . /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas > /dev/null 2>&1
'
# We only run a few setup scripts that do not require user interaction, and deal with updating caches and such, which is not done (properly) by the doinst.sh scripts.
# To get a full list, run: bzcat MANIFEST.bz2 | awk '{print $6}' | grep '^var/log/setup/setup\.' | sort
# Besides the setup scripts, we also need to run some programs which are usually ran from /etc/rc.d/rc.M, but not from the setup scripts.
# This is tailored to Slackware 15.0-current, I'm unsure whether it'll work properly on any other version.

BIN
ctags-5.8.tar.xz

Binary file not shown.

BIN
doinst.sh.gz

Binary file not shown.

120
gvim.desktop

@ -0,0 +1,120 @@
[Desktop Entry]
Encoding=UTF-8
Name=Vi IMproved
Name[af]=Vi Verbeterde
Name[ar]=في.أي المحسن
Name[bn]=ভি-আই উন্নত
Name[br]=Vi gwellaet
Name[ca]=Vi millorat
Name[cy]=VIM (Vi wedi'i wella)
Name[da]=Vi IMproved (Vi forbedret)
Name[eo]=VIM
Name[fa]=Vi پیشرفت کرده VIM
Name[hi]=वीआई इम्प्रूव्ड
Name[hu]=VIM
Name[is]=Vi endurbættur (vim)
Name[it]=Vi iMproved
Name[ko]=더 나은 Vi
Name[mn]=Сайжирсан Vi
Name[nso]=KAonafaditswe ka Vi
Name[oc]=VI aMillorat
Name[pl]=Poprawiony VI (vim)
Name[pt_BR]=Vi melhorado
Name[ru]=Улучшенный vi
Name[rw]=Vi Ivuguruwe
Name[sl]=Izboljšani vi (vim)
Name[sv]=Förbättrad Vi
Name[ta]=Vi மேம்படுத்தப்பட்ட
Name[tg]=Vi пешрафт кардаи VIM
Name[th]=VI IMprove
Name[uz]=Яхшиланган Vi
Name[ven]=Vi Khwinifhadzhwa
Name[vi]=Vi Cải tiến
Name[wa]=VIM
Name[zh_CN]=改进的 VI (VIM)
Name[zh_TW]=VIM
Name[zu]=I-Vi yenziwe ngcono
GenericName=Text Editor
GenericName[af]=Teks Redigeerder
GenericName[ar]=محرر نصوص
GenericName[az]=Mətn Editoru
GenericName[be]=Тэкставы рэдактар
GenericName[bg]=Текстов редактор
GenericName[bn]=টেক্সট সম্পাদক
GenericName[br]=Aozer skrid
GenericName[bs]=Tekst editor
GenericName[ca]=Editor de text
GenericName[cs]=Textový editor
GenericName[cy]=Golygydd Testun
GenericName[da]= Teksteditor
GenericName[de]=Texteditor
GenericName[el]=Επεξεργαστής κειμένου
GenericName[eo]=Tekstredaktilo
GenericName[es]=Editor de texto
GenericName[et]=Tekstiredaktor
GenericName[eu]=Testu editorea
GenericName[fa]=ویرایشگر متن
GenericName[fi]=Tekstieditori
GenericName[fo]=Tekstritil
GenericName[fr]=Éditeur de texte
GenericName[fy]=Tekst Bewurker
GenericName[ga]=Eagarthóir Téacs
GenericName[gl]=Editor de Textos
GenericName[he]=עורך טקסט
GenericName[hi]=पाठ संपादक
GenericName[hr]=Uređivač teksta
GenericName[hsb]=Wobdźěłar tekstow
GenericName[hu]=Szövegszerkesztő
GenericName[is]=Textaritill
GenericName[it]=Editor di testi
GenericName[ja]=テキストエディタ
GenericName[km]=កម្មវិធី​វាយ​អត្ថបទ
GenericName[ko]=글월 편집기
GenericName[lo]=ເຄື່ອງມືແກ້ໄຂຂໍ້ຄວາມ
GenericName[lt]=Teksto rengyklė
GenericName[lv]=Teksta Redaktors
GenericName[mk]=Уредувач на текст
GenericName[mn]=Текст боловсруулагч
GenericName[ms]=Penyunting Teks
GenericName[mt]=Editur tat-test
GenericName[nb]=Skriveprogram
GenericName[nds]=Texteditor
GenericName[nl]=Teksteditor
GenericName[nn]=Skriveprogram
GenericName[nso]=Mofetosi wa Sengwalwana
GenericName[pa]=ਪਾਠ ਸੰਪਾਦਕ
GenericName[pl]=Edytor tekstu
GenericName[pt]=Editor de Texto
GenericName[pt_BR]=Editor de Texto
GenericName[ro]=Editor de text
GenericName[ru]=Текстовый редактор
GenericName[rw]=Muhinduzi Umwandiko
GenericName[se]=Čállinprográmma
GenericName[sk]=Textový editor
GenericName[sl]=Urejevalnik besedil
GenericName[sr]=Уређивач текста
GenericName[sr@Latn]=Uređivač teksta
GenericName[ss]=Sihleli sembhalo
GenericName[sv]=Texteditor
GenericName[ta]=உரை தொகுப்பாளர்
GenericName[tg]=Муҳаррири матн
GenericName[th]=โปรแกรมแก้ไขข้อความ
GenericName[tr]=Metin Düzenleyici
GenericName[tt]=Mäten Tözätkeçe
GenericName[uk]=Редактор текстів
GenericName[uz]=Матн таҳрирчи
GenericName[ven]=Musengulusi wa Manwalwa
GenericName[vi]=Trình soạn văn bản
GenericName[wa]=Aspougneu di tecse
GenericName[xh]=Umhleli Wombhalo
GenericName[zh_CN]=文本编辑器
GenericName[zh_TW]=文字編輯器
GenericName[zu]=Umlungisi wombhalo
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
Exec=gvim -f %f
Icon=gvim.png
Type=Application
Terminal=false
X-KDE-StartupNotify=true
X-KDE-AuthorizeAction=shell_access
Categories=TextEditor;

BIN
gvim.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

15
readme.txt

@ -1,15 +0,0 @@
This repo contains all my slackware modifications of the base install.
Additional packages are contained in RocketLinux and built in a non-standard manner.
This branch contains a few scripts I use, related to slackware.
- kernel.SlackBuild is capable of building a near-identical slackware kernel
- convert32pkg.sh converts a 32bit package to be installable on 64bit (by
removing everything present in the 64bit package).
It is only designed to support some packages in the official slackware iso,
because there's all kinds of packages that need special treatment,
especially for their doinst.sh scripts.
- massconvert32.sh calls convert32pkg.sh over an entire package directory
- update-repo.sh is my shitty implementation of a slackware repo generator,
that tries to generate everything as close to the official slackware repo as
possible.

19
slack-desc.vim

@ -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------------------------------------------------------|
vim: vim (Vi IMproved)
vim:
vim: Vim is an almost compatible version of the UNIX editor vi. Many new
vim: features have been added: multi level undo, command line history,
vim: filename completion, block operations, and more.
vim:
vim: Vim's development is led by Bram Moolenaar.
vim:
vim: This package also contains the Exuberant Ctags program
vim: written by Darren Hiebert.
vim:

230
vim.SlackBuild

@ -0,0 +1,230 @@
#!/bin/sh
# Copyright 2008, 2009, 2010, 2013, 2016 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.
VIMBRANCH=8.1
CTAGSVER=5.8
BUILD=${BUILD:-1}
CWD=$(pwd)
if [ "$1" = "check" ]; then
VERSION=$(echo vim-${VIMBRANCH}*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
NEWVERSION="$(echo $(basename $(wget -q -O - https://github.com/vim/vim/releases | grep -F v${VIMBRANCH} | head -n 1 | cut -f 2 -d \" )) | cut -b2- )"
if [ ! "$NEWVERSION" ]; then
echo "Failed to fetch latest version"
exit
fi
if [ "$VERSION" != "$NEWVERSION" ]; then
echo "New version available: $NEWVERSION"
exit
fi
echo "No updates available"
exit
fi
if [ -r vim-${VIMBRANCH}*.tar.xz ]; then # if there's a source archive already, use the version number from it:
VERSION=$(echo vim-${VIMBRANCH}*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
else # need to fetch the latest source archive for this branch:
VERSION="$(echo $(basename $(wget -q -O - https://github.com/vim/vim/releases | grep -F v${VIMBRANCH} | head -n 1 | cut -f 2 -d \" )) | cut -b2- )"
( lftpget https://github.com/vim/vim/archive/v${VERSION}.tar.gz
gzip -d v${VERSION}.tar.gz
mv v${VERSION}.tar vim-${VERSION}.tar
xz -9 -v vim-${VERSION}.tar
if [ ! -r vim-${VERSION}.tar.xz ]; then
echo "ERROR: Something went wrong trying to fetch https://github.com/vim/vim/archive/v${VERSION}.tar.gz"
exit 1
fi
) || exit 1
fi
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
esac
fi
NUMJOBS=${NUMJOBS:-" -j7 "}
PYVER=$(python -V 2>&1 | cut -f 2 -d' ' | cut -f 1-2 -d.)
if [ "$ARCH" = "x86_64" ]; then
export SLKCFLAGS="-O2 -fPIC"
export LIBDIRSUFFIX="64"
else
export SLKCFLAGS="-O2"
export LIBDIRSUFFIX=""
fi
export SLKLDFLAGS="-L/usr/lib${LIBDIRSUFFIX}"
TMP=${TMP:-/tmp}
PKG=$TMP/package-vim
rm -rf $PKG
mkdir -p $TMP $PKG
# ctags was once a part of vim,
# but now we have to bundle it in
cd $TMP
rm -rf ctags-$CTAGSVER
tar xvf $CWD/ctags-$CTAGSVER.tar.xz || exit 1
cd ctags-$CTAGSVER
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 {} \;
CFLAGS="$SLKCFLAGS" LDFLAGS="$SLKLDFLAGS" \
./configure \
--prefix=/usr \
--build=$ARCH-slackware-linux
make $NUMJOBS || make || exit 1
mkdir -p $PKG/usr/bin
cat ctags > $PKG/usr/bin/ctags
chmod 755 $PKG/usr/bin/ctags
mkdir -p $PKG/usr/man/man1
cat ctags.1 | gzip -9c > $PKG/usr/man/man1/ctags.1.gz
mkdir -p $PKG/usr/doc/ctags-$CTAGSVER
cp -a \
COPYING* EXTENDING.html FAQ INSTALL INSTALL.oth NEWS README* \
$PKG/usr/doc/ctags-$CTAGSVER
chmod 644 $PKG/usr/doc/ctags-$CTAGSVER/*
cd $TMP
rm -rf vim-${VERSION}
tar xvf $CWD/vim-${VERSION}.tar.xz || exit 1
config_vim() {
CFLAGS="$SLKCFLAGS" \
./configure \
$* \
--prefix=/usr \
--enable-pythoninterp \
--with-python-config-dir=/usr/lib${LIBDIRSUFFIX}/python$PYVER/config \
--enable-perlinterp \
--disable-tclinterp \
--enable-multibyte \
--enable-cscope \
--with-features=huge \
--with-compiledby="<volkerdi@slackware.com>" \
--build=$ARCH-slackware-linux
# I had been adding this, but got 100% complaints and 0% kudos:
# --enable-rubyinterp
}
cd $TMP/vim-$VERSION || 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 {} \;
config_vim --with-x --enable-gui=gtk2
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
rsync -lprvt $PKG/usr/share/man/ $PKG/usr/man/
rm -r $PKG/usr/share/man
cp -a runtime/vimrc_example.vim runtime/vimrc.new
# Don't make backups in /var/spool/cron/*, which fixes "crontab -e":
zcat $CWD/vim.vimrc.diff.gz | patch -p1 --verbose || exit 1
# Add patched vimrc to the package:
cat runtime/vimrc.new > $PKG/usr/share/vim/vimrc.new
# Fix manpage symlinks:
if [ -d $PKG/usr/man ]; then
( cd $PKG/usr/man
for manpagedir in $(find . -type d -name "man*") ; do
( cd $manpagedir
for eachpage in $( find . -type l -maxdepth 1) ; do
ln -s $( readlink $eachpage ).gz $eachpage.gz
rm $eachpage
done
gzip -9 *.?
)
done
)
fi
# Legacy binary links:
( cd $PKG/usr/bin ; rm -rf ex )
( cd $PKG/usr/bin ; ln -sf vim ex )
( cd $PKG/usr/bin ; rm -rf rview )
( cd $PKG/usr/bin ; ln -sf vim rview )
( cd $PKG/usr/bin ; rm -rf rvim )
( cd $PKG/usr/bin ; ln -sf vim rvim )
( cd $PKG/usr/bin ; rm -rf view )
( cd $PKG/usr/bin ; ln -sf vim view )
( cd $PKG/usr/bin ; rm -rf eview )
( cd $PKG/usr/bin ; ln -sf vim eview )
( cd $PKG/usr/bin ; rm -rf evim )
( cd $PKG/usr/bin ; ln -sf vim evim )
mkdir -p $PKG/usr/doc/vim-$VERSION
cp -a README.txt $PKG/usr/doc/vim-$VERSION
find $PKG/usr/doc/vim-$VERSION -type f | xargs chmod 644
( cd $PKG/usr/doc/vim-$VERSION ; rm -rf doc )
( cd $PKG/usr/doc/vim-$VERSION ; ln -sf /usr/share/vim/vim$(echo $VIMBRANCH | tr -d .) doc )
mkdir -p $PKG/install
cat $CWD/slack-desc.vim > $PKG/install/slack-desc
cat << EOF > $PKG/install/doinst.sh
#!/bin/sh
config() {
NEW="\$1"
OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r \$OLD ]; then
mv \$NEW \$OLD
elif [ "\$(cat \$OLD | md5sum)" = "\$(cat \$NEW | md5sum)" ]; then # toss the redundant copy
rm \$NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
config usr/share/vim/vimrc.new
EOF
zcat $CWD/doinst.sh.gz >> $PKG/install/doinst.sh
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
mkdir -p $PKG/usr/share/applications
cp -a $CWD/gvim.desktop $PKG/usr/share/applications
mkdir -p $PKG/usr/share/pixmaps
cp -a $CWD/gvim.png $PKG/usr/share/pixmaps
cd $PKG
/sbin/makepkg -l y -c n $TMP/vim-$VERSION-$ARCH-$BUILD.txz

BIN
vim.vimrc.diff.gz

Binary file not shown.
Loading…
Cancel
Save