mirror of
https://github.com/SchildiChat/schildichat-desktop.git
synced 2025-03-25 17:50:00 +01:00
Add target to create a local PKGBUILD to install .deb on Arch
pacman target is somewhat broken, so let's do it similarly like the official AUR package for local installs.
This commit is contained in:
parent
80e65529bb
commit
e417f25130
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
release.mk
|
||||
/release
|
||||
/local-pkgbuild
|
||||
|
9
Makefile
9
Makefile
@ -1,4 +1,4 @@
|
||||
.PHONY: all setup web desktop desktop-common linux windows windows-portable
|
||||
.PHONY: all setup web desktop desktop-common linux debian pacman local-pkgbuild local-pkgbuild-install windows windows-portable
|
||||
.PHONY: web-release debian-release pacman-release windows-setup-release windows-unpacked-release windows-portable-release windows-release release
|
||||
.PHONY: clean
|
||||
|
||||
@ -67,6 +67,12 @@ windows: desktop-common
|
||||
windows-portable: desktop-common
|
||||
$(YARN) --cwd element-desktop run build64windows-portable
|
||||
|
||||
local-pkgbuild: debian
|
||||
./create_local_pkgbuild.sh $(VERSION) $(DESKTOP_APP_NAME) $(PRODUCT_NAME) $(OUT_DEB64)
|
||||
|
||||
local-pkgbuild-install: local-pkgbuild
|
||||
cd local-pkgbuild; makepkg --install
|
||||
|
||||
web-release: web
|
||||
mkdir -p $(CURRENT_RELEASE_DIR)
|
||||
cp $(OUT_WEB) $(CURRENT_RELEASE_DIR)
|
||||
@ -105,3 +111,4 @@ clean:
|
||||
$(YARN) --cwd element-desktop clean
|
||||
rm -f element-desktop/webapp
|
||||
rm -rf element-web/dist
|
||||
rm -rf local-pkgbuild
|
||||
|
42
create_local_pkgbuild.sh
Executable file
42
create_local_pkgbuild.sh
Executable file
@ -0,0 +1,42 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
mydir="$(dirname "$(realpath "$0")")"
|
||||
cd "$mydir"
|
||||
|
||||
version="$1"
|
||||
appName="$2"
|
||||
productName="$3"
|
||||
debOut="$4"
|
||||
|
||||
template_dir="local-pkgbuild-template"
|
||||
out_dir="local-pkgbuild"
|
||||
|
||||
if [ -z "$version" ] || [ -z "$appName" ] || [ -z "$productName" ] || [ -z "$debOut" ]; then
|
||||
echo "Usage: $0 version appName productName debOut"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
debName="$(basename "$debOut")"
|
||||
|
||||
rm -rf "$out_dir"
|
||||
mkdir "$out_dir"
|
||||
|
||||
setup_file() {
|
||||
local file="$1"
|
||||
local outfile="$2"
|
||||
if [ -z "$outfile" ]; then
|
||||
local outfile="$file"
|
||||
fi
|
||||
cat "$template_dir/$file" \
|
||||
| sed "s|---version---|$version|g" \
|
||||
| sed "s|---appName---|$appName|g" \
|
||||
| sed "s|---productName---|$productName|g" \
|
||||
| sed "s|---debName---|$debName|g" \
|
||||
> "$out_dir/$outfile"
|
||||
}
|
||||
|
||||
setup_file PKGBUILD
|
||||
setup_file schildichat-desktop.sh "$appName.sh"
|
||||
ln -r -s "$debOut" "$out_dir/$debName"
|
25
local-pkgbuild-template/PKGBUILD
Normal file
25
local-pkgbuild-template/PKGBUILD
Normal file
@ -0,0 +1,25 @@
|
||||
# Maintainer: su-ex <codeworks@supercable.onl>
|
||||
# Maintainer: SpiritCroc <aur@spiritcroc.de>
|
||||
# Contributor: David Mehren <david.mehren@udo.edu>
|
||||
|
||||
pkgname=---appName----git
|
||||
_pkgver=---version---
|
||||
pkgver=${_pkgver//-/.}
|
||||
pkgrel=1
|
||||
pkgdesc="SchildiChat is a Matrix client based on Element with a more traditional instant messaging experience."
|
||||
arch=('x86_64')
|
||||
url="https://schildi.chat"
|
||||
license=('Apache')
|
||||
depends=('sqlcipher')
|
||||
provides=('---appName---')
|
||||
conflicts=('---appName---')
|
||||
source=("---debName---"
|
||||
"---appName---.sh")
|
||||
sha256sums=('SKIP'
|
||||
'SKIP')
|
||||
|
||||
package() {
|
||||
msg2 "Extracting the data.tar.xz..."
|
||||
bsdtar -xf data.tar.xz -C "$pkgdir/"
|
||||
install -Dm755 "${srcdir}"/---appName---.sh "${pkgdir}"/usr/bin/---appName---
|
||||
}
|
3
local-pkgbuild-template/schildichat-desktop.sh
Normal file
3
local-pkgbuild-template/schildichat-desktop.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
exec "/opt/---productName---/---appName---" "$@"
|
Loading…
x
Reference in New Issue
Block a user