├── .SRCINFO ├── LICENSE ├── PKGBUILD └── .github └── workflows └── update.yml /.SRCINFO: -------------------------------------------------------------------------------- 1 | pkgbase = twitch-drops-miner-bin 2 | pkgdesc = An app that allows you to AFK mine timed Twitch drops, with automatic drop claiming and channel switching. 3 | pkgver = 20251213.210614 4 | pkgrel = 1 5 | url = https://github.com/DevilXD/TwitchDropsMiner 6 | arch = x86_64 7 | arch = aarch64 8 | license = MIT 9 | provides = twitch-drops-miner 10 | conflicts = twitch-drops-miner 11 | options = !strip 12 | source_x86_64 = Twitch.Drops.Miner-x86_64.AppImage::https://github.com/DevilXD/TwitchDropsMiner/actions/runs/16847076869/artifacts/3725324177 13 | sha256sums_x86_64 = 311139f0446eb6c9ede9f4bbb9acfbf1100f8fe2d09531bca4eec6cac0d3eeba 14 | source_aarch64 = Twitch.Drops.Miner-aarch64.AppImage::https://assets.dataflare.app/release/linux/aarch64/Dataflare.AppImage 15 | sha256sums_aarch64 = ac427ef1aad2d72632cc90466ef38823cbc47d3e203eacc11802f025f84079c8 16 | 17 | pkgname = twitch-drops-miner-bin 18 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 PandaDEV 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /PKGBUILD: -------------------------------------------------------------------------------- 1 | # Maintainer: PandaDEV 2 | pkgname=twitch-drops-miner-bin 3 | pkgver=20251213.210614 4 | pkgrel=1 5 | pkgdesc="An app that allows you to AFK mine timed Twitch drops, with automatic drop claiming and channel switching." 6 | arch=(x86_64 aarch64) 7 | url="https://github.com/DevilXD/TwitchDropsMiner" 8 | license=('MIT') 9 | options=('!strip') 10 | depends=() 11 | provides=(twitch-drops-miner) 12 | conflicts=(twitch-drops-miner) 13 | source_x86_64=("Twitch.Drops.Miner.Linux.AppImage-x86_64.zip::https://github.com/DevilXD/TwitchDropsMiner/releases/download/dev-build/Twitch.Drops.Miner.Linux.AppImage-x86_64.zip") 14 | source_aarch64=("Twitch.Drops.Miner.Linux.AppImage-aarch64.zip::https://github.com/DevilXD/TwitchDropsMiner/releases/download/dev-build/Twitch.Drops.Miner.Linux.AppImage-aarch64.zip") 15 | sha256sums_x86_64=('311139f0446eb6c9ede9f4bbb9acfbf1100f8fe2d09531bca4eec6cac0d3eeba') 16 | sha256sums_aarch64=('ac427ef1aad2d72632cc90466ef38823cbc47d3e203eacc11802f025f84079c8') 17 | 18 | prepare() { 19 | cd "$srcdir" 20 | unzip -o "Twitch.Drops.Miner.Linux.AppImage-${CARCH}.zip" 21 | } 22 | 23 | package() { 24 | cd "$srcdir" 25 | appimage_file=$(find . -name "*.AppImage" -type f | head -1) 26 | 27 | if [ -z "$appimage_file" ]; then 28 | echo "Error: No AppImage file found after extraction" 29 | exit 1 30 | fi 31 | 32 | chmod +x "$appimage_file" 33 | 34 | install -Dm755 "$appimage_file" "$pkgdir/usr/lib/twitch-drops-miner/twitch-drops-miner.appimage" 35 | 36 | install -dm755 "$pkgdir/usr/bin" 37 | cat > "$pkgdir/usr/bin/twitch-drops-miner" << 'EOF' 38 | #!/bin/bash 39 | export APPIMAGE_EXTRACT_AND_RUN=1 40 | 41 | # Create user data directory if it doesn't exist 42 | DATA_DIR="$HOME/.local/share/twitch-drops-miner" 43 | mkdir -p "$DATA_DIR" 44 | 45 | # Copy AppImage to user directory if it doesn't exist or is older 46 | USER_APPIMAGE="$DATA_DIR/twitch-drops-miner.appimage" 47 | SYSTEM_APPIMAGE="/usr/lib/twitch-drops-miner/twitch-drops-miner.appimage" 48 | 49 | if [ ! -f "$USER_APPIMAGE" ] || [ "$SYSTEM_APPIMAGE" -nt "$USER_APPIMAGE" ]; then 50 | echo "Copying AppImage to user directory..." 51 | cp "$SYSTEM_APPIMAGE" "$USER_APPIMAGE" 52 | chmod +x "$USER_APPIMAGE" 53 | fi 54 | 55 | # Change to user data directory and run from there 56 | cd "$DATA_DIR" 57 | exec "$USER_APPIMAGE" "$@" 58 | EOF 59 | chmod +x "$pkgdir/usr/bin/twitch-drops-miner" 60 | 61 | "$appimage_file" --appimage-extract >/dev/null 2>&1 62 | 63 | if [ -f squashfs-root/*.desktop ]; then 64 | install -dm755 "$pkgdir/usr/share/applications" 65 | desktop_file=$(find squashfs-root -name "*.desktop" -type f | head -1) 66 | sed 's|Exec=.*|Exec=twitch-drops-miner %U|g' "$desktop_file" > "$pkgdir/usr/share/applications/twitch-drops-miner.desktop" 67 | fi 68 | 69 | png_file=$(find squashfs-root -name "*.png" -type f | head -1) 70 | if [ -n "$png_file" ]; then 71 | install -Dm644 "$png_file" "$pkgdir/usr/share/pixmaps/twitch-drops-miner.png" 72 | fi 73 | 74 | rm -rf squashfs-root 75 | } -------------------------------------------------------------------------------- /.github/workflows/update.yml: -------------------------------------------------------------------------------- 1 | name: aur-auto-update 2 | 3 | on: 4 | schedule: 5 | - cron: "0 * * * *" 6 | workflow_dispatch: 7 | 8 | jobs: 9 | check-update: 10 | runs-on: ubuntu-latest 11 | permissions: 12 | contents: write 13 | steps: 14 | - uses: actions/checkout@v4 15 | - name: Download AppImages and check for updates 16 | id: check_update 17 | run: | 18 | # Download the AppImages 19 | wget -O Twitch.Drops.Miner.Linux.AppImage-x86_64.zip https://github.com/DevilXD/TwitchDropsMiner/releases/download/dev-build/Twitch.Drops.Miner.Linux.AppImage-x86_64.zip 20 | wget -O Twitch.Drops.Miner.Linux.AppImage-aarch64.zip https://github.com/DevilXD/TwitchDropsMiner/releases/download/dev-build/Twitch.Drops.Miner.Linux.AppImage-aarch64.zip 21 | 22 | # Calculate new checksums 23 | NEW_SHA_X86_64=$(sha256sum Twitch.Drops.Miner.Linux.AppImage-x86_64.zip | awk '{print $1}') 24 | NEW_SHA_AARCH64=$(sha256sum Twitch.Drops.Miner.Linux.AppImage-aarch64.zip | awk '{print $1}') 25 | 26 | # Get current checksums from PKGBUILD 27 | CURRENT_SHA_X86_64=$(grep "sha256sums_x86_64=" PKGBUILD | cut -d"'" -f2) 28 | CURRENT_SHA_AARCH64=$(grep "sha256sums_aarch64=" PKGBUILD | cut -d"'" -f2) 29 | 30 | echo "Current x86_64 checksum: $CURRENT_SHA_X86_64" 31 | echo "New x86_64 checksum: $NEW_SHA_X86_64" 32 | echo "Current aarch64 checksum: $CURRENT_SHA_AARCH64" 33 | echo "New aarch64 checksum: $NEW_SHA_AARCH64" 34 | 35 | # Check if checksums are different 36 | if [ "$CURRENT_SHA_X86_64" = "$NEW_SHA_X86_64" ] && [ "$CURRENT_SHA_AARCH64" = "$NEW_SHA_AARCH64" ]; then 37 | echo "No update needed - checksums are the same" 38 | echo "update_needed=false" >> $GITHUB_OUTPUT 39 | else 40 | echo "Update needed - checksums are different" 41 | echo "update_needed=true" >> $GITHUB_OUTPUT 42 | # Generate new version based on current date/time 43 | NEW_VERSION=$(date '+%Y%m%d.%H%M%S') 44 | echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV 45 | echo "SHA_X86_64=$NEW_SHA_X86_64" >> $GITHUB_ENV 46 | echo "SHA_AARCH64=$NEW_SHA_AARCH64" >> $GITHUB_ENV 47 | echo "New version will be: $NEW_VERSION" 48 | fi 49 | 50 | - name: Update PKGBUILD and .SRCINFO 51 | if: steps.check_update.outputs.update_needed == 'true' 52 | run: | 53 | VERSION=$NEW_VERSION 54 | 55 | # Update PKGBUILD 56 | sed -i "s/^pkgver=.*/pkgver=$VERSION/" PKGBUILD 57 | sed -i "s/^sha256sums_x86_64=.*/sha256sums_x86_64=('$SHA_X86_64')/" PKGBUILD 58 | sed -i "s/^sha256sums_aarch64=.*/sha256sums_aarch64=('$SHA_AARCH64')/" PKGBUILD 59 | 60 | # Update .SRCINFO 61 | sed -i "s/^[[:space:]]*pkgver = .*/\tpkgver = $VERSION/" .SRCINFO 62 | sed -i "s/^[[:space:]]*sha256sums_x86_64 = .*/\tsha256sums_x86_64 = $SHA_X86_64/" .SRCINFO 63 | sed -i "s/^[[:space:]]*sha256sums_aarch64 = .*/\tsha256sums_aarch64 = $SHA_AARCH64/" .SRCINFO 64 | 65 | - name: Commit and push to AUR 66 | if: steps.check_update.outputs.update_needed == 'true' 67 | uses: webfactory/ssh-agent@v0.7.0 68 | with: 69 | ssh-private-key: ${{ secrets.AUR_SSH_PRIVATE_KEY }} 70 | 71 | - name: Add AUR host key 72 | if: steps.check_update.outputs.update_needed == 'true' 73 | run: | 74 | mkdir -p ~/.ssh 75 | echo "aur.archlinux.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEuBKrPzbawxA/k2g6NcyV5jmqwJ2s+zpgZGZ7tpLIcN" >> ~/.ssh/known_hosts 76 | echo "aur.archlinux.org ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDKF9vAFWdgm9Bi8uc+tYRBmXASBb5cB5iZsB7LOWWFeBrLp3r14w0/9S2vozjgqY5sJLDPONWoTTaVTbhe3vwO8CBKZTEt1AcWxuXNlRnk9FliR1/eNB9uz/7y1R0+c1Md+P98AJJSJWKN12nqIDIhjl2S1vOUvm7FNY43fU2knIhEbHybhwWeg+0wxpKwcAd/JeL5i92Uv03MYftOToUijd1pqyVFdJvQFhqD4v3M157jxS5FTOBrccAEjT+zYmFyD8WvKUa9vUclRddNllmBJdy4NyLB8SvVZULUPrP3QOlmzemeKracTlVOUG1wsDbxknF1BwSCU7CmU6UFP90kpWIyz66bP0bl67QAvlIc52Yix7pKJPbw85+zykvnfl2mdROsaT8p8R9nwCdFsBc9IiD0NhPEHcyHRwB8fokXTajk2QnGhL+zP5KnkmXnyQYOCUYo3EKMXIlVOVbPDgRYYT/XqvBuzq5S9rrU70KoI/S5lDnFfx/+lPLdtcnnEPk=" >> ~/.ssh/known_hosts 77 | echo "aur.archlinux.org ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBLMiLrP8pVi5BFX2i3vepSUnpedeiewE5XptnUnau+ZoeUOPkpoCgZZuYfpaIQfhhJJI5qgnjJmr4hyJbe/zxow=" >> ~/.ssh/known_hosts 78 | - name: Set up Git 79 | if: steps.check_update.outputs.update_needed == 'true' 80 | run: | 81 | git config --global user.email "70103896+0PandaDEV@users.noreply.github.com" 82 | git config --global user.name "0PandaDEV" 83 | 84 | - name: Commit and push changes 85 | if: steps.check_update.outputs.update_needed == 'true' 86 | run: | 87 | git add PKGBUILD .SRCINFO LICENSE 88 | if git diff --staged --quiet; then 89 | echo "No changes to commit" 90 | exit 0 91 | fi 92 | git commit -m "chore: update to $NEW_VERSION" 93 | 94 | # Force push to GitHub to overwrite any conflicts 95 | git push --force origin master 96 | 97 | # Prepare AUR-only version working with existing history 98 | git remote add aur ssh://aur@aur.archlinux.org/twitch-drops-miner-bin.git 99 | git fetch aur master 100 | 101 | # Create branch based on AUR history 102 | git checkout -b aur-temp aur/master 103 | 104 | # Update files to match our version 105 | git checkout master -- PKGBUILD .SRCINFO LICENSE 106 | 107 | # Remove .github directory if it exists in AUR 108 | if [ -d ".github" ]; then 109 | git rm -rf .github 110 | fi 111 | 112 | # Commit the changes 113 | git add PKGBUILD .SRCINFO LICENSE 114 | git commit -m "chore: update to $NEW_VERSION" 115 | 116 | # Push to AUR 117 | git push --force aur aur-temp:master 118 | 119 | # Return to master branch and clean up 120 | git checkout master 121 | git branch -D aur-temp --------------------------------------------------------------------------------