minidlna-vl.spec 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. # Basic Information
  2. Name: minidlna
  3. Version: 1.2.1
  4. Release: 3%{?_dist_release}
  5. # COPYING などを参照して License を修正してください。
  6. License: GPLv2
  7. # /usr/share/doc/rpm-4.11.1/GROUPS_for_vine.txt を参照して Group を修正してください。
  8. Group: Applications/Multimedia
  9. URL: http://sourceforge.net/projects/minidlna
  10. Source0: http://sourceforge.net/projects/%{name}/files/%{name}/%{version}/%{name}-%{version}.tar.gz
  11. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  12. Vendor: Project Vine
  13. Distribution: Vine Linux
  14. Packager: Shirow HIGA, iwaim
  15. Summary: Lightweight DLNA/UPnP-AV server targeted at embedded systems
  16. #Summary(ja): ここに日本語で概要を記述してください。
  17. # Dependency
  18. # 以下に依存関係を記述してください 。
  19. BuildRequires: libuuid-devel
  20. BuildRequires: sqlite3-devel
  21. BuildRequires: libvorbis-devel
  22. BuildRequires: flac-devel
  23. BuildRequires: libid3tag-devel
  24. BuildRequires: libjpeg-turbo-devel
  25. BuildRequires: libexif-devel
  26. BuildRequires: gettext-devel
  27. ## *-devel pacages provided by other self-build-* should only be listed
  28. ## in self-build-%{name}.spec
  29. #BuildRequires: ffmpeg-devel
  30. #BuildRequires: ffmpegthumbnailer-devel
  31. Requires: ffmpegthumbnailer
  32. #追加のソースファイル
  33. Source1: minidlna.init.d.script
  34. Source2: minidlna.icons.c.custom
  35. #追加のパッチファイル
  36. #patch1: minidlna_configure.patch
  37. #Patch2: minidlna_make.patch
  38. #patch1: minidlna_configure_v113.patch
  39. #Patch2: minidlna_make_v116.patch
  40. Patch3: minidlna_video_thumbnail_v121.patch
  41. #Patch4: minidlna_bravia_v116.patch
  42. %description
  43. MiniDLNA (aka ReadyDLNA) is server software with the aim of being fully
  44. compliant with DLNA/UPnP-AV clients.
  45. The minidlna daemon serves media files (music, pictures, and video) to
  46. clients on your network. Example clients include applications such as
  47. Totem and XBMC, and devices such as portable media players, smartphones,
  48. and televisions.
  49. #%description -l ja
  50. #ここに日本語で詳細を記述してください。
  51. %prep
  52. %setup -q
  53. #
  54. sed -i.bak \
  55. -e "s|^AM_GNU_GETTEXT_VERSION(0.18)|AM_GNU_GETTEXT_VERSION(0.18.3)|" \
  56. -e "s|if test -f /etc/redhat-release; then|if test -f /etc/vine-release; then|" \
  57. configure.ac
  58. sed -i.bak \
  59. -e "s|^#network_interface=eth0|network_interface=eth0|" \
  60. -e "s|^#db_dir=/var/cache/minidlna|db_dir=/var/cache/minidlna|" \
  61. -e "s|^#log_dir=/var/log|log_dir=/var/log/minidlna|" \
  62. minidlna.conf
  63. sed -i.bak \
  64. -e "s|DLNA.ORG_PN=MPEG_TS_HD_NA_ISO,|DLNA.ORG_PN=MPEG_TS_HD_60_L2_ISO,|" \
  65. -e "s|DLNA.ORG_PN=MPEG_TS_SD_EU_ISO,|DLNA.ORG_PN=MPEG_TS_SD_JP_ISO,|" \
  66. upnpglobalvars.h
  67. sed -i.bak \
  68. -e "s|HD_NA|HD_60_L2|" \
  69. -e "s|EU|JP|" \
  70. metadata.c
  71. # MiniDLNA Patch
  72. #%patch1 -p0
  73. #%patch2 -p0
  74. %patch3 -p0
  75. #%patch4 -p0
  76. # icons.cをオリジナルの物に差し替える
  77. cp -a %{SOURCE2} icons.c
  78. %build
  79. ./autogen.sh
  80. %configure \
  81. --disable-silent-rules \
  82. --with-db-path=%{_localstatedir}/cache/%{name} \
  83. --with-log-path=%{_localstatedir}/log/%{name} \
  84. --enable-thumbnail
  85. %{__make} %{?_smp_mflags}
  86. %install
  87. %{__rm} -rf ${RPM_BUILD_ROOT}
  88. %{__make} install DESTDIR=${RPM_BUILD_ROOT}
  89. # Install config file
  90. mkdir -p %{buildroot}%{_sysconfdir}/minidlna
  91. install -p -m 644 minidlna.conf %{buildroot}%{_sysconfdir}/minidlna/minidlna.conf
  92. # Install init.d file
  93. mkdir -p %{buildroot}%{_sysconfdir}/init.d
  94. install -p -m 755 %{SOURCE1} %{buildroot}%{_sysconfdir}/init.d/minidlna
  95. # Install man pages
  96. mkdir -p %{buildroot}%{_mandir}/man5
  97. install -m 644 minidlna.conf.5 %{buildroot}%{_mandir}/man5/
  98. mkdir -p %{buildroot}%{_mandir}/man8
  99. install -m 644 minidlnad.8 %{buildroot}%{_mandir}/man8/
  100. # Create cache and log directories
  101. mkdir -p %{buildroot}%{_localstatedir}/cache
  102. install -d -m 0755 %{buildroot}%{_localstatedir}/cache/%{name}/
  103. mkdir -p %{buildroot}%{_localstatedir}/log
  104. install -d -m 0755 %{buildroot}%{_localstatedir}/log/%{name}/
  105. %find_lang %{name}
  106. %clean
  107. %{__rm} -rf ${RPM_BUILD_ROOT}
  108. %pre
  109. if [ -x /etc/rc.d/init.d/%{name} ]; then
  110. /etc/rc.d/init.d/%{name} stop
  111. fi
  112. %post
  113. /sbin/chkconfig --add %{name}
  114. %preun
  115. if [ $1 = 0 ]; then
  116. /etc/rc.d/init.d/%{name} stop > /dev/null 2>&1
  117. /sbin/chkconfig --del %{name}
  118. fi
  119. %postun
  120. if [ $1 = 0 ]; then
  121. rm -rf /var/cache/%{name}
  122. fi
  123. %files -f %{name}.lang
  124. %defattr(-,root,root)
  125. %doc AUTHORS COPYING LICENCE.miniupnpd ChangeLog NEWS README TODO
  126. %config(noreplace) %{_sysconfdir}/minidlna/minidlna.conf
  127. %{_sysconfdir}/init.d/minidlna
  128. %{_sbindir}/minidlnad
  129. %{_mandir}/man5/%{name}.conf.5*
  130. %{_mandir}/man8/minidlnad.8*
  131. %{_localstatedir}/cache/%{name}/
  132. %{_localstatedir}/log/%{name}/
  133. #%{_datadir}/minidlna/icons/*
  134. %changelog
  135. * Sun Jun 17 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 1.2.1-3
  136. - add Packager
  137. - update BuildRequires
  138. - stop updating 'notify_interval' configuration
  139. * Tue Apr 24 2018 Shirow HIGA <shirowxxx@gmail.com> 1.2.1-2
  140. - Rebuild with ffmpeg 4.0
  141. * Fri Sep 15 2017 Shirow HIGA <shirowxxx@gmail.com> 1.2.1-1
  142. - new upstream release 1.2.1
  143. - Update Patch3 (minidlna_video_thumbnail_v120.patch -> minidlna_video_thumbnail_v121.patch)
  144. * Fri May 26 2017 Shirow HIGA <shirowxxx@gmail.com> 1.2.0-1
  145. - new upstream release 1.2.0
  146. - Update Patch3 (minidlna_video_thumbnail_v116.patch -> minidlna_video_thumbnail_v120.patch)
  147. * Sun Jan 22 2017 Shirow HIGA <shirowxxx@gmail.com> 1.1.6-3
  148. - Remove Patch1 (minidlna_configure_v113.patch)
  149. - Remove Patch2 (minidlna_make_v116.patch)
  150. - Remove Patch4 (minidlna_bravia_v116.patch)
  151. * Mon Sep 19 2016 Shirow HIGA <shirowxxx@gmail.com> 1.1.6-2
  152. - add new Patch (minidlna_bravia_v116.patch)
  153. * Mon Sep 12 2016 Shirow HIGA <shirowxxx@gmail.com> 1.1.6-1
  154. - new upstream release 1.1.6
  155. * Mon Sep 14 2015 Shirow HIGA <shirowxxx@gmail.com> 1.1.5-1
  156. - new upstream release 1.1.5
  157. * Sun Jan 11 2015 Shirow HIGA <shirowxxx@gmail.com> 1.1.4-1
  158. - new upstream release 1.1.4
  159. * Sun Jun 08 2014 Shirow HIGA <shirowxxx@gmail.com> 1.1.3-1
  160. - new upstream release 1.1.3
  161. * Sun Apr 13 2014 Shirow HIGA <shirowxxx@gmail.com> 1.1.2-1
  162. - initial build for Vine Linux