| 1 | # Fortress Packaging Makefile |
| 2 | # Quick commands for building and deploying packages |
| 3 | |
| 4 | .PHONY: help build-rpm deploy-rpm install-deps clean |
| 5 | |
| 6 | help: |
| 7 | @echo "Fortress Packaging Commands" |
| 8 | @echo "============================" |
| 9 | @echo "" |
| 10 | @echo " make build-rpm - Build RPM package" |
| 11 | @echo " make deploy-rpm - Deploy RPM to repos.musicsian.com" |
| 12 | @echo " make install-deps - Install required dependencies" |
| 13 | @echo " make clean - Clean build artifacts" |
| 14 | @echo "" |
| 15 | @echo "See DEPLOYMENT.md for full documentation" |
| 16 | |
| 17 | build-rpm: |
| 18 | @echo "Building RPM package..." |
| 19 | ./build-rpm.sh |
| 20 | |
| 21 | deploy-rpm: build-rpm |
| 22 | @echo "Deploying to repos.musicsian.com..." |
| 23 | ./deploy-to-repo.sh |
| 24 | @echo "" |
| 25 | @echo "Next: cd ~/src/repos-musicsian-com && ./deploy.sh" |
| 26 | |
| 27 | install-deps: |
| 28 | @echo "Installing dependencies..." |
| 29 | @command -v cargo >/dev/null 2>&1 || (echo "Error: cargo not found. Install Rust first." && exit 1) |
| 30 | @command -v fpm >/dev/null 2>&1 || cargo install fpm |
| 31 | @command -v rpmbuild >/dev/null 2>&1 || (echo "Warning: rpmbuild not found. Install with: sudo dnf install rpm-build" && exit 1) |
| 32 | @command -v createrepo_c >/dev/null 2>&1 || (echo "Warning: createrepo_c not found. Install with: sudo dnf install createrepo_c" && exit 1) |
| 33 | @echo "✓ All dependencies installed" |
| 34 | |
| 35 | clean: |
| 36 | @echo "Cleaning build artifacts..." |
| 37 | rm -rf ~/rpmbuild/BUILD/fortress-* |
| 38 | rm -rf ~/rpmbuild/BUILDROOT/fortress-* |
| 39 | @echo "✓ Cleaned" |
| 40 | |
| 41 | # AUR targets |
| 42 | .PHONY: aur-update aur-test |
| 43 | |
| 44 | aur-update: |
| 45 | @echo "Note: Update PKGBUILD version manually first" |
| 46 | @echo "Then run: updpkgsums && makepkg --printsrcinfo > .SRCINFO" |
| 47 | |
| 48 | aur-test: |
| 49 | @echo "Testing AUR package build..." |
| 50 | cd /path/to/fortress-aur && makepkg -si |
| 51 | |
| 52 | # Homebrew targets |
| 53 | .PHONY: brew-test brew-sha256 |
| 54 | |
| 55 | brew-test: |
| 56 | @echo "Testing Homebrew formula..." |
| 57 | brew install --build-from-source ./fortress.rb |
| 58 | brew test fortress |
| 59 | |
| 60 | brew-sha256: |
| 61 | @echo "Calculate SHA256 for Homebrew formula:" |
| 62 | @[ -f fortress-$(VERSION).tar.gz ] && shasum -a 256 fortress-$(VERSION).tar.gz || echo "Error: Create tarball first" |