fix: Makefile install target

This commit is contained in:
Markus Pesch 2021-04-10 16:52:29 +02:00
parent 12f05ec68e
commit 4f2c03b0d5
Signed by: volker.raschek
GPG Key ID: 852BCC170D81A982

View File

@ -59,16 +59,33 @@ bin/tmp/${EXECUTABLE}.fish: bin/tmp/${EXECUTABLE}
bin/tmp/${EXECUTABLE}.zsh: bin/tmp/${EXECUTABLE}
bin/tmp/${EXECUTABLE} completion zsh > ${@}
# INSTALL
# UN/INSTALL
# ==============================================================================
PHONY+=install
install: bin/tmp/${EXECUTABLE} bin/tmp/${EXECUTABLE}.sh bin/tmp/${EXECUTABLE}.fish bin/tmp/${EXECUTABLE}.zsh
install --directory ${DESTDIR}${PREFIX}/bin
install --mode 755 bin/tmp/${EXECUTABLE} ${DESTDIR}${PREFIX}/bin/${EXECUTABLE}
install --directory ${DESTDIR}/etc/bash_completion.d/
install --directory ${DESTDIR}/etc/bash_completion.d
install --mode 755 bin/tmp/${EXECUTABLE}.sh ${DESTDIR}/etc/bash_completion.d/${EXECUTABLE}.sh
install --directory ${DESTDIR}/usr/share/fish/vendor_functions.d/
install --mode 755 bin/tmp/${EXECUTABLE}.fish ${DESTDIR}/usr/share/fish/vendor_functions.d/${EXECUTABLE}.fish
install --directory ${DESTDIR}/usr/share/fish/vendor_completions.d
install --mode 644 bin/tmp/${EXECUTABLE}.fish ${DESTDIR}/usr/share/fish/vendor_completions.d/${EXECUTABLE}.fish
install --directory ${DESTDIR}/usr/lib/systemd/system
install --mode 644 systemd/${EXECUTABLE}.service ${DESTDIR}/usr/lib/systemd/system/${EXECUTABLE}.service
install --directory ${DESTDIR}/usr/share/licenses/${EXECUTABLE}
install --mode 644 LICENSE ${DESTDIR}/usr/share/licenses/${EXECUTABLE}/LICENSE
PHONY+=uninstall
uninstall:
-rm --recursive --force \
${DESTDIR}${PREFIX}/bin/${EXECUTABLE} \
${DESTDIR}/etc/bash_completion.d/${EXECUTABLE}.sh \
${DESTDIR}/usr/lib/systemd/system/${EXECUTABLE}.service \
${DESTDIR}/usr/share/fish/vendor_completions.d/${EXECUTABLE}.fish \
${DESTDIR}/usr/share/licenses/${EXECUTABLE}/LICENSE
# CLEAN
# ==============================================================================