]> git.pld-linux.org Git - packages/minidlna.git/blob - minidlna.spec
2b841f4ad02e9e923735567feb828fb4ab612718
[packages/minidlna.git] / minidlna.spec
1 # TODO:
2 # logrotate
3 #
4 Summary:        DLNA server software
5 Summary(pl.UTF-8):      Oprogramowanie serwerowe DLNA
6 Name:           minidlna
7 Version:        1.3.3
8 Release:        1
9 License:        GPL v2
10 Group:          Networking/Daemons
11 Source0:        http://downloads.sourceforge.net/minidlna/%{name}-%{version}.tar.gz
12 # Source0-md5:  a8b010d8803811f4e26e57894c30fa6c
13 Source1:        %{name}.init
14 Source2:        %{name}.service
15 Source3:        %{name}.tmpfiles
16 Patch0:         config.patch
17 URL:            http://sourceforge.net/projects/minidlna/
18 BuildRequires:  autoconf >= 2.50
19 BuildRequires:  automake
20 # libavcodec libavformat libavutil
21 BuildRequires:  ffmpeg-devel
22 BuildRequires:  flac-devel
23 BuildRequires:  gettext-tools >= 0.18
24 BuildRequires:  libexif-devel
25 BuildRequires:  libid3tag-devel
26 BuildRequires:  libjpeg-devel
27 BuildRequires:  libogg-devel
28 BuildRequires:  libvorbis-devel
29 BuildRequires:  rpmbuild(macros) >= 1.228
30 BuildRequires:  sed >= 4.0
31 BuildRequires:  sqlite3-devel >= 3.5.1
32 Requires(post,preun):   /sbin/chkconfig
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 MiniDLNA (aka ReadyDLNA) is server software with the aim of being
37 fully compliant with DLNA/UPnP-AV clients.
38
39 %description -l pl.UTF-8
40 MiniDLNA (znane także jako ReadyDLNA) to oprogramowanie serwerowe,
41 którego celem jest pełna zgodność z klientami DLNA/UPnP-AV.
42
43 %prep
44 %setup -q
45 %patch0 -p1
46
47 %build
48 %{__gettextize}
49 %{__aclocal}
50 %{__autoconf}
51 %{__autoheader}
52 %{__automake}
53 export CFLAGS="%{rpmcflags} -fcommon"
54 %configure \
55         --disable-silent-rules
56
57 %{__make}
58
59 %install
60 rm -rf $RPM_BUILD_ROOT
61 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_mandir}/man{5,8}} \
62         $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{systemdunitdir}} \
63         $RPM_BUILD_ROOT/var/{log,run,cache}/%{name}
64
65 %{__make} install \
66         DESTDIR=$RPM_BUILD_ROOT
67
68 # not installed by make install: config file
69 cp -p %{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
70 # and man pages
71 cp -p *.5 $RPM_BUILD_ROOT%{_mandir}/man5
72 cp -p *.8 $RPM_BUILD_ROOT%{_mandir}/man8
73
74 cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
75 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
76 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
77
78 %find_lang %{name}
79
80 %clean
81 rm -rf $RPM_BUILD_ROOT
82
83 %pre
84 %groupadd -g 284 minidlna
85 %useradd -u 284 -r -d / -s /bin/false -g minidlna minidlna
86
87 %post
88 /sbin/chkconfig --add %{name}
89 %systemd_post %{name}.service
90
91 %preun
92 if [ "$1" = "0" ]; then
93         %service -q %{name} stop
94         /sbin/chkconfig --del %{name}
95 fi
96 %systemd_preun %{name}.service
97
98 %postun
99 if [ "$1" = "0" ]; then
100         %userremove minidlna
101         %groupremove minidlna
102 fi
103 %systemd_reload
104
105 %triggerpostun -- %{name} < 1.0.25-3
106 %systemd_trigger %{name}.service
107
108 %files -f %{name}.lang
109 %defattr(644,root,root,755)
110 %doc AUTHORS LICENCE.miniupnpd NEWS README TODO
111 %attr(754,root,root) /etc/rc.d/init.d/minidlna
112 %attr(640,root,minidlna) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/minidlna.conf
113 %attr(755,root,root) %{_sbindir}/minidlnad
114 %{systemdtmpfilesdir}/%{name}.conf
115 %{systemdunitdir}/%{name}.service
116 %dir %attr(755,minidlna,minidlna) /var/run/%{name}
117 %dir %attr(755,minidlna,minidlna) /var/cache/%{name}
118 %dir %attr(755,minidlna,minidlna) /var/log/%{name}
119 %{_mandir}/man5/minidlna.conf.5*
120 %{_mandir}/man8/minidlnad.8*
This page took 0.052674 seconds and 4 git commands to generate.