-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (47 loc) · 1.55 KB
/
Copy pathMakefile
File metadata and controls
55 lines (47 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Makefile for sshf - SSH Host Manager TUI
# English and Spanish comments
# Default target: build release binary
all: release
# Build release binary
release:
cargo build --release
# Run the TUI (debug)
run:
cargo run
# Clean build artifacts
clean:
cargo clean
# Create a release tarball (with binary, README, LICENSE)
tarball: release
@mkdir -p dist
cp target/release/sshf dist/
cp README.md LICENSE dist/
tar -czvf sshf-$(shell date +%Y%m%d).tar.gz -C dist sshf README.md LICENSE
@echo "Release tarball created: sshf-$(shell date +%Y%m%d).tar.gz"
# Build all native packages and universal tarball
dist: clean release
@mkdir -p dist
# Arch Linux (PKGBUILD)
makepkg -f --noextract --skipinteg --noconfirm || true
find . -maxdepth 1 -name 'sshf-*.pkg.tar.*' -exec mv {} dist/ \;
# Debian/Ubuntu (.deb)
if [ -d debian ]; then \
dpkg-buildpackage -us -uc -b || true; \
find .. -maxdepth 1 -name 'sshf_*.deb' -exec mv {} dist/ \;; \
fi
# Fedora (.rpm)
rpmbuild -bb sshf.spec || true
find ~/rpmbuild/RPMS/ -name 'sshf*.rpm' -exec mv {} dist/ \; 2>/dev/null || true
# Universal tarball
cp target/release/sshf dist/
cp README.md LICENSE dist/
tar -czvf dist/sshf-universal-$(shell date +%Y%m%d).tar.gz -C dist sshf README.md LICENSE
@echo "All packages are in dist/"
# Create a GitHub release (manual step)
# 1. Run 'make tarball'
# 2. Upload the generated tar.gz to GitHub releases
# Español:
# release: Compila binario optimizado
# run: Ejecuta la TUI en modo debug
# clean: Limpia artefactos de compilación
# tarball: Empaqueta binario y docs para release