void-packages/justfile

46 lines
1.6 KiB
Makefile

update:
git pull upstream master
make target:
./xbps-src pkg -j$(nproc) {{ target }}
install target:
xi {{ target }}
patch target:
./xbps-src patch {{ target }}
template target repo branch commit:
#!/usr/bin/env sh
branch="{{ branch }}"
repo="{{ repo }}"
#if [ "{{ commit }}" == "latest" ]; then
# _commit=$(git ls-remote git://github.com/$repo.git | grep refs/heads/$branch | cut -f 1)
# else
# _commit="{{ commit }}"
# fi
_commit="{{ commit }}"
version=$(curl -s https://api.github.com/repos/$repo/commits/$_commit | jq '"@" + (.commit.author.date|fromdate|tostring)' | xargs date +"%Y%m%d" -d)
distfile="https://github.com/$repo/archive/${_commit}.tar.gz"
checksum=$(curl -fLs $distfile | sha256sum | awk '{print $1}')
sed -i "s/_commit=.*/_commit=\"$_commit\"/; s/checksum=.*/checksum=$checksum/; s/version=.*/version=$version/" ./srcpkgs/{{ target }}/template
mpd:
just template mpd MusicPlayerDaemon/MPD master 57a1403f081a9096e24dc67cf62d224866bd1639
mpv:
# just template mpv mpv-player/mpv master 5463d3eeff0aeff4f9c6d7634ace157ceb2cec57
just template mpv mpv-player/mpv master 6acb7db9facd41f67aebb54a0daeddaaa30d54b3
wired-notify:
just template wired-notify Toqozz/wired-notify master 39e4265a70eb9d0ad5baf8c4de6f46fcedcf0026
deadd-notification-center:
just template deadd-notification-center phuhl/linux_notification_center master 640ce0fc05a68f2c28be3d9f27fe73516d4332f9
picom:
just template picom jonaburg/picom next 68c8f1b5729dfd3c0259b3bbb225193c9ecdb526
clean:
./xbps-src zap
./xbps-src binary-bootstrap