]> git.pld-linux.org Git - packages/minidlna.git/blob - minidlna.spec
- release 2 (by relup.sh)
[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.1.5
8 Release:        2
9 License:        GPL v2
10 Group:          Networking/Daemons
11 Source0:        http://downloads.sourceforge.net/minidlna/%{name}-%{version}.tar.gz
12 # Source0-md5:  1970e553a1eb8a3e7e302e2ce292cbc4
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 %configure \
54         --disable-silent-rules
55
56 %{__make}
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,%{_mandir}/man{5,8}} \
61         $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{systemdunitdir}} \
62         $RPM_BUILD_ROOT/var/{log,run,cache}/%{name}
63
64 %{__make} install \
65         DESTDIR=$RPM_BUILD_ROOT
66
67 # not installed by make install: config file
68 cp -p %{name}.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
69 # and man pages
70 cp -p *.5 $RPM_BUILD_ROOT%{_mandir}/man5
71 cp -p *.8 $RPM_BUILD_ROOT%{_mandir}/man8
72
73 cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
74 cp -p %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
75 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
76
77 %find_lang %{name}
78
79 %clean
80 rm -rf $RPM_BUILD_ROOT
81
82 %pre
83 %groupadd -g 284 minidlna
84 %useradd -u 284 -r -d / -s /bin/false -g minidlna minidlna
85
86 %post
87 /sbin/chkconfig --add %{name}
88 %systemd_post %{name}.service
89
90 %preun
91 if [ "$1" = "0" ]; then
92         %service -q %{name} stop
93         /sbin/chkconfig --del %{name}
94 fi
95 %systemd_preun %{name}.service
96
97 %postun
98 if [ "$1" = "0" ]; then
99         %userremove minidlna
100         %groupremove minidlna
101 fi
102 %systemd_reload
103
104 %triggerpostun -- %{name} < 1.0.25-3
105 %systemd_trigger %{name}.service
106
107 %files -f %{name}.lang
108 %defattr(644,root,root,755)
109 %doc AUTHORS LICENCE.miniupnpd NEWS README TODO
110 %attr(754,root,root) /etc/rc.d/init.d/minidlna
111 %attr(640,root,minidlna) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/minidlna.conf
112 %attr(755,root,root) %{_sbindir}/minidlnad
113 %{systemdtmpfilesdir}/%{name}.conf
114 %{systemdunitdir}/%{name}.service
115 %dir %attr(755,minidlna,minidlna) /var/run/%{name}
116 %dir %attr(755,minidlna,minidlna) /var/cache/%{name}
117 %dir %attr(755,minidlna,minidlna) /var/log/%{name}
118 %{_mandir}/man5/minidlna.conf.5*
119 %{_mandir}/man8/minidlnad.8*
This page took 0.064621 seconds and 3 git commands to generate.