1
0
mirror of https://github.com/SuperBFG7/ympd synced 2024-11-16 10:44:48 +00:00

Fix: create directories with cmake

This commit is contained in:
jcorporation 2018-08-28 00:11:43 +01:00
parent be947fe709
commit e99bd1f66e
2 changed files with 6 additions and 14 deletions

View File

@ -42,6 +42,9 @@ target_link_libraries(mympd ${LIBMPDCLIENT_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${
install(TARGETS mympd DESTINATION bin) install(TARGETS mympd DESTINATION bin)
install(FILES contrib/mympd.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1) install(FILES contrib/mympd.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1)
install(FILES contrib/crcert.sh DESTINATION ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/)
install(FILES contrib/mympd.service DESTINATION ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/)
install(FILES contrib/mympd.conf DESTINATION /etc/${PROJECT_NAME}/)
install(FILES htdocs/mympd.webmanifest DESTINATION share/${PROJECT_NAME}/htdocs/) install(FILES htdocs/mympd.webmanifest DESTINATION share/${PROJECT_NAME}/htdocs/)
install(FILES dist/htdocs/index.html DESTINATION share/${PROJECT_NAME}/htdocs/) install(FILES dist/htdocs/index.html DESTINATION share/${PROJECT_NAME}/htdocs/)
install(FILES dist/htdocs/player.html DESTINATION share/${PROJECT_NAME}/htdocs/) install(FILES dist/htdocs/player.html DESTINATION share/${PROJECT_NAME}/htdocs/)
@ -52,4 +55,5 @@ install(FILES dist/htdocs/js/mympd.min.js DESTINATION share/${PROJECT_NAME}/htdo
install(FILES dist/htdocs/css/bootstrap.min.css DESTINATION share/${PROJECT_NAME}/htdocs/css/) install(FILES dist/htdocs/css/bootstrap.min.css DESTINATION share/${PROJECT_NAME}/htdocs/css/)
install(FILES dist/htdocs/css/mympd.min.css DESTINATION share/${PROJECT_NAME}/htdocs/css/) install(FILES dist/htdocs/css/mympd.min.css DESTINATION share/${PROJECT_NAME}/htdocs/css/)
install(DIRECTORY htdocs/assets DESTINATION share/${PROJECT_NAME}/htdocs) install(DIRECTORY htdocs/assets DESTINATION share/${PROJECT_NAME}/htdocs)
install(DIRECTORY DESTINATION share/${PROJECT_NAME}/htdocs/pics)
install(DIRECTORY DESTINATION /var/lib/${PROJECT_NAME}/) install(DIRECTORY DESTINATION /var/lib/${PROJECT_NAME}/)

View File

@ -61,9 +61,6 @@ else
echo "/etc/mpd.conf not found, you must link your music_directory manually to /usr/share/mympd/htdocs/library" echo "/etc/mpd.conf not found, you must link your music_directory manually to /usr/share/mympd/htdocs/library"
fi fi
echo "Creating dir for cover pictures"
[ -d /usr/share/mympd/htdocs/pics ] || mkdir /usr/share/mympd/htdocs/pics
echo "Installing systemd service" echo "Installing systemd service"
if [ -d /etc/systemd/system ] if [ -d /etc/systemd/system ]
then then
@ -75,21 +72,12 @@ then
sudo systemctl enable mympd sudo systemctl enable mympd
fi fi
if [ -f /etc/mympd/mympd.conf ]
then
echo "/etc/mympd/mympd.conf already exists"
cp contrib/mympd.conf /etc/mympd/mympd.conf.dist
else
[ -d /etc/mympd ] || mkdir /etc/mympd
cp contrib/mympd.conf /etc/mympd/mympd.conf
fi
if [ -d /etc/mympd/ssl ] if [ -d /etc/mympd/ssl ]
then then
echo "Certificates already created" echo "Certificates already created"
else else
echo "Creating certificates" echo "Creating certificates"
contrib/crcert.sh sudo contrib/crcert.sh
fi fi
echo "myMPD installed" echo "myMPD installed"