richdocuments/Makefile
Andy Scherzinger 868859f393
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-09 10:37:22 +02:00

43 lines
1.3 KiB
Makefile

# SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
# SPDX-FileCopyrightText: 2015-2016 ownCloud, Inc.
# SPDX-License-Identifier: AGPL-3.0-or-later
app_name=richdocuments
project_dir=$(CURDIR)/../$(app_name)
build_dir=$(CURDIR)/build/artifacts
sign_dir=$(build_dir)/sign
appstore_dir=$(build_dir)/appstore
source_dir=$(build_dir)/source
package_name=$(app_name)
cert_dir=$(HOME)/.nextcloud/certificates
occ=$(CURDIR)/../../occ
clean:
rm -fr $(build_dir)
appstore: clean
mkdir -p $(sign_dir)
rsync -a \
--exclude=.git \
--exclude=.github \
--exclude=build \
--exclude=.gitignore \
--exclude=.travis.yml \
--exclude=.scrutinizer.yml \
--exclude=CONTRIBUTING.md \
--exclude=composer.json \
--exclude=composer.lock \
--exclude=composer.phar \
--exclude=.tx \
--exclude=l10n/no-php \
--exclude=Makefile \
--exclude=nbproject \
--exclude=screenshots \
--exclude=phpunit*xml \
--exclude=tests \
--exclude=vendor/bin \
$(project_dir) $(sign_dir)
@echo "Signing…"
$(occ) integrity:sign-app --privateKey=$(cert_dir)/$(app_name).key --certificate=$(cert_dir)/$(app_name).crt --path=$(sign_dir)/$(app_name)
tar -czf $(build_dir)/$(app_name).tar.gz \
-C $(sign_dir) $(app_name)
openssl dgst -sha512 -sign $(cert_dir)/$(app_name).key $(build_dir)/$(app_name).tar.gz | openssl base64