yunohost-admin/debian/rules
2024-03-27 00:29:32 +01:00

31 lines
1.1 KiB
Makefile
Executable file
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# Get package version
# dpkg-parsechangelog > 1.17 could use dpkg-parsechangelog --show-field Version
DEBVERS := $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p')
# Define temporary debian directory
TMPDIR = $$(pwd)/debian/yunohost-admin
%:
dh $@
override_dh_auto_build:
/usr/bin/curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | gpg --dearmor | tee /usr/share/keyrings/nodesource.gpg >/dev/null
/usr/bin/curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /etc/apt/trusted.gpg.d/yarn.gpg >/dev/null
echo 'deb [signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_14.x bookworm main' > /etc/apt/sources.list.d/nodesource.list
echo "deb [signed-by=/etc/apt/trusted.gpg.d/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
/usr/bin/apt update
/usr/bin/apt install nodejs yarn -y
cd app ; /usr/bin/yarn install --frozen-lockfile --non-interactive
cd app ; /usr/bin/yarn build
override_dh_clean:
dh_clean
rm -rf app/node_modules
rm -rf app/dist