minidlna/minidlna.spec

90 lines
2.5 KiB
RPMSpec
Raw Normal View History

2012-07-04 11:59:16 +03:00
Summary: A DLNA/UPnP-AV compliant media server
Name: minidlna
2014-10-19 17:15:52 +04:00
Version: 1.1.4
Release: 1
2012-07-04 11:59:16 +03:00
URL: http://sourceforge.net/projects/minidlna/
Group: Networking/Other
License: GPLv2
2014-01-16 03:39:06 -05:00
Source0: http://downloads.sourceforge.net/project/minidlna/minidlna/%{version}/minidlna-%{version}.tar.gz
Source2: minidlna-tmpfiles.conf
2012-07-04 11:59:16 +03:00
Source3: minidlna.1
Source4: minidlna.conf.5
Source5: %{name}.service
BuildRequires: pkgconfig(flac)
2012-07-04 11:59:16 +03:00
BuildRequires: libid3tag-devel
BuildRequires: libexif-devel
2014-01-16 03:39:06 -05:00
BuildRequires: jpeg-devel
BuildRequires: pkgconfig(sqlite3)
2014-01-16 03:39:06 -05:00
BuildRequires: ffmpeg-devel >= 1.1
BuildRequires: pkgconfig(vorbis)
2014-01-16 03:39:06 -05:00
BuildRequires: systemd
2012-07-04 11:59:16 +03:00
Requires(post): rpm-helper
Requires(preun): rpm-helper
2014-05-21 15:27:47 +04:00
Requires(postun): rpm-helper
2012-02-01 19:43:30 +04:00
%description
MiniDLNA (aka ReadyDLNA) is server software with the aim of being fully
compliant with DLNA/UPnP-AV clients. MiniDLNA serves multimedia content
such as music, video and pictures to compatible clients on the network.
See http://www.upnp.org/ for more details on UPnP
and http://www.dlna.org/ for mode details on DLNA.
%prep
%setup -q
2012-07-04 11:59:16 +03:00
2012-02-01 19:43:30 +04:00
%build
2012-07-04 11:59:16 +03:00
%serverbuild
2014-01-16 03:39:06 -05:00
%configure2_5x \
--with-log-path=%{_logdir} \
--with-db-path=%{_localstatedir}/cache \
--with-os-name="%{distribution}"\
--with-os-version="%{distro_release}" \
--with-os-url="%{disturl}"
2012-07-04 11:59:16 +03:00
2012-02-01 19:43:30 +04:00
%make
%install
2012-07-04 11:59:16 +03:00
%makeinstall_std
install -D -p -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}/%{name}.service
install -m 644 -D minidlna.conf %{buildroot}%{_sysconfdir}/minidlna.conf
install -m 644 -D %{SOURCE3} %{buildroot}%{_mandir}/man1/minidlna.1
install -m 644 -D %{SOURCE4} %{buildroot}%{_mandir}/man5/minidlna.conf.5
mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d
install -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/tmpfiles.d/%{name}.conf
2012-02-01 19:43:30 +04:00
2014-05-21 15:27:47 +04:00
install -d -m 0755 %{buildroot}%{_localstatedir}/cache/%{name}/
touch %{buildroot}%{_localstatedir}/cache/%{name}/files.db
2014-01-16 03:39:06 -05:00
%find_lang %{name}
%pre
2014-05-21 15:27:47 +04:00
%_pre_useradd %{name} /run/%{name} /sbin/nologin
2014-01-16 03:39:06 -05:00
%_pre_groupadd minidlna minidlna
2012-02-01 19:43:30 +04:00
%post
2014-05-21 15:27:47 +04:00
%create_ghostfile %{_localstatedir}/cache/%{name}/files.db %{name} %{name} 0644
2012-02-01 19:43:30 +04:00
%_post_service minidlna
2014-01-16 03:39:06 -05:00
%tmpfiles_create %{name}.conf
2012-02-01 19:43:30 +04:00
%preun
%_preun_service minidlna
2014-01-16 03:39:06 -05:00
%postun
%_postun_userdel minidlna
%_postun_groupdel minidlna minidlna
%files -f %{name}.lang
2012-02-01 19:43:30 +04:00
%doc README
2014-05-21 15:27:47 +04:00
%dir %attr(-,minidlna,minidlna) %{_localstatedir}/cache/%{name}/
%ghost %attr(-,minidlna,minidlna) %{_localstatedir}/cache/%{name}/files.db
2014-01-16 03:39:06 -05:00
%attr(755,-,-) %{_sbindir}/minidlna*
2012-07-04 11:59:16 +03:00
%{_unitdir}/%{name}.service
2012-02-01 19:43:30 +04:00
%config(noreplace) %{_sysconfdir}/minidlna.conf
2014-05-21 15:27:47 +04:00
%{_sysconfdir}/tmpfiles.d/%{name}.conf
2012-02-01 19:43:30 +04:00
%{_mandir}/man1/minidlna.1*
%{_mandir}/man5/minidlna.conf.5*