Skip to content

Commit

Permalink
Add support for armhf and arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
KnugiHK committed Dec 29, 2023
1 parent b1972fa commit e4faf22
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 16 deletions.
35 changes: 24 additions & 11 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
PUSH: 1
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v5
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
Expand All @@ -39,25 +39,38 @@ jobs:
run: |
function update_repo() {
ver=$(echo "$1" | tr -d 'v' | cut -d "-" -f 1)
reprepro --basedir "$(pwd)/meta" includedeb stable "./freetube_${ver}_amd64.deb"
reprepro --basedir "$(pwd)/meta" includedeb stable "./freetube_${ver}_amd64.deb" "./freetube_${ver}_arm64.deb" "./freetube_${ver}_armv7l.deb"
if [ -d dists ]; then rm -r dists; fi
if [ -d pool ]; then rm -r pool; fi
mv meta/dists ./
mv meta/pool ./
checksum=$(find pool/main/f/freetube/ -type f -exec sha256sum "{}" +)
sed -i -E "s,[a-f0-9]{64}[ ]+pool/main/f/freetube/freetube_[0-9]\.[0-9]+\.[0-9]_amd64.deb,$checksum," README.md
checksum_amd64=$(sha256sum pool/main/f/freetube/freetube_${ver}_amd64.deb)
checksum_arm64=$(sha256sum pool/main/f/freetube/freetube_${ver}_arm64.deb)
checksum_armv7l=$(sha256sum pool/main/f/freetube/freetube_${ver}_armhf.deb)
sed -i -E "s,[a-f0-9]{64}[ ]+pool/main/f/freetube/freetube_[0-9]\.[0-9]+\.[0-9]_amd64.deb,$checksum_amd64," README.md
sed -i -E "s,[a-f0-9]{64}[ ]+pool/main/f/freetube/freetube_[0-9]\.[0-9]+\.[0-9]_arm64.deb,$checksum_arm64," README.md
sed -i -E "s,[a-f0-9]{64}[ ]+pool/main/f/freetube/freetube_[0-9]\.[0-9]+\.[0-9]_armhf.deb,$checksum_armhf," README.md
echo "PUSH=0" >> $GITHUB_ENV
}
function download_update() {
if [ -f /tmp/verify.log ]; then rm /tmp/verify.log; fi
wget -q "$2" --show-progress
ver=$(echo "$1" | tr -d 'v' | cut -d "-" -f 1)
wget -q "https://github.com/FreeTubeApp/FreeTube/releases/download/$1/freetube_${ver}_amd64.deb" --show-progress
if [ "$?" -eq "0" ]; then
echo "$1" > last_update
return 0
else
return 1
echo 'amd64 downloaded'
wget -q "https://github.com/FreeTubeApp/FreeTube/releases/download/$1/freetube_${ver}_arm64.deb" --show-progress
if [ "$?" -eq "0" ]; then
echo 'arm64 downloaded'
wget -q "https://github.com/FreeTubeApp/FreeTube/releases/download/$1/freetube_${ver}_armv7l.deb" --show-progress
if [ "$?" -eq "0" ]; then
echo 'armv7l downloaded'
echo "$1" > last_update
return 0
fi
fi
fi
return 1
}
function compare (){
Expand Down Expand Up @@ -91,7 +104,7 @@ jobs:
last_update=$(cat last_update)
if compare "$last_update" "$latest"; then
echo 'Update available, downloading latest deb'
if download_update "$latest" "$releases"; then
if download_update "$latest"; then
update_repo "$latest"
fi
else
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ I do this for myself, but if you want to use it, feel free to audit this repo fi
```shell
sudo apt remove freetube # if you installed FreeTube through deb file already, uninstall first.
wget -qO- https://knugihk.github.io/freetube-apt/freetube-archive-keyring.asc | gpg --dearmor | sudo tee /usr/share/keyrings/freetube-archive-keyring.gpg > /dev/null
echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/freetube-archive-keyring.gpg] https://knugihk.github.io/freetube-apt/ stable main' | sudo tee /etc/apt/sources.list.d/freetube.list
echo 'deb [signed-by=/usr/share/keyrings/freetube-archive-keyring.gpg] https://knugihk.github.io/freetube-apt/ stable main' | sudo tee /etc/apt/sources.list.d/freetube.list
sudo apt update
sudo apt install freetube -y
```

# Checksum
75a4441b8a5ec3cf5937fa867391554dad6bf118a99496af1dfc6b8dc2437ef6 pool/main/f/freetube/freetube_0.19.1_amd64.deb
11a6a364c9182688bab210f0ec09c302dd60074f66bc8b8352e285016549ca27 pool/main/f/freetube/freetube_0.19.1_arm64.deb
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa pool/main/f/freetube/freetube_0.19.1_armhf.deb

# Copyright
The FreeTube installer (deb file) is re-distributed in AGPLv3
2 changes: 1 addition & 1 deletion last_update
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.19.1-beta
v0.19.0-beta
6 changes: 3 additions & 3 deletions meta/conf/distributions
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Origin: knugihk.github.io/freetube-apt
Label: knugihk.github.io/freetube-apt
Origin: ghaaapt.github.io/freetube-apt
Label: ghaaapt.github.io/freetube-apt
Codename: stable
Architectures: amd64
Architectures: amd64 arm64 armhf
Components: main
Description: Unofficial APT repository for Debian/Ubuntu client of FreeTube
SignWith: C2F59EA2C16FEE63AD7D6FEB4166731331A8C873

0 comments on commit e4faf22

Please sign in to comment.