Skip to content

Commit c3b77ca

Browse files
committed
feat: Add notify_push app build targetsNVM and binary download
Add architecture configuration and build targets for downloading and installing the notify_push app. Includes binary download from GitHub releases with SHA256 verification and PHP dependency installation via Composer. Inspired by ncw-config implementation Signed-off-by: Kai Henseler <kai.henseler@strato.de>
1 parent 4dfbfa9 commit c3b77ca

1 file changed

Lines changed: 34 additions & 2 deletions

File tree

Makefile

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,17 @@
33

44
TARGET_PACKAGE_NAME=hidrivenext-server.zip
55

6-
.PHONY: help .build_deps add_config_partials build_release build_locally build_dep_ionos_theme build_dep_nc_ionos_processes_app build_dep_simplesettings_app build_richdocuments_app build_dep_user_oidc_app zip_dependencies patch_shipped_json version.json
6+
# Architecture configuration
7+
ARCHITECTURE = x86_64
8+
9+
# Variables for notify_push binary
10+
NOTIFY_PUSH_DIR = apps-external/notify_push
11+
NOTIFY_PUSH_BIN_DIR = $(NOTIFY_PUSH_DIR)/bin/$(ARCHITECTURE)
12+
NOTIFY_PUSH_BINARY = $(NOTIFY_PUSH_BIN_DIR)/notify_push
13+
NOTIFY_PUSH_VERSION = $(shell cd $(NOTIFY_PUSH_DIR) && grep -oP '(?<=<version>)[^<]+' appinfo/info.xml)
14+
NOTIFY_PUSH_URL = https://github.com/nextcloud/notify_push/releases/download/v$(NOTIFY_PUSH_VERSION)/notify_push-$(ARCHITECTURE)-unknown-linux-musl
15+
16+
.PHONY: help .build_deps add_config_partials build_release build_locally build_dep_ionos_theme build_dep_nc_ionos_processes_app build_dep_simplesettings_app build_richdocuments_app build_dep_user_oidc_app build_notify_push_app build_notify_push_binary zip_dependencies patch_shipped_json version.json
717

818
help: ## This help.
919
@echo "Usage: make [target]"
@@ -162,7 +172,29 @@ zip_dependencies: patch_shipped_json version.json ## Zip relevant files
162172
-x "themes/nc-ionos-theme/README.md" \
163173
-x "themes/nc-ionos-theme/IONOS**"
164174

165-
.build_deps: build_dep_viewer_app build_richdocuments_app build_dep_simplesettings_app build_dep_nc_ionos_processes_app build_dep_user_oidc_app build_dep_ionos_theme build_dep_theming_app
175+
# notify_push binary target: downloads the pre-built binary from GitHub releases
176+
$(NOTIFY_PUSH_BINARY): $(NOTIFY_PUSH_DIR)/appinfo/info.xml
177+
@echo "[i] Building notify_push binary target for version $(NOTIFY_PUSH_VERSION)..."
178+
@mkdir -p $(NOTIFY_PUSH_BIN_DIR)
179+
@echo "[i] Downloading notify_push binary version $(NOTIFY_PUSH_VERSION)..."
180+
curl -L -o $@ $(NOTIFY_PUSH_URL)
181+
@echo "[i] Verifying binary integrity..."
182+
@sha256sum $@ > $@.sha256
183+
@echo "[i] Binary SHA256: $$(sha256sum $@ | cut -d' ' -f1)"
184+
chmod +x $@
185+
@echo "[i] notify_push binary v$(NOTIFY_PUSH_VERSION) downloaded and verified successfully"
186+
187+
$(NOTIFY_PUSH_DIR)/vendor/autoload.php: $(NOTIFY_PUSH_DIR)/composer.json
188+
@echo "[i] Installing notify_push PHP dependencies..."
189+
cd $(NOTIFY_PUSH_DIR) && composer install --no-dev -o
190+
191+
build_notify_push_app: $(NOTIFY_PUSH_DIR)/vendor/autoload.php $(NOTIFY_PUSH_BINARY) ## Install and build notify_push app
192+
@echo "[✓] notify_push app built successfully"
193+
194+
build_notify_push_binary: $(NOTIFY_PUSH_BINARY) ## Download notify_push binary
195+
@echo "[i] notify_push binary ready"
196+
197+
.build_deps: build_dep_viewer_app build_richdocuments_app build_dep_simplesettings_app build_dep_nc_ionos_processes_app build_dep_user_oidc_app build_dep_ionos_theme build_dep_theming_app build_notify_push_app
166198

167199
build_release: build_nextcloud .build_deps add_config_partials zip_dependencies ## Build a release package (build apps/themes, copy configs and package)
168200
echo "Everything done for a release"

0 commit comments

Comments
 (0)