mirror of
https://github.com/SuperBFG7/ympd
synced 2025-03-04 10:38:18 +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(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.conf DESTINATION /etc/${PROJECT_NAME}/)
|
||||
install(FILES htdocs/mympd.webmanifest DESTINATION share/${PROJECT_NAME}/htdocs/)
|
||||
|
@ -36,7 +36,10 @@ make
|
||||
%install
|
||||
cd release
|
||||
make install DESTDIR=%{buildroot}
|
||||
chmod 755 %{buildroot}/usr/share/mympd/crcert.sh
|
||||
|
||||
%post
|
||||
/usr/share/mympd/crcert.sh
|
||||
chown nobody /var/lib/mympd
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
@ -48,5 +51,5 @@ chmod 755 %{buildroot}/usr/share/mympd/crcert.sh
|
||||
/var/lib/mympd
|
||||
|
||||
%changelog
|
||||
* Tue Aug 28 2018 Juergen Mang <mail@jcgames.de> - master
|
||||
* Tue Sep 04 2018 Juergen Mang <mail@jcgames.de> - master
|
||||
- Version from master
|
||||
|
@ -55,18 +55,19 @@ sudo chown nobody /var/lib/mympd
|
||||
echo "Trying to link musicdir to library"
|
||||
if [ -f /etc/mpd.conf ]
|
||||
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
|
||||
else
|
||||
echo "/etc/mpd.conf not found, you must link your music_directory manually to /usr/share/mympd/htdocs/library"
|
||||
fi
|
||||
|
||||
echo "Installing systemd service"
|
||||
if [ -d /etc/systemd/system ]
|
||||
if [ -d /usr/lib/systemd/ ]
|
||||
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
|
||||
sudo cp contrib/mympd.service /etc/systemd/system/
|
||||
sudo cp contrib/mympd.service /usr/lib/systemd/system/
|
||||
sudo systemctl daemon-reload
|
||||
fi
|
||||
sudo systemctl enable mympd
|
||||
|
Loading…
x
Reference in New Issue
Block a user