Browse Source

self-build-minidlna 1.2.1-3

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@11755 ec354946-7b23-47d6-9f5a-488ba84defc7
iwaim 5 years ago
parent
commit
c9ea8b67e1

+ 15 - 8
nonfree/self-build-minidlna/minidlna-vl.spec

@@ -1,7 +1,7 @@
 # Basic Information
 # Basic Information
 Name:		minidlna
 Name:		minidlna
 Version:	1.2.1
 Version:	1.2.1
-Release:	2%{?_dist_release}
+Release:	3%{?_dist_release}
 # COPYING  などを参照して License を修正してください。
 # COPYING  などを参照して License を修正してください。
 License:	GPLv2
 License:	GPLv2
 # /usr/share/doc/rpm-4.11.1/GROUPS_for_vine.txt を参照して Group を修正してください。
 # /usr/share/doc/rpm-4.11.1/GROUPS_for_vine.txt を参照して Group を修正してください。
@@ -12,7 +12,7 @@ BuildRoot:	%{_tmppath}/%{name}-%{version}-root
 
 
 Vendor:		Project Vine
 Vendor:		Project Vine
 Distribution:	Vine Linux
 Distribution:	Vine Linux
-Packager:	Shirow HIGA
+Packager:	Shirow HIGA, iwaim
 
 
 Summary:	Lightweight DLNA/UPnP-AV server targeted at embedded systems
 Summary:	Lightweight DLNA/UPnP-AV server targeted at embedded systems
 #Summary(ja):	ここに日本語で概要を記述してください。
 #Summary(ja):	ここに日本語で概要を記述してください。
@@ -20,7 +20,6 @@ Summary:	Lightweight DLNA/UPnP-AV server targeted at embedded systems
 # Dependency
 # Dependency
 # 以下に依存関係を記述してください 。
 # 以下に依存関係を記述してください 。
 BuildRequires:  libuuid-devel
 BuildRequires:  libuuid-devel
-BuildRequires:  ffmpeg-devel
 BuildRequires:  sqlite3-devel
 BuildRequires:  sqlite3-devel
 BuildRequires:  libvorbis-devel
 BuildRequires:  libvorbis-devel
 BuildRequires:  flac-devel
 BuildRequires:  flac-devel
@@ -28,7 +27,10 @@ BuildRequires:  libid3tag-devel
 BuildRequires:  libjpeg-turbo-devel
 BuildRequires:  libjpeg-turbo-devel
 BuildRequires:  libexif-devel
 BuildRequires:  libexif-devel
 BuildRequires:  gettext-devel
 BuildRequires:  gettext-devel
-BuildRequires:	ffmpegthumbnailer-devel
+## *-devel pacages provided by other self-build-* should only be listed
+## in self-build-%{name}.spec
+#BuildRequires: ffmpeg-devel
+#BuildRequires:	ffmpegthumbnailer-devel
 
 
 Requires:	ffmpegthumbnailer
 Requires:	ffmpegthumbnailer
 
 
@@ -69,7 +71,6 @@ sed -i.bak \
 	-e "s|^#network_interface=eth0|network_interface=eth0|" \
 	-e "s|^#network_interface=eth0|network_interface=eth0|" \
 	-e "s|^#db_dir=/var/cache/minidlna|db_dir=/var/cache/minidlna|" \
 	-e "s|^#db_dir=/var/cache/minidlna|db_dir=/var/cache/minidlna|" \
 	-e "s|^#log_dir=/var/log|log_dir=/var/log/minidlna|" \
 	-e "s|^#log_dir=/var/log|log_dir=/var/log/minidlna|" \
-	-e "s|^notify_interval=900|notify_interval=2|" \
 	minidlna.conf
 	minidlna.conf
 
 
 sed -i.bak \
 sed -i.bak \
@@ -112,7 +113,6 @@ install -p -m 644 minidlna.conf %{buildroot}%{_sysconfdir}/minidlna/minidlna.con
 # Install init.d file
 # Install init.d file
 mkdir -p %{buildroot}%{_sysconfdir}/init.d
 mkdir -p %{buildroot}%{_sysconfdir}/init.d
 install -p -m 755 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/minidlna
 install -p -m 755 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/minidlna
-%find_lang %{name}
 
 
 # Install man pages
 # Install man pages
 mkdir -p %{buildroot}%{_mandir}/man5
 mkdir -p %{buildroot}%{_mandir}/man5
@@ -126,6 +126,8 @@ install -d -m 0755 %{buildroot}%{_localstatedir}/cache/%{name}/
 mkdir -p %{buildroot}%{_localstatedir}/log
 mkdir -p %{buildroot}%{_localstatedir}/log
 install -d -m 0755 %{buildroot}%{_localstatedir}/log/%{name}/
 install -d -m 0755 %{buildroot}%{_localstatedir}/log/%{name}/
 
 
+%find_lang %{name}
+
 %clean
 %clean
 %{__rm} -rf ${RPM_BUILD_ROOT}
 %{__rm} -rf ${RPM_BUILD_ROOT}
 
 
