1
0
mirror of https://github.com/SuperBFG7/ympd synced 2025-10-24 18:37:40 +00:00

Fix: remove systemd dependency

This commit is contained in:
jcorporation
2018-08-30 21:50:02 +01:00
parent 337a3609ee
commit 771d06b9af
4 changed files with 4 additions and 35 deletions

View File

@@ -18,21 +18,12 @@ BuildRequires: libmpdclient-devel
BuildRequires: libmpdclient2
BuildRequires: pkgconfig
BuildRequires: openssl-devel
BuildRequires: systemd
%if 0%{?suse_version} >= 1210
BuildRequires: systemd-rpm-macros
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{?systemd_requires}
%description
myMPD is a standalone and mobile friendly web mpdclient.
%pre
%if 0%{?suse_version}
%service_add_pre mympd.service
%endif
%prep
%setup -q -n %{name}-%{version}
@@ -46,28 +37,6 @@ make
cd release
make install DESTDIR=%{buildroot}
chmod 755 %{buildroot}/usr/share/mympd/crcert.sh
install -D -m 644 %{buildroot}/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
%defattr(-,root,root,-)
@@ -77,7 +46,6 @@ install -D -m 644 %{buildroot}/debian/mympd.service %{buildroot}%{_unitdir}/mymp
%config /etc/mympd
/usr/share/man/man1/mympd.1.gz
/var/lib/mympd
%{_unitdir}/mympd.service
%changelog
* Tue Aug 28 2018 Juergen Mang <mail@jcgames.de> - master

10
contrib/mympd.service Normal file
View File

@@ -0,0 +1,10 @@
[Unit]
Description=myMPD server daemon
Requires=network.target local-fs.target mpd.service
[Service]
ExecStart=/usr/bin/mympd /etc/mympd/mympd.conf
Type=simple
[Install]
WantedBy=multi-user.target