Skip to content

Instantly share code, notes, and snippets.

@soamaven
Created September 4, 2017 02:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save soamaven/6b5cd523dc2c72be7c5b012a63184335 to your computer and use it in GitHub Desktop.
Save soamaven/6b5cd523dc2c72be7c5b012a63184335 to your computer and use it in GitHub Desktop.
Bash script to create the rpm for the Wire Desktop app for fc26
# Make a temporary dir to hold downloaded files
mkdir ~/tempwire
cd ~/tempwire
# Get Wire Version
WIRE_VER=$(curl -s -N "https://github.com/wireapp/wire-desktop/releases.atom" | grep -o -m1 ".*Linux.*" | grep -Po "[0-9.]{9}");
# Get latest files from Connor Anderson's Git repo
git clone "https://gitlab.com/ConorIA/wire-builds/repository/archive.tar.gz?ref=master" ~/tempwire
# Get and sort the sources
sed -i "s/<VERSION>/${WIRE_VER}/" wire-desktop.spec
wget "https://github.com/wireapp/wire-desktop/archive/release/${WIRE_VER}.tar.gz"
mkdir -p ~/rpmbuild/SOURCES/
cp ${WIRE_VER}.tar.gz ~/rpmbuild/SOURCES/${WIRE_VER}.tar.gz
cp wire-desktop.desktop ~/rpmbuild/SOURCES/
# Build the .src.rpm
rpmbuild -bs wire-desktop.spec
rpmbuild --rebuild ~/rpmbuild/SRPMS/wire-desktop-${WIRE_VER}-1.fc26.src.rpm
# Install the package
sudo dnf install ~/rpmbuid/RPMS/x86_64/wire-desktop-${WIRE_VER}-1.fc26.rpm
# Remove temporary files
cd ~/
rm -rf ~/tempwire
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment