nc-gpxedit/makefile

59 lines
1.8 KiB
Makefile
Raw Permalink Normal View History

2016-11-30 19:00:03 +00:00
app_name=gpxedit
app_version=$(version)
project_dir=$(CURDIR)/../$(app_name)
build_dir=/tmp/build
sign_dir=/tmp/sign
cert_dir=$(HOME)/.nextcloud/certificates
2017-03-18 05:09:10 +00:00
webserveruser ?= www-data
occ_dir ?= /var/www/html/n19
2016-11-30 19:00:03 +00:00
all: appstore
clean:
sudo rm -rf $(build_dir)
sudo rm -rf $(sign_dir)
2016-11-30 19:00:03 +00:00
appstore: clean
mkdir -p $(sign_dir)
mkdir -p $(build_dir)
rsync -a \
--exclude=.git \
2017-03-18 05:09:10 +00:00
--exclude=appinfo/signature.json \
2016-11-30 19:00:03 +00:00
--exclude=*.swp \
--exclude=build \
2017-05-16 15:36:22 +00:00
--exclude=README.md \
2016-11-30 19:00:03 +00:00
--exclude=.gitignore \
--exclude=.idea \
2016-11-30 19:00:03 +00:00
--exclude=.travis.yml \
--exclude=.scrutinizer.yml \
2017-11-28 10:40:39 +00:00
--exclude=CONTRIBUTING.md \
2016-11-30 19:00:03 +00:00
--exclude=composer.json \
--exclude=composer.lock \
--exclude=composer.phar \
2017-11-28 10:40:39 +00:00
--exclude=crowdin.yml \
--exclude=tools \
2016-11-30 19:00:03 +00:00
--exclude=l10n/.tx \
2017-11-28 10:40:39 +00:00
--exclude=l10n/l10n.pl \
--exclude=l10n/templates \
--exclude=l10n/*.sh \
--exclude=l10n/[a-z][a-z] \
--exclude=l10n/[a-z][a-z]_[A-Z][A-Z] \
2016-11-30 19:00:03 +00:00
--exclude=l10n/no-php \
--exclude=makefile \
--exclude=screenshots \
--exclude=phpunit*xml \
--exclude=tests \
2019-04-12 07:38:06 +00:00
--exclude=translationfiles \
2016-11-30 19:00:03 +00:00
--exclude=vendor/bin \
$(project_dir) $(sign_dir)
# generate info.xml with translations
cd $(sign_dir)/$(app_name)/l10n/descriptions && ./gen_info.xml.sh && mv info.xml ../../appinfo/
2017-03-18 05:09:10 +00:00
# give the webserver user the right to create signature file
2019-04-09 15:05:07 +00:00
sudo chown $(webserveruser) $(sign_dir)/$(app_name)/appinfo
2017-03-18 05:09:10 +00:00
sudo -u $(webserveruser) php $(occ_dir)/occ integrity:sign-app --privateKey=$(cert_dir)/$(app_name).key --certificate=$(cert_dir)/$(app_name).crt --path=$(sign_dir)/$(app_name)/
2019-04-09 15:05:07 +00:00
sudo chown -R $(USER) $(sign_dir)/$(app_name)/appinfo
2016-11-30 19:00:03 +00:00
tar -czf $(build_dir)/$(app_name)-$(app_version).tar.gz \
-C $(sign_dir) $(app_name)
2017-05-16 15:36:22 +00:00
echo NEXTCLOUD------------------------------------------
2016-11-30 19:00:03 +00:00
openssl dgst -sha512 -sign $(cert_dir)/$(app_name).key $(build_dir)/$(app_name)-$(app_version).tar.gz | openssl base64