Skip to content

Instantly share code, notes, and snippets.

@ruario
ruario / README.md
Last active January 26, 2023 04:25
Alternative (fake) makepkg to create Slackware packages

These scripts are for people who want an alternative to the official Slackware provided makepkg.

Why would you want that?

  • To be able to create Slackware packages with root-owned files, even when run as a regular user.
  • To be able create Slackware packages on non-Slackware based systems without the need to port Pkgtools and its dependencies (e.g. tar-1.13). Some examples being:
    • Projects (or proprietary software vendors) that want to be able to provide binary Slackware packages, where their build/packaging system is on another distro.
    • People who want to pair a package creation script with spkg to use as a secondary package manger on a non-Slackware based distro. This gives the advantage of simple packaging scripts (.SlackBuilds) for additional, self-compiled software.

Two versions are provided:

@ruario
ruario / latest-chrome.sh
Last active June 2, 2023 12:58
This script will find the latest Google Chrome binary package, download it and repackage it into Slackware format.
#!/bin/bash
# latest-chrome Version 1.5
# This script will find the latest Google Chrome binary package,
# download it and repackage it into Slackware format.
# I don't use Chrome for regular browsing but it is handy for
# comparative tests against Vivaldi. :P
# Copyright 2018 Ruari Oedegaard, Oslo, Norway
@ruario
ruario / latest-firefox.sh
Last active February 20, 2024 09:12
This script will find the latest Firefox binary package, download it and repackage it into Slackware format.
#!/bin/bash
# latest-firefox Version 1.6.3
# Contributer: drgibbon (thanks!)
# This script will find the latest Firefox binary package, download it
# and repackage it into Slackware format.
# I don't use Firefox for regular browsing but it is handy for
# comparative tests against Vivaldi. :P
@ruario
ruario / multichrome
Last active August 29, 2015 13:57
Permits install and update of all Chrome channels side by side
#!/bin/bash
# Multichrome Version 0.7.1
# This script will find the latest Unstable, Beta or Stable Google
# Chrome package, download it and repackage it into a generic tar
# format. It allows for multiple versions to be installed side by side.
# I don't use Chrome for regular browsing but it is handy for
# comparative tests against Opera. :P
@ruario
ruario / getupdates
Last active October 10, 2017 12:29
A script to fetch updates for Slackware stable
#!/bin/sh
#
# getupdates (0.9.6) - A script to fetch updates for Slackware stable
#
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
# Version 2, December 2004
#
# Copyright (C) 2017 Ruari Oedegaard, Oslo, Norway
#
# Everyone is permitted to copy and distribute verbatim or modified
@ruario
ruario / op2slk
Created March 20, 2014 21:06
Converts Opera Linux Generic (cross distro) tar packages into the Slackware package format
#!/usr/bin/env bash
#
# op2slk Version 0.9.15
#
# This is a script to convert Opera Linux Generic (cross distro) tar
# packages into the Slackware package format.
#
# Use as follows: 'op2slk operapackage'
#
# Recent stable and beta versions of Opera can be downloaded from:
@ruario
ruario / latest-opera.sh
Last active September 27, 2021 20:48
This script will find the latest Opera stable binary package, downloads and repackage it into Slackware format
#!/bin/bash
# latest-opera Version 2.1
# This script will find the latest Opera stable binary package,
# download it and repackage it into Slackware format.
# Copyright 2018 Ruari Oedegaard, Oslo, Norway
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ruario
ruario / rpm2cpio
Last active September 5, 2021 06:28
Minimal rpm2cpio using only bash, grep, tail and a decompressor
#!/bin/bash
RPMHDRLGTH=$(LC_CTYPE=C grep -abom1 '.7zXZ\|]'$'\000\000''....'$'\377\377\377\377\377\377''\|BZh9\|'$'\037\213\b' "$1")
case "$RPMHDRLGTH" in
*7zXZ) COMPRESSOR=xz ;;
*]*) COMPRESSOR=lzma ;;
*BZh9) COMPRESSOR=bzip2 ;;
*) COMPRESSOR=gzip ;;
esac
tail -c+$[${RPMHDRLGTH%:*}+1] "$1" | $COMPRESSOR -d
@ruario
ruario / extractrpm
Created March 22, 2014 19:34
Extracts rpms to similarly named directories, using only bash, grep, tail, cpio and a decompressor
#!/bin/bash
mkdir -p ${1%.rpm} || exit 1
RPMHDRLGTH=$(LANG=C grep -abom1 '.7zXZ\|]'$'\000\000''....'$'\377\377\377\377\377\377''\|BZh9\|'$'\037\213\b' "$1")
case "$RPMHDRLGTH" in
*7zXZ) COMPRESSOR=xz ;;
*]*) COMPRESSOR=lzma ;;
*BZh9) COMPRESSOR=bzip2 ;;
*) COMPRESSOR=gzip ;;
esac
tail -c+$[${RPMHDRLGTH%:*}+1] "$1" | $COMPRESSOR -d | ( cd ${1%*.rpm} ; cpio --quiet -imd )
@ruario
ruario / standalonechrome
Last active August 29, 2015 13:57
This scripts allows you to run Chrome on Linux, with a self contained profile and without a system wide install
#!/bin/bash
# standalonechrome Version 0.2.1
# This script will extract the contents of a Google Chrome rpm package
# into a folder, from which it be can run in a self contained fashion,
# i.e. the profile (settings) will also be saved in the same location.
# I don't use Chrome for regular browsing but it is handy for
# comparative tests against Opera. :P