mirror of
https://github.com/SuperBFG7/ympd
synced 2025-07-21 19:02:48 +00:00
Fix: improved package building
This commit is contained in:
parent
83ad164521
commit
d799fe1e87
@ -41,7 +41,7 @@ target_link_libraries(mympd ${LIBMPDCLIENT_LIBRARY} ${OPENSSL_LIBRARIES})
|
|||||||
|
|
||||||
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(PROGRAMS 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.service DESTINATION ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/)
|
||||||
install(FILES contrib/mympd.conf DESTINATION /etc/${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/)
|
||||||
|
@ -36,7 +36,10 @@ make
|
|||||||
%install
|
%install
|
||||||
cd release
|
cd release
|
||||||
make install DESTDIR=%{buildroot}
|
make install DESTDIR=%{buildroot}
|
||||||
chmod 755 %{buildroot}/usr/share/mympd/crcert.sh
|
|
||||||
|
%post
|
||||||
|
/usr/share/mympd/crcert.sh
|
||||||
|
chown nobody /var/lib/mympd
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
@ -48,5 +51,5 @@ chmod 755 %{buildroot}/usr/share/mympd/crcert.sh
|
|||||||
/var/lib/mympd
|
/var/lib/mympd
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Aug 28 2018 Juergen Mang <mail@jcgames.de> - master
|
* Tue Sep 04 2018 Juergen Mang <mail@jcgames.de> - master
|
||||||
- Version from master
|
- Version from master
|
||||||
|
@ -55,18 +55,19 @@ sudo chown nobody /var/lib/mympd
|
|||||||
echo "Trying to link musicdir to library"
|
echo "Trying to link musicdir to library"
|
||||||
if [ -f /etc/mpd.conf ]
|
if [ -f /etc/mpd.conf ]
|
||||||
then
|
then
|
||||||
LIBRARY=$(grep ^music_directory /etc/mpd.conf | awk {'print $2'} | sed -e 's/"//g')
|
LIBRARY=$(sudo grep ^music_directory /etc/mpd.conf | awk {'print $2'} | sed -e 's/"//g')
|
||||||
[ "$LIBRARY" != "" ] && [ ! -e /usr/share/mympd/htdocs/library ] && sudo ln -s "$LIBRARY" /usr/share/mympd/htdocs/library
|
[ "$LIBRARY" != "" ] && [ ! -e /usr/share/mympd/htdocs/library ] && sudo ln -s "$LIBRARY" /usr/share/mympd/htdocs/library
|
||||||
else
|
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 "Installing systemd service"
|
echo "Installing systemd service"
|
||||||
if [ -d /etc/systemd/system ]
|
if [ -d /usr/lib/systemd/ ]
|
||||||
then
|
then
|
||||||
if [ contrib/mympd.service -nt /etc/systemd/system/mympd.service ]
|
[ -d /usr/lib/systemd/system ] || sudo mkdir /usr/lib/systemd/system
|
||||||
|
if [ contrib/mympd.service -nt /usr/lib/systemd/system/mympd.service ]
|
||||||
then
|
then
|
||||||
sudo cp contrib/mympd.service /etc/systemd/system/
|
sudo cp contrib/mympd.service /usr/lib/systemd/system/
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl daemon-reload
|
||||||
fi
|
fi
|
||||||
sudo systemctl enable mympd
|
sudo systemctl enable mympd
|
||||||
|
Loading…
x
Reference in New Issue
Block a user