install configuration files, systemd service, man pages [release 1.3.0-2mamba;Fri Feb 12 2021]

This commit is contained in:
Silvan Calarco 2024-01-06 07:09:41 +01:00
parent 8ceee0124a
commit e12485c594
4 changed files with 64 additions and 1 deletions

16
minidlna.service Normal file
View File

@ -0,0 +1,16 @@
[Unit]
Description=minidlna server
After=network.target
[Service]
Type=simple
User=minidlna
Group=minidlna
ExecStart=/usr/sbin/minidlnad -S
ProtectSystem=full
ProtectHome=on
PrivateDevices=on
NoNewPrivileges=on
[Install]
WantedBy=multi-user.target

View File

@ -1,6 +1,6 @@
Name: minidlna Name: minidlna
Version: 1.3.0 Version: 1.3.0
Release: 1mamba Release: 2mamba
Summary: A simple media server software, with the aim of being fully compliant with DLNA/UPnP-AV clients Summary: A simple media server software, with the aim of being fully compliant with DLNA/UPnP-AV clients
Group: Applications/Multimedia Group: Applications/Multimedia
Vendor: openmamba Vendor: openmamba
@ -8,9 +8,14 @@ Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://sourceforge.net/projects/minidlna/ URL: https://sourceforge.net/projects/minidlna/
Source: https://downloads.sourceforge.net/project/minidlna/minidlna/%{version}/minidlna-%{version}.tar.gz Source: https://downloads.sourceforge.net/project/minidlna/minidlna/%{version}/minidlna-%{version}.tar.gz
Source1: minidlna.service
Source2: minidlna.sysusers
Source3: minidlna.tmpfiles
License: GPL License: GPL
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
BuildRequires: ldconfig
BuildRequires: libavcodec-ffmpeg-devel
BuildRequires: libavformat-ffmpeg-devel BuildRequires: libavformat-ffmpeg-devel
BuildRequires: libavutil-ffmpeg-devel BuildRequires: libavutil-ffmpeg-devel
BuildRequires: libexif-devel BuildRequires: libexif-devel
@ -20,7 +25,9 @@ BuildRequires: libjpeg-devel
BuildRequires: libogg-devel BuildRequires: libogg-devel
BuildRequires: libsqlite-devel BuildRequires: libsqlite-devel
BuildRequires: libvorbis-devel BuildRequires: libvorbis-devel
BuildRequires: libz-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
%systemd_requires
BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %description
@ -33,23 +40,57 @@ ReadyMedia (formerly known as MiniDLNA) is a simple media server software, with
%build %build
%configure %configure
%make %make
%install %install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall %makeinstall
install -Dm644 minidlna.conf %{buildroot}%{_sysconfdir}/minidlna.conf
install -Dm0644 %{SOURCE3} %{buildroot}%{_tmpfilesdir}/minidlna.conf
install -Dm0644 %{SOURCE2} %{buildroot}%{_sysusersdir}/minidlna.conf
install -Dm0644 %{SOURCE1} %{buildroot}%{_unitdir}/minidlna.service
install -Dm644 minidlna.conf.5 %{buildroot}%{_mandir}/man5/minidlna.conf.5
install -Dm644 minidlnad.8 %{buildroot}%{_mandir}/man8/minidlnad.8
%find_lang %{name} || touch %{name}.lang %find_lang %{name} || touch %{name}.lang
%pre
%sysusers_create_package minidlna %{SOURCE2}
%tmpfiles_create_package minidlna %{SOURCE3}
:
%post
%systemd_post minidlna
:
%preun
%systemd_preun minidlna
:
%postun
%systemd_postun_with_restart minidlna
:
%clean %clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" [ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files -f %{name}.lang %files -f %{name}.lang
%defattr(-,root,root) %defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/minidlna.conf
%{_sbindir}/minidlnad %{_sbindir}/minidlnad
%{_unitdir}/minidlna.service
%{_sysusersdir}/minidlna.conf
%{_tmpfilesdir}/minidlna.conf
%{_mandir}/man5/minidlna.conf.5*
%{_mandir}/man8/minidlnad.8*
%doc AUTHORS COPYING %doc AUTHORS COPYING
%changelog %changelog
* Fri Feb 12 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 1.3.0-2mamba
- install configuration files, systemd service, man pages
* Sat Nov 28 2020 Automatic Build System <autodist@mambasoft.it> 1.3.0-1mamba * Sat Nov 28 2020 Automatic Build System <autodist@mambasoft.it> 1.3.0-1mamba
- automatic version update by autodist - automatic version update by autodist

1
minidlna.sysusers Normal file
View File

@ -0,0 +1 @@
u minidlna - "minidlna server" /var/cache/minidlna

5
minidlna.tmpfiles Normal file
View File

@ -0,0 +1,5 @@
# systemd tmpfile settings for minidlna
# See tmpfiles.d(5) for details
d /run/minidlna 0755 minidlna minidlna -
d /var/cache/minidlna 0755 minidlna minidlna -