@@ -150,6 +152,7 @@ fi
 
 
 %files -f %{name}.lang
 %files -f %{name}.lang
 %defattr(-,root,root)
 %defattr(-,root,root)
+%doc AUTHORS COPYING LICENCE.miniupnpd ChangeLog NEWS README TODO
 %config(noreplace) %{_sysconfdir}/minidlna/minidlna.conf
 %config(noreplace) %{_sysconfdir}/minidlna/minidlna.conf
 %{_sysconfdir}/init.d/minidlna
 %{_sysconfdir}/init.d/minidlna
 %{_sbindir}/minidlnad
 %{_sbindir}/minidlnad
@@ -158,10 +161,14 @@ fi
 %{_localstatedir}/cache/%{name}/
 %{_localstatedir}/cache/%{name}/
 %{_localstatedir}/log/%{name}/
 %{_localstatedir}/log/%{name}/
 #%{_datadir}/minidlna/icons/*
 #%{_datadir}/minidlna/icons/*
-%doc AUTHORS COPYING LICENCE.miniupnpd ChangeLog NEWS README TODO
 
 
 %changelog
 %changelog
-* Thu Apr 24 2018 Shirow HIGA <shirowxxx@gmail.com> 1.2.1-2
+* Sun Jun 17 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 1.2.1-3
+- add Packager
+- update BuildRequires
+- stop updating 'notify_interval' configuration
+
+* Tue Apr 24 2018 Shirow HIGA <shirowxxx@gmail.com> 1.2.1-2
 - Rebuild with ffmpeg 4.0
 - Rebuild with ffmpeg 4.0
 
 
 * Fri Sep 15 2017 Shirow HIGA <shirowxxx@gmail.com> 1.2.1-1
 * Fri Sep 15 2017 Shirow HIGA <shirowxxx@gmail.com> 1.2.1-1

+ 41 - 20
nonfree/self-build-minidlna/minidlna.init.d.script

@@ -11,12 +11,21 @@
 # settings, so you should treat this with care.
 # settings, so you should treat this with care.
 
 
 # Original author:  Perry Clark <omfgppc (at) gmail.com>
 # Original author:  Perry Clark <omfgppc (at) gmail.com>
+# modified by IWAI, Masaharu <iwaim.sub@gmail.com>
 
 
-## EDIT FROM HERE
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+if [ -f /etc/sysconfig/minidlna ]; then
+        . /etc/sysconfig/minidlna
+fi
+
+RETVAL=0
+LOCK_FILE=/var/lock/subsys/minidlna
 
 
 # Installation details
 # Installation details
 MINIDLNA="/usr/sbin/minidlnad"
 MINIDLNA="/usr/sbin/minidlnad"
-ARGS="/etc/minidlna/minidlna.conf"
+CONF="/etc/minidlna/minidlna.conf"
 
 
 # Where to keep a log file
 # Where to keep a log file
 MINIDLNA_LOG="/var/log/minidlna/minidlna.log"
 MINIDLNA_LOG="/var/log/minidlna/minidlna.log"
@@ -24,8 +33,6 @@ MINIDLNA_LOG="/var/log/minidlna/minidlna.log"
 # Where the PID lives
 # Where the PID lives
 PID_FILE="/var/run/minidlnad.pid"
 PID_FILE="/var/run/minidlnad.pid"
 
 
-## STOP EDITING HERE
-
 # The path that is to be used for the script
 # The path that is to be used for the script
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 
 
@@ -34,31 +41,45 @@ set -e
 # Only start if we can find the minidlna.conf.
 # Only start if we can find the minidlna.conf.
 test -x $MINIDLNA || exit 0
 test -x $MINIDLNA || exit 0
 
 
+start() {
+    echo -n "Starting MiniDLNA: "
+    $MINIDLNA -f $CONF -P $PID_FILE  >> $MINIDLNA_LOG 2>&1
+    RETVAL=$?
+    [ $RETVAL -eq 0 ] && success || failure
+    echo
+    [ $RETVAL -eq 0 ] && touch $LOCK_FILE
+    return $RETVAL
+}
+
+stop() {
+    pid=0
+    if [ -f $PID_FILE ]; then
+        pid=`cat $PID_FILE`
+        echo -n "Stopping MiniDLNA: "
+        kill $pid
+        RETVAL=$?
+        [ $RETVAL -eq 0 ] && success || failure
+        echo
+        [ $RETVAL -eq 0 ] && rm -f $LOCK_FILE
+        return $RETVAL
+    fi
+}
+
 # Parse command line parameters.
 # Parse command line parameters.
 case $1 in
 case $1 in
   start)
   start)
-	echo -n "Starting MiniDLNA: "
-	$MINIDLNA -f $ARGS -P $PID_FILE  >> $MINIDLNA_LOG 2>&1
-	echo "ok"
+        start
 	;;
 	;;
-
   stop)
   stop)
