add packaging
This commit is contained in:
parent
019c576f1d
commit
41d4170ab9
9 changed files with 282 additions and 85 deletions
1
package/aur/.gitignore
vendored
Normal file
1
package/aur/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/tmp
|
27
package/aur/package
Executable file
27
package/aur/package
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/bash
|
||||
set -e
|
||||
cd "$(dirname "$(realpath "$0")")"
|
||||
|
||||
|
||||
rm -vfr tmp
|
||||
mkdir tmp
|
||||
cd tmp
|
||||
ln -s ../src/PKGBUILD ./
|
||||
[ -f '../../release/tmp/regar-x86_64-unknown-linux-gnu.zip' ] && cp ../../release/tmp/regar-x86_64-unknown-linux-gnu.zip ./
|
||||
|
||||
|
||||
makepkg -s
|
||||
checksum="$(sha256sum regar-x86_64-unknown-linux-gnu.zip | cut -d ' ' -f 1)"
|
||||
sed -E -i ../src/PKGBUILD -e "s/^sha256sums=.*\$/sha256sums=(\"$checksum\")/g"
|
||||
|
||||
|
||||
git clone ssh://aur@aur.archlinux.org/regar-bin.git
|
||||
cd regar-bin
|
||||
cp ../../src/PKGBUILD ./PKGBUILD
|
||||
makepkg --printsrcinfo > .SRCINFO
|
||||
added="$(git add .)"
|
||||
if [ ".$added" != "." ]
|
||||
then
|
||||
git commit -m "update"
|
||||
git push
|
||||
fi
|
20
package/aur/src/PKGBUILD
Normal file
20
package/aur/src/PKGBUILD
Normal file
|
@ -0,0 +1,20 @@
|
|||
# Maintainer: JOLIMAITRE Matthieu <matthieu@imagevo.fr>
|
||||
pkgname="regar-bin"
|
||||
pkgver=1.0.0
|
||||
pkgrel=1
|
||||
pkgdesc="Cli for watching file changes and running commands periodically."
|
||||
url="https://git.barnulf.net/mb/regar"
|
||||
arch=("x86_64")
|
||||
license=('MIT')
|
||||
source=("https://git.barnulf.net/api/packages/mb/generic/regar/latest/regar-x86_64-unknown-linux-gnu.zip")
|
||||
sha256sums=("4f04da4f00e74032d86f6a8051d10120588d16ba3d0eb3bf5bd4742f836975ab")
|
||||
options=("!strip")
|
||||
provides=("regar")
|
||||
|
||||
package() {
|
||||
install -Dm755 regar "$pkgdir/usr/bin/regar"
|
||||
}
|
||||
|
||||
pkgver() {
|
||||
./regar -V
|
||||
}
|
1
package/release/.gitignore
vendored
Normal file
1
package/release/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
/tmp
|
26
package/release/package
Executable file
26
package/release/package
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/usr/bin/bash
|
||||
set -e
|
||||
cd "$(dirname "$(realpath "$0")")"
|
||||
|
||||
|
||||
version="$(../../src/regar.ts -V)"
|
||||
auth="$(cat ~/.secrets/git_barnulf_net.txt)"
|
||||
artefact="regar-x86_64-unknown-linux-gnu.zip"
|
||||
|
||||
|
||||
../../build
|
||||
mkdir -p tmp
|
||||
cp ../../target/regar tmp/regar
|
||||
cd tmp
|
||||
zip "$artefact" regar
|
||||
du -sh "$artefact"
|
||||
|
||||
|
||||
curl --progress-bar \
|
||||
--user "$auth" \
|
||||
--upload-file "$artefact" \
|
||||
"https://git.barnulf.net/api/packages/mb/generic/regar/$version/$artefact" | cat
|
||||
curl --progress-bar \
|
||||
--user "$auth" \
|
||||
--upload-file "$artefact" \
|
||||
"https://git.barnulf.net/api/packages/mb/generic/regar/latest/$artefact" | cat
|
Loading…
Add table
Add a link
Reference in a new issue