* use actual releases
* update for 2.0 * add note for why it's built with fedora instead of debian
This commit is contained in:
parent
0cdf04d1d9
commit
42f49fe1af
2 changed files with 23 additions and 18 deletions
13
README.md
13
README.md
|
@ -13,7 +13,12 @@
|
||||||
|
|
||||||
Recommended:
|
Recommended:
|
||||||
|
|
||||||
| File | Location | Permissions |
|
| File | Location | Permissions |
|
||||||
| --------------- | -------------------------------------- | ----------- |
|
| ------------------ | ----------------------------------------- | ----------- |
|
||||||
| `./polycat` | `/usr/bin/polycat` | 755 |
|
| `./polycat` | `/usr/bin/polycat` | 755 |
|
||||||
| `./polycat.ttf` | `/usr/share/fonts/polycat/polycat.ttf` | 644 |
|
| `./polycat.ttf` | `/usr/share/fonts/polycat/polycat.ttf` | 644 |
|
||||||
|
| `./polycat-config` | `/usr/local/share/polycat/polycat-config` | 644 |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
Note: Builds with Fedora because Debian's gcc is out of date.
|
||||||
|
|
|
@ -2,39 +2,39 @@
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
# prep
|
# prep
|
||||||
dnf install git -y
|
dnf install jq -y
|
||||||
workdir=$(mktemp -d)
|
workdir=$(mktemp -d)
|
||||||
built_dir=${COMPILED_DIR:-/compiled}/polycat
|
built_dir=${COMPILED_DIR:-/compiled}/polycat
|
||||||
mkdir -p $built_dir
|
mkdir -p $built_dir
|
||||||
version_file=$built_dir/version
|
version_file=$built_dir/version
|
||||||
touch $version_file
|
touch $version_file
|
||||||
|
|
||||||
# clone and check whether it's up-to-date
|
# check whether it's up-to-date
|
||||||
cd $workdir
|
|
||||||
git clone https://github.com/2IMT/polycat.git
|
|
||||||
cd ./polycat/
|
|
||||||
# check version
|
# check version
|
||||||
version=$(printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)")
|
version=$(curl 'https://api.github.com/repos/2IMT/polycat/releases/latest' | jq '.tag_name' -r | tr -d 'v')
|
||||||
if grep -q $version $version_file; then
|
if grep -q $version $version_file; then
|
||||||
echo "already up to date, exiting"
|
echo "already up to date, exiting"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
# get build deps
|
|
||||||
dnf install cmake g++ -y
|
|
||||||
# get submodules
|
|
||||||
git submodule update --init --depth 1
|
|
||||||
|
|
||||||
|
# get build deps
|
||||||
|
dnf install make g++ -y
|
||||||
|
# get source
|
||||||
|
cd $workdir
|
||||||
|
curl -LO $(curl 'https://api.github.com/repos/2IMT/polycat/releases/latest' | jq '.assets' | jq '.[0].browser_download_url' -r)
|
||||||
|
tar -xzf polycat-$version.tar.gz
|
||||||
|
mv ./polycat-$version ./polycat
|
||||||
|
|
||||||
# compilation
|
# compilation
|
||||||
cd $workdir/polycat/
|
cd $workdir/polycat
|
||||||
cmake -DCMAKE_BUILD_TYPE=RELEASE .
|
make
|
||||||
cmake --build .
|
|
||||||
|
|
||||||
# build .tar.zst archive
|
# build .tar.zst archive
|
||||||
cd $workdir
|
cd $workdir
|
||||||
mkdir ./polycat-built
|
mkdir ./polycat-built
|
||||||
mv ./polycat/polycat ./polycat-built/
|
mv ./polycat/build/polycat ./polycat-built/
|
||||||
mv ./polycat/res/polycat.ttf ./polycat-built/
|
mv ./polycat/res/polycat.ttf ./polycat-built/
|
||||||
|
mv ./polycat/res/polycat-config ./polycat-built/
|
||||||
mkdir -p ${COMPILED_DIR:-/compiled}/polycat/
|
mkdir -p ${COMPILED_DIR:-/compiled}/polycat/
|
||||||
cd $workdir/polycat-built/
|
cd $workdir/polycat-built/
|
||||||
tar --zstd -cf $built_dir/polycat.tar.zst .
|
tar --zstd -cf $built_dir/polycat.tar.zst .
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue