From f7061fe3e4f9b84ff4ca3e596ab757a73d4b77f7 Mon Sep 17 00:00:00 2001 From: Denis Silakov Date: Thu, 16 Jan 2014 03:39:06 -0500 Subject: [PATCH] Update to 1.1.1 (sync with cooker) --- .abf.yml | 4 +-- minidlna-1.0.25-ffmpeg10.patch | 64 ---------------------------------- minidlna-tmpfiles.conf | 3 +- minidlna.service | 7 ++-- minidlna.spec | 55 +++++++++++++---------------- 5 files changed, 33 insertions(+), 100 deletions(-) delete mode 100644 minidlna-1.0.25-ffmpeg10.patch diff --git a/.abf.yml b/.abf.yml index 546c711..ccafde6 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,3 +1,3 @@ +--- sources: - "minidlna_1.0.24_src.tar.gz": 5e7fe50dbac5b5784e3d7a4eb9251fa9b37e97f2 - minidlna_1.0.25_src.tar.gz: 33742f02367006c6e4af7128b91c830026e59b9f + minidlna-1.1.1.tar.gz: 97c28d2b861957620d319929f904225e906830c7 diff --git a/minidlna-1.0.25-ffmpeg10.patch b/minidlna-1.0.25-ffmpeg10.patch deleted file mode 100644 index e12c21b..0000000 --- a/minidlna-1.0.25-ffmpeg10.patch +++ /dev/null @@ -1,64 +0,0 @@ -The new ffmpeg-1.0 comes with the headers libavutil/time.h and -libavutil/log.h. These overrule /usr/include/time.h and -minidlna-1.0.25/log.h due to the priority of '-I' set in the -Makefile - -CFLAGS = -Wall -g -O3 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \ - -I/usr/include/ffmpeg \ - -I/usr/include/libavutil -I/usr/include/libavcodec -I/usr/include/libavformat \ - -I/usr/include/ffmpeg/libavutil -I/usr/include/ffmpeg/libavcodec -I/usr/include/ffmpeg/libavformat - -Here below is a patch removing the need for these search -directories. Backward compatibility could be guaranteed via -'-I/usr/include/ffmpeg'. - -diff -u -p -r minidlna-1.0.25/Makefile minidlna-1.0.25-new/Makefile ---- minidlna-1.0.25/Makefile 2012-01-17 23:49:01.000000000 +0100 -+++ minidlna-1.0.25-new/Makefile 2012-10-25 01:53:04.000000000 +0200 -@@ -12,10 +12,14 @@ - # - #CFLAGS = -Wall -O -D_GNU_SOURCE -g -DDEBUG - #CFLAGS = -Wall -g -Os -D_GNU_SOURCE --CFLAGS = -Wall -g -O3 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \ -- -I/usr/include/ffmpeg \ -- -I/usr/include/libavutil -I/usr/include/libavcodec -I/usr/include/libavformat \ -- -I/usr/include/ffmpeg/libavutil -I/usr/include/ffmpeg/libavcodec -I/usr/include/ffmpeg/libavformat -+CFLAGS = -Wall -g -O3 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/ffmpeg -+# -I/usr/include/libavcodec -+# -I/usr/include/libavformat -+# overrules /usr/include/time.h -+# -I/usr/include/libavutil -+# nonexistant -+# -I/usr/include/ffmpeg \ -+# -I/usr/include/ffmpeg/libavutil -I/usr/include/ffmpeg/libavcodec -I/usr/include/ffmpeg/libavformat - #STATIC_LINKING: CFLAGS += -DSTATIC - #STATIC_LINKING: LDFLAGS = -static - CC = gcc -diff -u -p -r minidlna-1.0.25/metadata.c minidlna-1.0.25-new/metadata.c ---- minidlna-1.0.25/metadata.c 2012-06-29 23:11:29.000000000 +0200 -+++ minidlna-1.0.25-new/metadata.c 2012-10-25 01:53:37.000000000 +0200 -@@ -30,9 +30,9 @@ - #include "image_utils.h" - #include - #include --#include --#include --#include -+#include -+#include -+#include - #include "tagutils/tagutils.h" - - #include "upnpglobalvars.h" -diff -u -p -r minidlna-1.0.25/tagutils/tagutils-plist.c minidlna-1.0.25-new/tagutils/tagutils-plist.c ---- minidlna-1.0.25/tagutils/tagutils-plist.c 2012-01-17 23:54:47.000000000 +0100 -+++ minidlna-1.0.25-new/tagutils/tagutils-plist.c 2012-10-25 01:49:33.000000000 +0200 -@@ -27,7 +27,7 @@ - #include "misc.h" - #include "tagutils.h" - #include "textutils.h" --#include "log.h" -+#include "../log.h" - - - #define MAX_BUF 4096 diff --git a/minidlna-tmpfiles.conf b/minidlna-tmpfiles.conf index 1c5229b..07a1eca 100644 --- a/minidlna-tmpfiles.conf +++ b/minidlna-tmpfiles.conf @@ -1 +1,2 @@ -d /var/run/minidlna 755 minidlna minidlna \ No newline at end of file +d /var/run/minidlna 0755 minidlna minidlna +d /var/cache/minidlna 0755 minidlna minidlna diff --git a/minidlna.service b/minidlna.service index b6263be..489da51 100644 --- a/minidlna.service +++ b/minidlna.service @@ -1,11 +1,12 @@ [Unit] Description=MiniDLNA is a DLNA/UPnP-AV server software -After=syslog.target local-fs.target network.target +After=network.target [Service] Type=forking PIDFile=/var/run/minidlna.pid -ExecStart=/usr/sbin/minidlna -f /etc/minidlna.conf +ExecStart=/usr/sbin/minidlnad -f /etc/minidlna.conf -P /run/minidlna/minidlna.pid +PIDFile=/run/minidlna/minidlna.pid [Install] -WantedBy=multi-user.target +WantedBy=multi-user.target \ No newline at end of file diff --git a/minidlna.spec b/minidlna.spec index 1fff73f..6a68865 100644 --- a/minidlna.spec +++ b/minidlna.spec @@ -1,29 +1,23 @@ Summary: A DLNA/UPnP-AV compliant media server Name: minidlna -Version: 1.0.25 -Release: %mkrel 1 +Version: 1.1.1 +Release: 2 URL: http://sourceforge.net/projects/minidlna/ Group: Networking/Other License: GPLv2 -Source0: http://downloads.sourceforge.net/project/minidlna/minidlna/%{version}/minidlna_%{version}_src.tar.gz +Source0: http://downloads.sourceforge.net/project/minidlna/minidlna/%{version}/minidlna-%{version}.tar.gz Source2: minidlna-tmpfiles.conf Source3: minidlna.1 Source4: minidlna.conf.5 Source5: %{name}.service -# Local patches -# Selected patches from development tree -#Patch100: -# Selected patches from upstream patch tracker -#Patch200: -Patch0: minidlna-1.0.25-ffmpeg10.patch BuildRequires: pkgconfig(flac) BuildRequires: libid3tag-devel BuildRequires: libexif-devel -BuildRequires: libjpeg-devel +BuildRequires: jpeg-devel BuildRequires: pkgconfig(sqlite3) -BuildRequires: ffmpeg-devel +BuildRequires: ffmpeg-devel >= 1.1 BuildRequires: pkgconfig(vorbis) -BuildRequires: systemd-units +BuildRequires: systemd Requires(post): rpm-helper Requires(preun): rpm-helper @@ -37,25 +31,16 @@ and http://www.dlna.org/ for mode details on DLNA. %prep %setup -q -%patch0 -p1 - -./genconfig.sh -sed -i -e 's!^\(#define OS_NAME\).*!\1 "%{product_vendor}"! - s!^\(#define OS_VERSION\).*!\1 "%{product_version}"! - s!^\(#define OS_URL\).*!\1 "http://www.mandriva.com/"! - s!^\(#define DEFAULT_DB_PATH\).*!\1 "/var/cache/%{name}"! - s!^\(#define DEFAULT_LOG_PATH\).*!\1 "/var/log"!' config.h - %build %serverbuild -%setup_compile_flags -#(tpg) obey %optflags -sed -i 's/CFLAGS = -Wall -g -O3/CFLAGS +=/' Makefile - -#(tpg) verbose make -sed -i 's/@$(CC)/$(CC)/' Makefile +%configure2_5x \ + --with-log-path=%{_logdir} \ + --with-db-path=%{_localstatedir}/cache \ + --with-os-name="%{distribution}"\ + --with-os-version="%{distro_release}" \ + --with-os-url="%{disturl}" %make @@ -70,16 +55,26 @@ 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 +%find_lang %{name} + +%pre +%_pre_useradd minidlna %{_var}/run/%{name} /bin/false +%_pre_groupadd minidlna minidlna + %post %_post_service minidlna +%tmpfiles_create %{name}.conf %preun %_preun_service minidlna -%files -%defattr(0644,root,root,0755) +%postun +%_postun_userdel minidlna +%_postun_groupdel minidlna minidlna + +%files -f %{name}.lang %doc README -%attr(755,-,-) %{_sbindir}/minidlna +%attr(755,-,-) %{_sbindir}/minidlna* %{_unitdir}/%{name}.service %config(noreplace) %{_sysconfdir}/minidlna.conf %config(noreplace) %{_sysconfdir}/tmpfiles.d/%{name}.conf