Skip to content

Instantly share code, notes, and snippets.

@ruario
ruario / README.md
Last active Jun 16, 2019
Alternative (fake) makepkg to create Slackware packages
View README.md

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 Feb 25, 2021
This script will find the latest Google Chrome binary package, download it and repackage it into Slackware format.
View latest-chrome.sh
#!/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 Jun 15, 2021
This script will find the latest Firefox binary package, download it and repackage it into Slackware format.
View latest-firefox.sh
#!/bin/bash
# latest-firefox Version 1.6.2
# 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 Aug 29, 2015
Permits install and update of all Chrome channels side by side
View multichrome
#!/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 Oct 10, 2017
A script to fetch updates for Slackware stable
View getupdates
#!/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 Mar 20, 2014
Converts Opera Linux Generic (cross distro) tar packages into the Slackware package format
View op2slk
#!/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 Nov 12, 2018
This script will find the latest Opera stable binary package, downloads and repackage it into Slackware format
View latest-opera.sh
#!/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 Jun 17, 2021
Minimal rpm2cpio using only bash, grep, tail and a decompressor
View rpm2cpio
#!/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 Mar 22, 2014
Extracts rpms to similarly named directories, using only bash, grep, tail, cpio and a decompressor
View extractrpm
#!/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 Aug 29, 2015
This scripts allows you to run Chrome on Linux, with a self contained profile and without a system wide install
View standalonechrome
#!/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