This repository has been archived by the owner on Jun 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For Fedora (dom0 support included) and Debian
- Loading branch information
1 parent
f8ba329
commit 336551c
Showing
3 changed files
with
96 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash | ||
|
||
[ "$DEBUG" == 1 ] && set -x | ||
|
||
set -E # Enable function inheritance of traps | ||
trap exit ERR | ||
|
||
local_dir="$(dirname "$(readlink -f "$0")")" | ||
cd "$local_dir" || exit # Change into directory of this script | ||
|
||
# Author PGP key initial source | ||
#gpg --keyserver keyring.debian.org --recv-keys 7405E745574809734800156DB65019C47F7A36F8 | ||
|
||
gpg --import author.asc | ||
|
||
cd .. || exit | ||
|
||
latest_version_tag="$(git describe --abbrev=0)" | ||
|
||
# Fix "gpg.program=qubes-gpg-client-wrapper" causing "git verify-tag" to fail in cases where Qubes Split GPG is in use | ||
# Set "gpg.program=gpg" locally for this repo | ||
git config gpg.program gpg | ||
|
||
if ! git verify-tag "$latest_version_tag"; then | ||
echo "Failed to verify Qubes Video Companion author PGP key!" >&2 | ||
exit 1 | ||
fi | ||
git checkout "$latest_version_tag" | ||
|
||
#latest_version="$(echo "$latest_version_tag" | tr -d v)" | ||
latest_version="1.0.0" # Temporary until versions are updated in package metadata | ||
|
||
cd .. || exit | ||
tar cvzf "qubes-video-companion_$latest_version.orig.tar.gz" qubes-video-companion | ||
sudo apt-get -y install devscripts pandoc | ||
cd qubes-video-companion || exit | ||
debuild || true | ||
debuild -- clean | ||
|
||
echo "Run the following command one directory up from the qubes-video-companion directory to install the package: sudo apt install ./qubes-video-companion_$latest_version-1_all.deb" >&2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/bash | ||
|
||
[ "$DEBUG" == 1 ] && set -x | ||
|
||
set -E # Enable function inheritance of traps | ||
trap exit ERR | ||
|
||
if [ "$1" == "dom0" ]; then | ||
echo "To build for Qubes R4.0 dom0 ensure that this script is running in a Fedora 25 AppVM (the same version as dom0)!" >&2 | ||
echo "Install the Fedora 25 template in dom0 by running this command: sudo qubes-dom0-update qubes-template-fedora-25" >&2 | ||
package_type="dom0" | ||
fi | ||
|
||
local_dir="$(dirname "$(readlink -f "$0")")" | ||
cd "$local_dir" || exit # Change into directory of this script | ||
|
||
# Author PGP key initial source | ||
#gpg --keyserver keyring.debian.org --recv-keys 7405E745574809734800156DB65019C47F7A36F8 | ||
|
||
gpg --import author.asc | ||
|
||
cd .. || exit | ||
|
||
latest_version_tag="$(git describe --abbrev=0)" | ||
|
||
# Fix "gpg.program=qubes-gpg-client-wrapper" causing "git verify-tag" to fail in cases where Qubes Split GPG is in use | ||
# Set "gpg.program=gpg" locally for this repo | ||
git config gpg.program gpg | ||
|
||
if ! git verify-tag "$latest_version_tag"; then | ||
echo "Failed to verify Qubes Video Companion author PGP key!" >&2 | ||
exit 1 | ||
fi | ||
git checkout "$latest_version_tag" | ||
|
||
#latest_version="$(echo "$latest_version_tag" | tr -d v)" | ||
latest_version="1.0.0" # Temporary until versions are updated in package metadata | ||
|
||
cd .. || exit | ||
cp -r qubes-video-companion "qubes-video-companion-$latest_version" | ||
tar cvzf "qubes-video-companion-$latest_version.tar.gz" "qubes-video-companion-$latest_version" | ||
sudo dnf -y install rpm-build rpmdevtools pandoc | ||
rpmdev-setuptree | ||
cp "qubes-video-companion-$latest_version.tar.gz" "$HOME/rpmbuild/SOURCES" | ||
cp qubes-video-companion/rpm_spec/* "$HOME/rpmbuild/SPECS" | ||
|
||
if [ package_type != "dom0" ]; then | ||
cp qubes-video-companion/rpm_spec/qubes-video-companion.spec.in "$HOME/rpmbuild/SPECS" | ||
rpmbuild -ba ~/rpmbuild/SPECS/qubes-video-companion.spec.in | ||
echo "Run the following command to install the package: sudo dnf install ~/rpmbuild/RPMS/noarch/qubes-video-companion-$latest_version-1.fcXX.noarch.rpm" >&2 | ||
else | ||
cp qubes-video-companion/rpm_spec/qubes-video-companion.spec.in "$HOME/rpmbuild/SPECS" | ||
rpmbuild -ba ~/rpmbuild/SPECS/qubes-video-companion-dom0.spec.in | ||
echo "Transfer this package to dom0 and install, see here: https://www.qubes-os.org/doc/how-to-copy-from-dom0/" >&2 | ||
echo "In dom0, run the following command to install the package: sudo dnf install ./qubes-video-companion-$latest_version-1.fcXX.noarch.rpm" >&2 | ||
fi |