summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEikano2024-04-14 21:37:10 +0800
committerEikano2024-04-14 21:37:10 +0800
commitfb469fce5ba52d9ef52438394819b00df3341b59 (patch)
treead8cfb326bf90f21e85993d8a472d01aca7f70e6
downloadaur-fb469fce5ba52d9ef52438394819b00df3341b59.tar.gz
Initial commit
-rw-r--r--.SRCINFO27
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD75
-rw-r--r--daed.install6
4 files changed, 112 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..6f9e1c1d70f5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = daed-edge-git
+ pkgdesc = A modern dashboard for dae, bundled with latest dae-wing (backend API server) and dae (core).
+ pkgver = 0.6.0rc1.r6.g48c4815
+ pkgrel = 1
+ url = https://github.com/daeuniverse/daed
+ install = daed.install
+ arch = x86_64
+ arch = aarch64
+ license = AGPL-3.0-or-later AND MIT
+ makedepends = git
+ makedepends = pnpm
+ makedepends = clang
+ makedepends = go
+ provides = daed
+ conflicts = daed
+ conflicts = daed-git
+ options = !debug
+ source = git+https://github.com/daeuniverse/daed.git
+ source = git+https://github.com/daeuniverse/dae-wing.git
+ source = git+https://github.com/daeuniverse/dae.git
+ sha256sums = SKIP
+ sha256sums = SKIP
+ sha256sums = SKIP
+
+pkgname = daed-edge-git
+ depends = v2ray-geoip
+ depends = v2ray-domain-list-community
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..56cc8eb902b3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/pkg/
+/src/
+/daed/
+/*.zst
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c21ebe1fb6bd
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,75 @@
+# Maintainer: Eikano <lcuoin@gmail.com>
+
+_pkgname="daed"
+pkgname="${_pkgname}-edge-git"
+pkgver=0.6.0rc1.r6.g48c4815
+pkgrel=1
+pkgdesc="A modern dashboard for dae, bundled with latest dae-wing (backend API server) and dae (core)."
+arch=('x86_64' 'aarch64')
+url="https://github.com/daeuniverse/daed"
+license=('AGPL-3.0-or-later AND MIT')
+makedepends=('git' 'pnpm' 'clang' 'go')
+provides=('daed')
+conflicts=('daed' 'daed-git')
+source=("git+https://github.com/daeuniverse/${_pkgname}.git"
+ "git+https://github.com/daeuniverse/dae-wing.git"
+ "git+https://github.com/daeuniverse/dae.git")
+sha256sums=('SKIP'
+ 'SKIP'
+ 'SKIP')
+install="${_pkgname}.install"
+options=(!debug)
+
+pkgver() {
+ cd "$srcdir/$_pkgname"
+ (
+ set -o pipefail
+ cd wing/dae-core
+ git describe --tags --long --abbrev=7 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
+ )
+}
+
+prepare() {
+ cd "$srcdir/$_pkgname"
+ git remote update
+ git submodule update --init --recursive
+ cd wing
+ git reset --hard origin/main
+ cd dae-core
+ git reset --hard origin/main
+ git submodule update --init --recursive
+ cd .. && go mod tidy
+}
+
+build() {
+ export GOFLAGS="-buildmode=pie -trimpath -modcacherw"
+ export CFLAGS="-fno-stack-protector"
+ cd "$srcdir/$_pkgname"
+ daed_commit=$(git rev-parse --short HEAD) && cd wing
+ wing_commit=$(git rev-parse --short HEAD) && cd dae-core
+ dae_core_commit=$(git rev-parse --short HEAD)
+ package_version="$daed_commit.$wing_commit.$dae_core_commit"
+ cd "$srcdir/$_pkgname"
+ make VERSION="unstable-$package_version"
+}
+
+package() {
+ depends=(
+ v2ray-geoip
+ v2ray-domain-list-community
+ )
+
+ cd "$srcdir/$_pkgname"
+
+ install -vDm755 "${_pkgname}" -t "${pkgdir}/usr/bin/"
+ install -vDm644 "install/${_pkgname}.service" -t "${pkgdir}/usr/lib/systemd/system/"
+ install -vDm644 "LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -d "${pkgdir}/etc/daed/"
+
+ mkdir -p "${pkgdir}/usr/share/daed"
+ ln -vs "/usr/share/v2ray/geoip.dat" "${pkgdir}/usr/share/daed/geoip.dat"
+ ln -vs "/usr/share/v2ray/geosite.dat" "${pkgdir}/usr/share/daed/geosite.dat"
+
+ echo "After installation completed, open your browser and navigate to http://localhost:2023"
+}
diff --git a/daed.install b/daed.install
new file mode 100644
index 000000000000..5bc69504ca4e
--- /dev/null
+++ b/daed.install
@@ -0,0 +1,6 @@
+post_install() {
+ echo "---------------------------------------------------------------------------"
+ echo "After installation, run \"sudo systemctl enable --now daed\" to start daed."
+ echo "Then open your browser and navigate to http://localhost:2023"
+ echo "---------------------------------------------------------------------------"
+}