Created
September 4, 2017 02:50
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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