summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO19
-rw-r--r--.gitignore8
-rw-r--r--PKGBUILD45
-rw-r--r--cosmic-wam.desktop9
4 files changed, 81 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..bd594a436d7c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = cosmic-wam-git
+ pkgdesc = Web App Manager written with love and libcosmic.
+ pkgver = r54.c59ae0a
+ pkgrel = 1
+ url = https://github.com/elevenhsoft/cosmic-wam
+ arch = x86_64
+ license = GPL-3.0-or-later
+ makedepends = cargo
+ makedepends = git
+ depends = gcc-libs
+ depends = openssl
+ provides = cosmic-wam
+ conflicts = cosmic-wam
+ source = git+https://github.com/elevenhsoft/cosmic-wam.git
+ source = cosmic-wam.desktop
+ sha256sums = SKIP
+ sha256sums = 3dc3d3eaf91108051add7e57c45d318f26f18cef9ea279ebf900f8ec87cf3794
+
+pkgname = cosmic-wam-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..ccbb1cbb8b6c
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,8 @@
+# Ignore everything
+*
+
+# But not these files...
+!.gitignore
+!PKGBUILD
+!.SRCINFO
+!cosmic-wam.desktop
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..98d2a28942a3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,45 @@
+# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
+pkgname=cosmic-wam-git
+pkgver=r54.c59ae0a
+pkgrel=1
+pkgdesc="Web App Manager written with love and libcosmic."
+arch=('x86_64')
+url="https://github.com/elevenhsoft/cosmic-wam"
+license=('GPL-3.0-or-later')
+depends=('gcc-libs' 'openssl')
+makedepends=('cargo' 'git')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=('git+https://github.com/elevenhsoft/cosmic-wam.git'
+ "${pkgname%-git}.desktop")
+sha256sums=('SKIP'
+ '3dc3d3eaf91108051add7e57c45d318f26f18cef9ea279ebf900f8ec87cf3794')
+
+pkgver() {
+ cd "${pkgname%-git}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "${pkgname%-git}"
+ export CARGO_HOME="$srcdir/cargo-home"
+ export RUSTUP_TOOLCHAIN=stable
+ cargo fetch --target "$CARCH-unknown-linux-gnu"
+}
+
+build() {
+ cd "${pkgname%-git}"
+ export CARGO_HOME="$srcdir/cargo-home"
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+ cargo build --release --all-features
+}
+
+package() {
+ cd "${pkgname%-git}"
+ install -Dm755 "target/release/${pkgname%-git}" -t "$pkgdir/usr/bin/"
+ install -Dm644 assets/icons/wam-icon.png \
+ "$pkgdir/usr/share/pixmaps/${pkgname%-git}.png"
+ install -Dm644 "$srcdir/${pkgname%-git}.desktop" -t \
+ "$pkgdir/usr/share/applications/"
+}
diff --git a/cosmic-wam.desktop b/cosmic-wam.desktop
new file mode 100644
index 000000000000..cc47c0d7d177
--- /dev/null
+++ b/cosmic-wam.desktop
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Type=Application
+Name=Cosmic WAM
+Comment=Cosmic Web App Manager
+Icon=cosmic-wam
+Exec=cosmic-wam
+Terminal=false
+Categories=Application;Network;
+StartupNotify=false