Cosmetic changes to Makefile

This commit is contained in:
Étienne Mollier 2019-08-14 20:50:35 +02:00
parent d9d094aa1c
commit be8439bf40

View file

@ -1,60 +1,78 @@
# YUNoHost locations # YUNoHost locations
YNH_BUILD_DIR = /ynh-build/ YNH_BUILD_DIR = /ynh-build
YNH_SOURCE = https://github.com/yunohost YNH_SOURCE = https://github.com/yunohost
BUILD_DEPS = git git-buildpackage postfix python-setuptools BUILD_DEPS = git git-buildpackage postfix python-setuptools
APT_OPTS = -o Dpkg::Options::="--force-confold" -y #--force-yes APT_OPTS = -o Dpkg::Options::="--force-confold" -y
.PHONY: init metronome ssowat moulinette yunohost install uninstall mrproper .PHONY: init metronome ssowat moulinette yunohost install uninstall mrproper \
postinstall appinstall
init: init:
apt $(APT_OPTS) install $(BUILD_DEPS) @ apt $(APT_OPTS) install $(BUILD_DEPS)
mkdir -p "$(YNH_BUILD_DIR)" @ mkdir -vp "$(YNH_BUILD_DIR)"
cd "$(YNH_BUILD_DIR)"; \ @ cd "$(YNH_BUILD_DIR)" \
git clone "$(YNH_SOURCE)"/moulinette; \ && git clone "$(YNH_SOURCE)/moulinette" \
git clone "$(YNH_SOURCE)"/ssowat; \ && git clone "$(YNH_SOURCE)/ssowat" \
git clone "$(YNH_SOURCE)"/metronome; \ && git clone "$(YNH_SOURCE)/metronome" \
git clone "$(YNH_SOURCE)"/yunohost; && git clone "$(YNH_SOURCE)/yunohost"
apt $(APT_OPTS) build-dep \ @ cd "$(YNH_BUILD_DIR)/moulinette" \
"$(YNH_BUILD_DIR)"/moulinette \ && git checkout buster-unstable
"$(YNH_BUILD_DIR)"/ssowat \ @ cd "$(YNH_BUILD_DIR)/yunohost" \
"$(YNH_BUILD_DIR)"/metronome \ && git checkout buster-unstable
"$(YNH_BUILD_DIR)"/yunohost @ apt $(APT_OPTS) build-dep \
"$(YNH_BUILD_DIR)/moulinette" \
"$(YNH_BUILD_DIR)/ssowat" \
"$(YNH_BUILD_DIR)/metronome" \
"$(YNH_BUILD_DIR)/yunohost"
metronome: metronome:
cd "$(YNH_BUILD_DIR)"; \ @ cd "$(YNH_BUILD_DIR)" \
rm -f metronome_*; \ && rm -vf metronome_* \
cd metronome; \ && cd metronome \
dpkg-buildpackage -rfakeroot -uc -b -d && dpkg-buildpackage -rfakeroot -uc -b -d
ssowat: ssowat:
cd "$(YNH_BUILD_DIR)"; \ @ cd "$(YNH_BUILD_DIR)" \
rm -f ssowat_*; \ && rm -vf ssowat_* \
cd ssowat; \ && cd ssowat \
debuild -us -uc && debuild -us -uc
moulinette: moulinette:
cd "$(YNH_BUILD_DIR)"; \ @ cd "$(YNH_BUILD_DIR)" \
rm -f moulinette_*; \ && rm -vf moulinette_* \
cd moulinette; \ && cd moulinette \
debuild -us -uc && debuild -us -uc
yunohost: yunohost:
cd "$(YNH_BUILD_DIR)"; \ @ cd "$(YNH_BUILD_DIR)" \
rm -f yunohost_*; \ && rm -vf yunohost_* \
cd yunohost; \ && cd yunohost \
debuild -us -uc && debuild -us -uc
install: install:
cd "$(YNH_BUILD_DIR)"; \ @ cd "$(YNH_BUILD_DIR)" \
debconf-set-selections < debconf; \ && debconf-set-selections < debconf \
SUDO_FORCE_REMOVE=yes apt install $(APT_OPTS) /ynh-build/*.deb; && apt install $(APT_OPTS) \
./metronome_*.deb \
./moulinette_*.deb \
./ssowat_*.deb \
&& SUDO_FORCE_REMOVE=yes apt install $(APT_OPTS) ./yunohost_*.deb;
mrproper: postinstall:
@ yunohost tools postinstall -d e.org -p Yunohost
appinstall:
@ yunohost app install https://github.com/YunoHost-Apps/helloworld_ynh
appuninstall:
@ yunohost app remove helloworld
mrproper: uninstall
@ rm "$(YNH_BUILD_DIR)" -rfv @ rm "$(YNH_BUILD_DIR)" -rfv
uninstall: uninstall:
apt remove slapd yunohost moulinette --purge -y @ apt -y --allow-remove-essential purge \
rm -rf /usr/share/yunohost/ yunohost moulinette slapd nginx-common
rm -rf /usr/lib/moulinette/ @ rm -rvf /usr/share/yunohost/
rm -rf /etc/yunohost/ @ rm -rvf /usr/lib/moulinette/
@ rm -rvf /etc/yunohost/