10 Commits

15 changed files with 98 additions and 211 deletions

33
.gitignore vendored Normal file
View File

@@ -0,0 +1,33 @@
/# --- OS cruft ---
.DS_Store
Thumbs.db
# --- Go build outputs ---
/relibre-app
*.exe
*.exe~
*.out
# --- Local run bundle ---
/dist-run/
# --- makepkg artifacts ---
/pkg/
/src/
/*.pkg.tar.*
/*.src.tar.*
# --- Flatpak / flatpak-builder ---
/.flatpak-builder/
/build-dir/
# --- Release artifacts ---
/binaries/*.tar.gz
/binaries/*.tar.xz
/binaries/*.sha256
/binaries/*.asc
# --- Node / misc (future-proof if you add tooling) ---
/node_modules/
npm-debug.log*
yarn-error.log*

View File

@@ -1,4 +0,0 @@
FROM nginx:alpine
COPY proxy/nginx-site.conf /etc/nginx/conf.d/default.conf
COPY . /usr/share/nginx/html
HEALTHCHECK --interval=30s --timeout=3s --retries=3 CMD wget -qO- http://localhost/ > /dev/null || exit 1

View File

@@ -4,7 +4,7 @@ APP=relibre-app
.PHONY: deps run build clean .PHONY: deps run build clean
deps: deps:
# Add dependency and generate go.sum # Add dependency and generate go.sum
go get github.com/webview/webview_go@v0.1.1 go get github.com/webview/webview_go@latest
go mod tidy go mod tidy
run: run:

47
PKGBUILD Normal file
View File

@@ -0,0 +1,47 @@
# Maintainer: James Osborne <incentive@circlewithadot.net>
pkgname=relibre
pkgver=0.2.0
pkgrel=1
pkgdesc="Native webview app to generate single-file landing pages for music releases"
arch=('x86_64')
url="https://git.circlewithadot.net/incentive/relibre"
license=('AGPL3')
depends=('gtk3' 'webkit2gtk' 'libsoup3' 'hicolor-icon-theme')
makedepends=('go' 'git')
provides=('relibre')
conflicts=('relibre-bin')
source=("${pkgname}::git+${url}.git#tag=v${pkgver}")
sha256sums=('SKIP')
prepare() {
cd "${srcdir}/${pkgname}"
export GOPATH="${srcdir}/gopath"
export GOMODCACHE="${GOPATH}/pkg/mod"
go mod download
}
build() {
cd "${srcdir}/${pkgname}"
export CGO_ENABLED=1
go build -trimpath -ldflags "-s -w" -o relibre
}
package() {
cd "${srcdir}/${pkgname}"
install -Dm755 relibre "${pkgdir}/usr/bin/relibre"
if [[ -f dist/com.circlewithadot.Relibre.desktop.arch ]]; then
install -Dm644 dist/com.circlewithadot.Relibre.desktop.arch \
"${pkgdir}/usr/share/applications/com.circlewithadot.Relibre.desktop"
elif [[ -f dist/com.circlewithadot.Relibre.desktop ]]; then
install -Dm644 dist/com.circlewithadot.Relibre.desktop \
"${pkgdir}/usr/share/applications/com.circlewithadot.Relibre.desktop"
fi
# Icon: reuse the Flatpak icon (must be a square 512×512 PNG)
if [[ -f dist/com.circlewithadot.Relibre.png ]]; then
install -Dm644 dist/com.circlewithadot.Relibre.png \
"${pkgdir}/usr/share/icons/hicolor/512x512/apps/com.circlewithadot.Relibre.png"
fi
}

View File

@@ -3,7 +3,7 @@
Relibre is a simple, free, and open-source landing-page generator—an alternative to HyperFollow—that produces a **single self-contained HTML file** you can host anywhere. Relibre is a simple, free, and open-source landing-page generator—an alternative to HyperFollow—that produces a **single self-contained HTML file** you can host anywhere.
**Try the generator →** [`https://`](https://relibre.site) **Try the generator →** [`https://relibre.site`](https://circlewithadot.net/relibre)
--- ---
@@ -11,67 +11,21 @@ Relibre is a simple, free, and open-source landing-page generator—an alternati
- A clean, responsive, single-file HTML page for a release - A clean, responsive, single-file HTML page for a release
- No trackers, no analytics - No trackers, no analytics
- Host it anywhere (Neocities, object storage, GitHub/Gitea Pages, your own server, IPFS, etc.) - Host it anywhere (Neocities, object storage, GitHub/Gitea Pages, your own server, IPFS, etc.)
- Optional native desktop app (only Arch Linux and Flatpak supported for now) - Optional native desktop app (AUR or source build, Flatpak soon)
--- ---
## Quick start (static site) ## Source build
Open locally:
```bash
# simple Python server
python3 -m http.server 8080
# → http://localhost:8080
``` ```
---
## Launch / self-host with Docker or Podman
Relibre ships multiple compose variants so you can choose your reverse proxy. All of them:
- build an internal `web` container that serves the static files
- expose a `proxy` on **localhost:8080** (HAProxy, Caddy, Apache httpd, or Nginx)
**Files:**
- `docker-compose.yml.haproxy`
- `docker-compose.yml.caddy`
- `docker-compose.yml.apache`
- `docker-compose.yml.nginx`
- `proxy/`
- `Dockerfile`
```bash
---
## Native desktop build (Go webview app)
Builds a single executable that opens Relibre inside the OS webview. The app runs a tiny localhost server and can save the generated HTML directly to your **Downloads** folder.
### Prereqs
**Arch:**
sudo pacman -S --needed base-devel go webkit2gtk gtk3 pkgconf
### Build
make deps make deps
make build make build
./relibre-app
``` ```
--- ---
## Arch Linux (AUR) packaging ## Arch Linux (AUR)
- **`relibre`** builds from source ```
makepkg -si
--- ```
## Flatpak / Flathub
Relibre works well as a Flatpak using the GNOME runtime (WebKitGTK included).
Build & run locally:
```bash
flatpak install -y org.gnome.Platform//46 org.gnome.Sdk//46
flatpak-builder --user --install --force-clean build-dir com.circlewithadot.Relibre.yml
flatpak run com.circlewithadot.Relibre

Binary file not shown.

View File

@@ -1,37 +0,0 @@
# Flatpak manifest for the native webview build of Relibre
# Build with:
# flatpak-builder --user --install --force-clean build-dir com.circlewithadot.Relibre.yml
# flatpak run com.circlewithadot.Relibre
app-id: com.circlewithadot.Relibre
runtime: org.gnome.Platform
runtime-version: '46'
sdk: org.gnome.Sdk
command: relibre
finish-args:
# WebKitGTK needs network; your app also runs a localhost HTTP server
- --share=network
# UI backends
- --socket=wayland
- --socket=fallback-x11
# Allow saving to Downloads (your /save endpoint writes there)
- --filesystem=xdg-download
# Optional: allow opening files via portal
- --talk-name=org.freedesktop.portal.Desktop
modules:
# Build your Go app inside the sandbox
- name: relibre
buildsystem: simple
build-commands:
# Ensure modules cached and vendor if you like (optional)
- go env -w CGO_ENABLED=1
- go mod download
# Build the binary into /app/bin
- go build -trimpath -ldflags "-s -w" -o /app/bin/relibre
# Install desktop file and icon
- install -Dm644 dist/com.circlewithadot.Relibre.desktop /app/share/applications/com.circlewithadot.Relibre.desktop
- install -Dm644 dist/com.circlewithadot.Relibre.png /app/share/icons/hicolor/512x512/apps/com.circlewithadot.Relibre.png
sources:
# Use the current directory as source (assuming manifest sits at repo root)
- type: dir
path: .

46
dist/PKGBUILD vendored
View File

@@ -1,46 +0,0 @@
# Maintainer: James "Bruce" Osborne <you@example.com>
pkgname=relibre
pkgver=0.1.0
pkgrel=1
pkgdesc="Native webview app to generate single-file landing pages for music releases"
arch=('x86_64')
url="https://git.circlewithadot.net/incentive/relibre"
license=('MIT')
depends=('gtk3' 'webkit2gtk' 'libsoup3')
makedepends=('go' 'git')
provides=('relibre')
conflicts=('relibre-bin')
# Build from a specific tag; update tag and checksum for new releases
source=("${pkgname}::git+${url}.git#tag=v${pkgver}")
sha256sums=('SKIP')
# If you need a submodule, add: options=('!strip') and git submodule init/update lines in build()
prepare() {
cd "${srcdir}/${pkgname}"
# Ensure Go modules are present
export GOPATH="${srcdir}/gopath"
export GOMODCACHE="${GOPATH}/pkg/mod"
go mod download
}
build() {
cd "${srcdir}/${pkgname}"
export CGO_ENABLED=1
go build -trimpath -ldflags "-s -w" -o relibre
}
package() {
cd "${srcdir}/${pkgname}"
install -Dm755 relibre "${pkgdir}/usr/bin/relibre"
# Desktop entry and icon (optional but nice)
install -Dm644 dist/com.circlewithadot.Relibre.desktop \
"${pkgdir}/usr/share/applications/com.circlewithadot.Relibre.desktop"
install -Dm644 dist/com.circlewithadot.Relibre.png \
"${pkgdir}/usr/share/icons/hicolor/512x512/apps/com.circlewithadot.Relibre.png"
# License
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

View File

@@ -3,7 +3,7 @@ Type=Application
Name=Relibre Name=Relibre
Comment=Generate single-file landing pages for music releases Comment=Generate single-file landing pages for music releases
Exec=relibre Exec=relibre
Icon=com.circlewithadot.Relibre Icon=relibre
Categories=AudioVideo;Utility; Categories=AudioVideo;Utility;
Terminal=false Terminal=false

View File

@@ -0,0 +1,8 @@
[Desktop Entry]
Type=Application
Name=Relibre
Comment=Generate single-file landing pages for music releases
Exec=relibre
Icon=relibre
Categories=AudioVideo;Utility;
Terminal=false

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

@@ -1,17 +0,0 @@
services:
web:
build:
context: .
dockerfile: Dockerfile.web
expose: ["80"]
restart: unless-stopped
proxy:
image: httpd:2.4-alpine
volumes:
- ./proxy/httpd.conf:/usr/local/apache2/conf/httpd.conf:ro
ports:
- "8080:80"
depends_on:
- web
restart: unless-stopped

View File

@@ -1,17 +0,0 @@
services:
web:
build:
context: .
dockerfile: Dockerfile.web
expose: ["80"]
restart: unless-stopped
proxy:
image: caddy:alpine
volumes:
- ./proxy/Caddyfile:/etc/caddy/Caddyfile:ro
ports:
- "8080:80"
depends_on:
- web
restart: unless-stopped

View File

@@ -1,17 +0,0 @@
services:
web:
build:
context: .
dockerfile: Dockerfile.web
expose: ["80"]
restart: unless-stopped
proxy:
image: haproxy:2.9
volumes:
- ./proxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
ports:
- "8080:80"
depends_on:
- web
restart: unless-stopped

View File

@@ -1,17 +0,0 @@
services:
web:
build:
context: .
dockerfile: Dockerfile.web
expose: ["80"]
restart: unless-stopped
proxy:
image: nginx:alpine
volumes:
- ./proxy/nginx-proxy.conf:/etc/nginx/conf.d/default.conf:ro
ports:
- "8080:80"
depends_on:
- web
restart: unless-stopped