Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Possibly fix flatpak build and xenial launchpad source package upload


Former-commit-id: 6b04a97
  • Loading branch information
tkashkin committed Oct 10, 2018
1 parent 72d5a78 commit 8a275af
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,17 @@ It also allows to download bonus content for GOG games.
## Installation
Prebuilt releases can be found on [releases page](https://github.com/tkashkin/GameHub/releases).

### Ubuntu-based distros
Use prebuilt deb packages from [releases page](https://github.com/tkashkin/GameHub/releases) or add a [PPA](https://launchpad.net/~tkashkin/+archive/ubuntu/gamehub) and install with `apt`:
```bash
sudo apt install software-properties-common # install if `add-apt-repository` is not available
sudo add-apt-repository ppa:tkashkin/gamehub
sudo apt update
sudo apt install com.github.tkashkin.gamehub
```

### Arch Linux
Arch Linux users can find GameHub under the name [gamehub-git](https://aur.archlinux.org/packages/gamehub-git/) in the **AUR**:
[gamehub-git](https://aur.archlinux.org/packages/gamehub-git/) is available in AUR:
```bash
aurman -S gamehub-git
```
Expand Down
19 changes: 12 additions & 7 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ import_keys()
gpg1 --no-use-agent --import "$_SCRIPTROOT/launchpad/key_pub.gpg"
gpg1 --no-use-agent --allow-secret-key-import --import "$_SCRIPTROOT/launchpad/key_sec.gpg"
sudo apt-key add "$_SCRIPTROOT/launchpad/key_pub.gpg"
rm "$_SCRIPTROOT/launchpad/key_pub.gpg" "$_SCRIPTROOT/launchpad/key_sec.gpg"
fi
}

Expand All @@ -95,19 +94,20 @@ deps()
build_deb()
{
set -e
echo "[scripts/build.sh] Building deb package"
cd "$_ROOT"
sed "s/\$VERSION/$_DEB_VERSION/g; s/\$DISTRO/$_DEB_TARGET_DISTRO/g; s/\$DATE/`date -R`/g" "debian/changelog.in" > "debian/changelog"
export DEB_BUILD_OPTIONS="nostrip nocheck"
if [[ -e "$_SCRIPTROOT/launchpad/passphrase" && -n "$keys_enc_secret" ]]; then
echo "[scripts/build.sh] Building source package for launchpad"
dpkg-buildpackage -S -sa -us -uc
set +e
echo "[scripts/build.sh] Signing source package"
debsign -p"gpg1 --no-use-agent --passphrase-file $_SCRIPTROOT/launchpad/passphrase --batch" -S -k2744E6BAF20BA10AAE92253F20442B9273408FF9 ../*.changes
rm "$_SCRIPTROOT/launchpad/passphrase"
echo "[scripts/build.sh] Uploading package to launchpad"
dput -u -c "$_SCRIPTROOT/launchpad/dput.cf" "gamehub_$_DEB_TARGET_DISTRO" ../*.changes
set -e
fi
echo "[scripts/build.sh] Building deb package"
dpkg-buildpackage -us -uc
mkdir -p "build/$_BUILD_IMAGE"
cp ../*.deb "build/$_BUILD_IMAGE/GameHub-$_VERSION-amd64.deb"
Expand Down Expand Up @@ -219,14 +219,19 @@ build_flatpak()
echo "[scripts/build.sh] Building flatpak package"
mkdir -p "$_ROOT/build/flatpak"
cd "$_ROOT/build/flatpak"
echo "[scripts/build.sh] Installing flatpak"
sudo apt install -y flatpak flatpak-builder
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
echo "[scripts/build.sh] Cloning flatpak manifest"
git clone https://github.com/tkashkin/GameHub.git --branch flatpak --recursive --depth=1 "manifest"
cd "manifest"
sudo flatpak-builder -y --install-deps-from=flathub --install-deps-only build com.github.tkashkin.gamehub.json
sudo flatpak update -y
sudo flatpak-builder -y --repo=repo --force-clean build com.github.tkashkin.gamehub.json
sudo flatpak build-bundle repo "$_ROOT/build/flatpak/GameHub-$_VERSION.flatpak" com.github.tkashkin.gamehub
echo "[scripts/build.sh] Autoinstalling dependencies"
flatpak-builder -y --user --install-deps-from=flathub --install-deps-only build com.github.tkashkin.gamehub.json
echo "[scripts/build.sh] Installing dependencies"
flatpak install --user flathub org.gnome.Platform//3.28 org.freedesktop.Platform//1.6 org.freedesktop.Platform.GL org.freedesktop.Platform.GL32 io.elementary.Loki.BaseApp//stable org.gnome.Sdk//3.28
flatpak-builder -y --user --repo=repo --force-clean build com.github.tkashkin.gamehub.json
flatpak build-bundle repo "$_ROOT/build/flatpak/GameHub-$_VERSION.flatpak" com.github.tkashkin.gamehub
return 0
}

mkdir -p "$BUILDROOT"
Expand Down

0 comments on commit 8a275af

Please sign in to comment.