* 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:
|
||||
|
||||
| File | Location | Permissions |
|
||||
| --------------- | -------------------------------------- | ----------- |
|
||||
| `./polycat` | `/usr/bin/polycat` | 755 |
|
||||
| `./polycat.ttf` | `/usr/share/fonts/polycat/polycat.ttf` | 644 |
|
||||
| File | Location | Permissions |
|
||||
| ------------------ | ----------------------------------------- | ----------- |
|
||||
| `./polycat` | `/usr/bin/polycat` | 755 |
|
||||
| `./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
|
||||
|
||||
# prep
|
||||
dnf install git -y
|
||||
dnf install jq -y
|
||||
workdir=$(mktemp -d)
|
||||
built_dir=${COMPILED_DIR:-/compiled}/polycat
|
||||
mkdir -p $built_dir
|
||||
version_file=$built_dir/version
|
||||
touch $version_file
|
||||
|
||||
# clone and check whether it's up-to-date
|
||||
cd $workdir
|
||||
git clone https://github.com/2IMT/polycat.git
|
||||
cd ./polycat/
|
||||
# check whether it's up-to-date
|
||||
# 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
|
||||
echo "already up to date, exiting"
|
||||
exit
|
||||
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
|
||||
cd $workdir/polycat/
|
||||
cmake -DCMAKE_BUILD_TYPE=RELEASE .
|
||||
cmake --build .
|
||||
cd $workdir/polycat
|
||||
make
|
||||
|
||||
# build .tar.zst archive
|
||||
cd $workdir
|
||||
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-config ./polycat-built/
|
||||
mkdir -p ${COMPILED_DIR:-/compiled}/polycat/
|
||||
cd $workdir/polycat-built/
|
||||
tar --zstd -cf $built_dir/polycat.tar.zst .
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue