45 lines
1.2 KiB
Bash
Executable file
45 lines
1.2 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
version=$(cat version)
|
|
release=$(cat release)
|
|
source_release=$(cat source_release)
|
|
tmp="" && [ $release -gt 1 ] && tmp=-$release
|
|
full_version=$version-$source_release$tmp
|
|
arch="x86_64" && [ ! -z $ARCH ] && arch=$ARCH
|
|
|
|
echo assets/post_package_distini_etc.sh: Starting Post-package script for version $full_version for $arch.
|
|
|
|
# ---
|
|
|
|
# See: https://gitlab.com/librewolf-community/browser/linux/-/blob/master/scripts/5_Configure_Binary_Tarball.sh
|
|
|
|
binary_tarball=librewolf-$full_version.en-US.linux-$arch.tar.bz2
|
|
|
|
|
|
# Extract tarball
|
|
mkdir -p work
|
|
tar --strip-components=1 -xf $binary_tarball -C work
|
|
|
|
# Add distribution.ini
|
|
distini="work/distribution/distribution.ini"
|
|
install -Dvm644 /dev/stdin $distini <<END
|
|
[Global]
|
|
id=io.gitlab.librewolf-community
|
|
version=1.0
|
|
about=LibreWolf
|
|
|
|
[Preferences]
|
|
app.distributor="LibreWolf Community"
|
|
app.distributor.channel=librewolf
|
|
app.partner.librewolf=librewolf
|
|
END
|
|
|
|
# Create Appstream metadate file
|
|
export DATE=$(date +%Y-%m-%d)
|
|
envsubst < assets/linux-base/content/io.gitlab.librewolf-community.appdata.xml.in > work/io.gitlab.librewolf-community.appdata.xml
|
|
|
|
# Recompress tarball
|
|
rm -f $binary_tarball
|
|
tar -jvcf $binary_tarball -C work .
|