2018-08-27 23:50:34 +00:00
|
|
|
#
|
|
|
|
# spec file for package myMPD
|
|
|
|
#
|
|
|
|
# (c) 2018 Juergen Mang <mail@jcgames.de
|
|
|
|
|
|
|
|
Name: myMPD
|
2018-09-04 20:07:30 +00:00
|
|
|
Version: devel
|
2018-08-27 23:50:34 +00:00
|
|
|
Release: 0
|
|
|
|
License: GPL-2.0
|
|
|
|
Group: Productivity/Multimedia/Sound/Players
|
|
|
|
Summary: Standalone webclient for mpd
|
|
|
|
Url: https://github.com/jcorporation/myMPD
|
2018-09-04 20:07:30 +00:00
|
|
|
Source: https://github.com/jcorporation/myMPD/archive/devel.zip
|
2018-08-27 23:50:34 +00:00
|
|
|
BuildRequires: gcc
|
|
|
|
BuildRequires: cmake
|
|
|
|
BuildRequires: unzip
|
|
|
|
BuildRequires: libmpdclient-devel
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: openssl-devel
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2018-08-30 20:50:02 +00:00
|
|
|
|
2018-09-05 19:23:39 +00:00
|
|
|
%global debug_package %{nil}
|
2018-08-27 23:50:34 +00:00
|
|
|
|
|
|
|
%description
|
2018-08-28 11:28:52 +00:00
|
|
|
myMPD is a standalone and mobile friendly web mpdclient.
|
2018-08-27 23:50:34 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n %{name}-%{version}
|
|
|
|
|
|
|
|
%build
|
|
|
|
mkdir release
|
|
|
|
cd release
|
|
|
|
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE=RELEASE ..
|
|
|
|
make
|
|
|
|
|
|
|
|
%install
|
|
|
|
cd release
|
|
|
|
make install DESTDIR=%{buildroot}
|
2018-09-04 19:36:04 +00:00
|
|
|
|
|
|
|
%post
|
2018-09-04 20:07:30 +00:00
|
|
|
getent group mympd > /dev/null
|
|
|
|
[ "$?" == "2" ] && groupadd mympd
|
|
|
|
getent passwd mympd > /dev/null
|
|
|
|
[ "$?" == "2" ] && useradd mympd -g mympd
|
2018-09-05 18:36:23 +00:00
|
|
|
if [ -d /usr/lib/systemd/ ]
|
|
|
|
then
|
|
|
|
[ -d /usr/lib/systemd/system ] || sudo mkdir /usr/lib/systemd/system
|
|
|
|
cp /usr/share/mympd/mympd.service /usr/lib/systemd/system/
|
|
|
|
fi
|
2018-09-05 18:46:40 +00:00
|
|
|
if [ -f /etc/mpd.conf ]
|
|
|
|
then
|
|
|
|
LIBRARY=$(grep ^music_directory /etc/mpd.conf | awk {'print $2'} | sed -e 's/"//g')
|
|
|
|
[ "$LIBRARY" != "" ] && [ ! -e /usr/share/mympd/htdocs/library ] && ln -s "$LIBRARY" /usr/share/mympd/htdocs/library
|
|
|
|
fi
|
2018-09-04 20:07:30 +00:00
|
|
|
chown -R mympd /var/lib/mympd
|
2018-09-05 18:36:23 +00:00
|
|
|
/usr/share/mympd/crcert.sh
|
2018-08-27 23:50:34 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%doc README.md LICENSE
|
|
|
|
/usr/bin/mympd
|
|
|
|
/usr/share/mympd
|
|
|
|
%config /etc/mympd
|
|
|
|
/usr/share/man/man1/mympd.1.gz
|
2018-08-28 11:28:52 +00:00
|
|
|
/var/lib/mympd
|
2018-08-27 23:50:34 +00:00
|
|
|
|
|
|
|
%changelog
|
2018-09-05 18:36:23 +00:00
|
|
|
* Wed Sep 05 2018 Juergen Mang <mail@jcgames.de> - master
|
2018-08-27 23:50:34 +00:00
|
|
|
- Version from master
|