-  	echo -n "Stopping MiniDLNA: "
-	   for pidf in `/bin/ls $PID_FILE 2>/dev/null`; do
-	    if [ -s $pidf ]; then
-		kill `cat $pidf` >/dev/null 2>&1
-	    fi
-	    		rm -rf $PIF_FILE
-	   done
-	echo "ok"
-	;;
+        stop
+        ;;
 
 
   restart|reload|force-reload)
   restart|reload|force-reload)
 	echo "Restarting MiniDLNA: "
 	echo "Restarting MiniDLNA: "
 	
 	
-    $0 stop
+	stop
 	sleep 2
 	sleep 2
-	$0 start
+	start
 	
 	
 	;;
 	;;
 
 
@@ -69,4 +90,4 @@ case $1 in
 	;;
 	;;
 esac
 esac
 
 
-exit 0
+exit $?

+ 22 - 7
nonfree/self-build-minidlna/self-build-minidlna-vl.spec

@@ -2,7 +2,7 @@
 %define pkgname minidlna
 %define pkgname minidlna
 %define name    self-build-%{pkgname}
 %define name    self-build-%{pkgname}
 %define version 1.2.1
 %define version 1.2.1
-%define release 2%{?_dist_release}
+%define release 3%{?_dist_release}
 
 
 %define sourceurl0 http://sourceforge.net/projects/%{pkgname}/files/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
 %define sourceurl0 http://sourceforge.net/projects/%{pkgname}/files/%{pkgname}/%{version}/%{pkgname}-%{version}.tar.gz
 
 
@@ -19,7 +19,7 @@ BuildArch:      noarch
 
 
 Vendor:         Project Vine
 Vendor:         Project Vine
 Distribution:   Vine Linux
 Distribution:   Vine Linux
-Packager:       Shirow HIGA
+Packager:       Shirow HIGA, iwaim
 
 
 Summary:        Package to automatically build %{pkgname} rpm package
 Summary:        Package to automatically build %{pkgname} rpm package
 Summary(ja):    %{pkgname} の rpm パッケージを自動作成するパッケージ
 Summary(ja):    %{pkgname} の rpm パッケージを自動作成するパッケージ
@@ -40,6 +40,7 @@ Requires(post):	libjpeg-turbo-devel
 Requires(post):	libexif-devel
 Requires(post):	libexif-devel
 Requires(post):	gettext-devel
 Requires(post):	gettext-devel
 
 
+Requires(post):	self-build-ffmpeg
 Requires(post):	self-build-ffmpegthumbnailer
 Requires(post):	self-build-ffmpegthumbnailer
 
 
 #追加のソースファイル
 #追加のソースファイル
@@ -59,13 +60,22 @@ clients on your network.  Example clients include applications such as
 Totem and XBMC, and devices such as portable media players, smartphones,
 Totem and XBMC, and devices such as portable media players, smartphones,
 and televisions.
 and televisions.
 
 
-[Note]                                                                                                                      This package requires many other packages to compile                                                                        targetsoftware. So it consume more disk space than usual.                                                                   
-Also installation takes logner time because of compilation.                                                                 (This will take a few minutes to quarter or half of an hour,
+[Note]
+This package requires many other packages to compile
+targetsoftware. So it consume more disk space than usual.
+
+Also installation takes logner time because of compilation.
+(This will take a few minutes to quarter or half of an hour,
 depends on building environment)
 depends on building environment)
-                                                                                                                            [About self-build package]                                                                                                  For some kind of software, distributing of binary package                                                                   
+
+[About self-build package]
+For some kind of software, distributing of binary package
+
 may viorate the patent or law. Therefore we chose self-build
 may viorate the patent or law. Therefore we chose self-build
 packge, create binary package on your machine, for such kind
 packge, create binary package on your machine, for such kind
-of softwares instead of distributing binary package.                                                                                                                                                                                                    Please obey the national law when you use the created binary                                                                
+of softwares instead of distributing binary package.
+
+Please obey the national law when you use the created binary
 packages. And if you want to use the softwares using patented
 packages. And if you want to use the softwares using patented
 thechnology, it may be required to get a permission, make an
 thechnology, it may be required to get a permission, make an
 agreement or purchas a license. Please consider it with your
 agreement or purchas a license. Please consider it with your
@@ -101,7 +111,12 @@ purpose or way of use and take appropriate action.
 %{_datadir}/%{name}
 %{_datadir}/%{name}
 
 
 %changelog
 %changelog
-* Thu Apr 24 2018 Shirow HIGA <shirowxxx@gmail.com> 1.2.0-2
+* Sat Jul 28 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 1.2.1-3
+- add Packager
+- update Requires(post)
+- update init.d script (Source1) 
+
+* Tue Apr 24 2018 Shirow HIGA <shirowxxx@gmail.com> 1.2.1-2
 - Rebuild with ffmpeg 4.0
 - Rebuild with ffmpeg 4.0
 
 
 * Fri Sep 15 2017 Shirow HIGA <shirowxxx@gmail.com> 1.2.1-1
 * Fri Sep 15 2017 Shirow HIGA <shirowxxx@gmail.com> 1.2.1-1