mirror of
				https://github.com/SuperBFG7/ympd
				synced 2025-10-31 05:43:01 +00:00 
			
		
		
		
	Fix: add mympd.service to myMPD.spec
This commit is contained in:
		| @@ -42,7 +42,6 @@ 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(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 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/) | ||||||
|   | |||||||
| @@ -22,7 +22,7 @@ This fork provides a reworked ui based on Bootstrap 4, a modernized backend and | |||||||
|  - Playlist management |  - Playlist management | ||||||
|  - Advanced search |  - Advanced search | ||||||
|  - Progressiv Web App enabled |  - Progressiv Web App enabled | ||||||
|  - Local coverart support |  - Local coverart support (Albums and Streams) | ||||||
|  - HTTP stream support |  - HTTP stream support | ||||||
|  - Local playback of mpd http stream (html5 audio api) |  - Local playback of mpd http stream (html5 audio api) | ||||||
|  - Play statistics and song voting (uses mpd stickers) |  - Play statistics and song voting (uses mpd stickers) | ||||||
|   | |||||||
| @@ -64,9 +64,9 @@ fi | |||||||
| echo "Installing systemd service" | echo "Installing systemd service" | ||||||
| if [ -d /etc/systemd/system ] | if [ -d /etc/systemd/system ] | ||||||
| then | then | ||||||
|   if [ contrib/mympd.service -nt /etc/systemd/system/mympd.service ] |   if [ debian/mympd.service -nt /etc/systemd/system/mympd.service ] | ||||||
|   then |   then | ||||||
|     sudo cp contrib/mympd.service /etc/systemd/system/ |     sudo cp debian/mympd.service /etc/systemd/system/ | ||||||
|     sudo systemctl daemon-reload |     sudo systemctl daemon-reload | ||||||
|   fi |   fi | ||||||
|   sudo systemctl enable mympd   |   sudo systemctl enable mympd   | ||||||
|   | |||||||
							
								
								
									
										34
									
								
								myMPD.spec
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								myMPD.spec
									
									
									
									
									
								
							| @@ -17,13 +17,22 @@ BuildRequires:  unzip | |||||||
| BuildRequires:	libmpdclient-devel | BuildRequires:	libmpdclient-devel | ||||||
| BuildRequires:	libmpdclient2 | BuildRequires:	libmpdclient2 | ||||||
| BuildRequires:	pkgconfig | BuildRequires:	pkgconfig | ||||||
| BuildRequires:	openssl |  | ||||||
| BuildRequires:	openssl-devel | BuildRequires:	openssl-devel | ||||||
|  | BuildRequires:	systemd | ||||||
|  | %if 0%{?suse_version} >= 1210 | ||||||
|  | BuildRequires: systemd-rpm-macros | ||||||
|  | %endif | ||||||
| BuildRoot:      %{_tmppath}/%{name}-%{version}-build | BuildRoot:      %{_tmppath}/%{name}-%{version}-build | ||||||
|  | %{?systemd_requires} | ||||||
|  |  | ||||||
| %description  | %description  | ||||||
| myMPD is a standalone and mobile friendly web mpdclient. | myMPD is a standalone and mobile friendly web mpdclient. | ||||||
|  |  | ||||||
|  | %pre | ||||||
|  | %if 0%{?suse_version} | ||||||
|  | %service_add_pre mympd.service | ||||||
|  | %endif | ||||||
|  |  | ||||||
| %prep  | %prep  | ||||||
| %setup -q -n %{name}-%{version} | %setup -q -n %{name}-%{version} | ||||||
|  |  | ||||||
| @@ -37,6 +46,28 @@ make | |||||||
| cd release | cd release | ||||||
| make install DESTDIR=%{buildroot} | make install DESTDIR=%{buildroot} | ||||||
| chmod 755 %{buildroot}/usr/share/mympd/crcert.sh | chmod 755 %{buildroot}/usr/share/mympd/crcert.sh | ||||||
|  | install -D -m 644 debian/mympd.service %{buildroot}%{_unitdir}/mympd.service | ||||||
|  |  | ||||||
|  | %post | ||||||
|  | %if 0%{?rhel_version} || 0%{?centos_version} | ||||||
|  | %systemd_post mympd.service | ||||||
|  | %else | ||||||
|  | %service_add_post mympd.service | ||||||
|  | %endif | ||||||
|  |  | ||||||
|  | %preun | ||||||
|  | %if 0%{?rhel_version} || 0%{?centos_version} | ||||||
|  | %systemd_preun mympd.service | ||||||
|  | %else | ||||||
|  | %service_del_preun mympd.service | ||||||
|  | %endif | ||||||
|  |  | ||||||
|  | %postun | ||||||
|  | %if 0%{?rhel_version} || 0%{?centos_version} | ||||||
|  | %systemd_postun mympd.service | ||||||
|  | %else | ||||||
|  | %service_del_postun mympd.service | ||||||
|  | %endif | ||||||
|  |  | ||||||
| %files  | %files  | ||||||
| %defattr(-,root,root,-) | %defattr(-,root,root,-) | ||||||
| @@ -46,6 +77,7 @@ chmod 755 %{buildroot}/usr/share/mympd/crcert.sh | |||||||
| %config /etc/mympd | %config /etc/mympd | ||||||
| /usr/share/man/man1/mympd.1.gz | /usr/share/man/man1/mympd.1.gz | ||||||
| /var/lib/mympd | /var/lib/mympd | ||||||
|  | %{_unitdir}/mympd.service | ||||||
|  |  | ||||||
| %changelog | %changelog | ||||||
| * Tue Aug 28 2018 Juergen Mang <mail@jcgames.de> - master | * Tue Aug 28 2018 Juergen Mang <mail@jcgames.de> - master | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 jcorporation
					jcorporation