Add packaging scripts for .deb and .rpm

main
Micke Nordin 4 years ago
parent 528d2adf9e
commit 2a9db67b9e

@ -0,0 +1,18 @@
#!/usr/bin/env bash
# Verision of wireguide
VERSION=$(awk -F '"' '/self.version =/ {print $2}' ~/sources/wireguide/src/wireguide)
# Convert deb to rpm
sudo alien -g -r ~/sources/wireguide_${VERSION}_all.deb
# Remove generated specfile
sudo rm ~/sources/wireguide-${VERSION}/wireguide-*.spec
# Replace with our own
sed "s/##VERSION##/${VERSION}/" ~/sources/wireguide/rpm/wireguide-TEMPLATE.spec > ~/sources/wireguide-${VERSION}/wireguide-${VERSION}.spec
# Change to build dir
cd ~/sources/wireguide-${VERSION}
# Build rpm
sudo rpmbuild --buildroot=~/sources/wireguide-${VERSION} -bb wireguide-${VERSION}.spec

@ -0,0 +1,13 @@
#!/usr/bin/env bash
# Version of wireguide
VERSION=$(awk -F '"' '/self.version =/ {print $2}' ~/sources/wireguide/src/wireguide)
# Where i keep the sources
cd ~/sources
# Build deb
dpkg-buildpackage -us -uc
# Add binary and source to repo
reprepro --basedir ~/sources/debian includedeb unstable ~/sources/wireguide_${VERSION}_all.deb
reprepro --basedir ~/sources/debian -S net --priority optional includedsc unstable ~/sources/wireguide_${VERSION}.dsc

@ -0,0 +1,29 @@
Buildroot: /home/micke/sources/wireguide-##VERSION##
Name: wireguide
Version: ##VERSION##
Release: 1
Requires: python3-wxpython4
Summary: WireGUIde is a graphical user interface for WireGuard
License: GPL3+
Distribution: Fedora
Group: Converted/net
%define _rpmdir ../
%define _rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm
%define _unpackaged_files_terminate_build 0
%description
WireGUIde is a free and open source graphical user interface for WireGuard:
https://www.wireguard.com/. Using WireGUIde you will be able to easily manage
you Wireguard client connections on GNU/Linux without the need to use the
terminal. WireGUIde uses NetworkManager as a backend, so it is compatible with
connections set up with nmcli.
%files
"/usr/bin/wireguide"
"/usr/share/applications/wireguide.desktop"
%dir "/usr/share/doc/wireguide/"
"/usr/share/doc/wireguide/changelog.gz"
"/usr/share/doc/wireguide/copyright"
"/usr/share/icons/hicolor/256x256/ke.mic.wireguide.png"
Loading…
Cancel
Save