jellyfin.spec 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. %global debug_package %{nil}
  2. # jellyfin tag to package
  3. %global gittag v10.1.0
  4. # Taglib-sharp commit of the submodule since github archive doesn't include submodules
  5. %global taglib_commit ee5ab21742b71fd1b87ee24895582327e9e04776
  6. %global taglib_shortcommit %(c=%{taglib_commit}; echo ${c:0:7})
  7. AutoReq: no
  8. Name: jellyfin
  9. Version: 10.1.0
  10. Release: 1%{?dist}
  11. Summary: The Free Software Media Browser
  12. License: GPLv2
  13. URL: https://jellyfin.media
  14. Source0: %{name}-%{version}.tar.gz
  15. Source1: jellyfin.service
  16. Source2: jellyfin.env
  17. Source3: jellyfin.sudoers
  18. Source4: restart.sh
  19. Source5: jellyfin.override.conf
  20. Source6: jellyfin-firewalld.xml
  21. %{?systemd_requires}
  22. BuildRequires: systemd
  23. Requires(pre): shadow-utils
  24. BuildRequires: libcurl-devel, fontconfig-devel, freetype-devel, openssl-devel, glibc-devel, libicu-devel
  25. Requires: libcurl, fontconfig, freetype, openssl, glibc libicu
  26. # Requirements not packaged in main repos
  27. # COPR @dotnet-sig/dotnet
  28. BuildRequires: dotnet-sdk-2.2
  29. # RPMfusion free
  30. Requires: ffmpeg
  31. # For the update-db-paths.sh script to fix emby paths to jellyfin
  32. %{?fedora:Recommends: sqlite}
  33. # Fedora has openssl1.1 which is incompatible with dotnet
  34. %{?fedora:Requires: compat-openssl10}
  35. # Disable Automatic Dependency Processing for Centos
  36. %{?el7:AutoReqProv: no}
  37. %description
  38. Jellyfin is a free software media system that puts you in control of managing and streaming your media.
  39. %prep
  40. %autosetup -n %{name}-%{version}
  41. %build
  42. %install
  43. export DOTNET_CLI_TELEMETRY_OPTOUT=1
  44. export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
  45. dotnet publish --configuration Release --output='%{buildroot}%{_libdir}/jellyfin' --self-contained --runtime fedora-x64 Jellyfin.Server
  46. %{__install} -D -m 0644 LICENSE %{buildroot}%{_datadir}/licenses/%{name}/LICENSE
  47. %{__install} -D -m 0644 %{SOURCE5} %{buildroot}%{_sysconfdir}/systemd/system/%{name}.service.d/override.conf
  48. %{__install} -D -m 0644 Jellyfin.Server/Resources/Configuration/logging.json %{buildroot}%{_sysconfdir}/%{name}/logging.json
  49. %{__mkdir} -p %{buildroot}%{_bindir}
  50. tee %{buildroot}%{_bindir}/jellyfin << EOF
  51. #!/bin/sh
  52. exec %{_libdir}/%{name}/%{name} \${@}
  53. EOF
  54. %{__mkdir} -p %{buildroot}%{_sharedstatedir}/jellyfin
  55. %{__mkdir} -p %{buildroot}%{_sysconfdir}/%{name}
  56. %{__mkdir} -p %{buildroot}%{_var}/log/jellyfin
  57. %{__install} -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
  58. %{__install} -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
  59. %{__install} -D -m 0600 %{SOURCE3} %{buildroot}%{_sysconfdir}/sudoers.d/%{name}-sudoers
  60. %{__install} -D -m 0755 %{SOURCE4} %{buildroot}%{_libexecdir}/%{name}/restart.sh
  61. %{__install} -D -m 0644 %{SOURCE6} %{buildroot}%{_prefix}/lib/firewalld/service/%{name}.xml
  62. %files
  63. %{_libdir}/%{name}/jellyfin-web/*
  64. %attr(755,root,root) %{_bindir}/%{name}
  65. %{_libdir}/%{name}/*.json
  66. %{_libdir}/%{name}/*.pdb
  67. %{_libdir}/%{name}/*.dll
  68. %{_libdir}/%{name}/*.so
  69. %{_libdir}/%{name}/*.a
  70. %{_libdir}/%{name}/createdump
  71. # Needs 755 else only root can run it since binary build by dotnet is 722
  72. %attr(755,root,root) %{_libdir}/%{name}/jellyfin
  73. %{_libdir}/%{name}/sosdocsunix.txt
  74. %{_unitdir}/%{name}.service
  75. %{_libexecdir}/%{name}/restart.sh
  76. %{_prefix}/lib/firewalld/service/%{name}.xml
  77. %attr(755,jellyfin,jellyfin) %dir %{_sysconfdir}/%{name}
  78. %config %{_sysconfdir}/sysconfig/%{name}
  79. %config(noreplace) %attr(600,root,root) %{_sysconfdir}/sudoers.d/%{name}-sudoers
  80. %config(noreplace) %{_sysconfdir}/systemd/system/%{name}.service.d/override.conf
  81. %config(noreplace) %attr(644,jellyfin,jellyfin) %{_sysconfdir}/%{name}/logging.json
  82. %attr(-,jellyfin,jellyfin) %dir %{_sharedstatedir}/jellyfin
  83. %attr(-,jellyfin,jellyfin) %dir %{_var}/log/jellyfin
  84. %if 0%{?fedora}
  85. %license LICENSE
  86. %else
  87. %{_datadir}/licenses/%{name}/LICENSE
  88. %endif
  89. %pre
  90. getent group jellyfin >/dev/null || groupadd -r jellyfin
  91. getent passwd jellyfin >/dev/null || \
  92. useradd -r -g jellyfin -d %{_sharedstatedir}/jellyfin -s /sbin/nologin \
  93. -c "Jellyfin default user" jellyfin
  94. exit 0
  95. %post
  96. # Move existing configuration to /etc/jellyfin and symlink config to /etc/jellyfin
  97. if [ $1 -gt 1 ] ; then
  98. service_state=$(systemctl is-active jellyfin.service)
  99. if [ "${service_state}" = "active" ]; then
  100. systemctl stop jellyfin.service
  101. fi
  102. if [ ! -L %{_sharedstatedir}/%{name}/config ]; then
  103. mv %{_sharedstatedir}/%{name}/config/* %{_sysconfdir}/%{name}/
  104. rmdir %{_sharedstatedir}/%{name}/config
  105. ln -sf %{_sysconfdir}/%{name} %{_sharedstatedir}/%{name}/config
  106. fi
  107. if [ ! -L %{_sharedstatedir}/%{name}/logs ]; then
  108. mv %{_sharedstatedir}/%{name}/logs/* %{_var}/log/jellyfin
  109. rmdir %{_sharedstatedir}/%{name}/logs
  110. ln -sf %{_var}/log/jellyfin %{_sharedstatedir}/%{name}/logs
  111. fi
  112. if [ "${service_state}" = "active" ]; then
  113. systemctl start jellyfin.service
  114. fi
  115. fi
  116. %systemd_post jellyfin.service
  117. %preun
  118. %systemd_preun jellyfin.service
  119. %postun
  120. %systemd_postun_with_restart jellyfin.service
  121. %changelog
  122. * Sun Jan 20 2019 Jellyfin Packaging Team <packaging@jellyfin.org>
  123. - jellyfin:
  124. - PR335 Build scripts and build system consolidation.
  125. - PR424 add jellyfin-web as submodule
  126. - PR455 Cleanup some small things
  127. - PR458 Clean up several minor issues and add TODOs
  128. - PR506 Removing tabs and trailing whitespace
  129. - PR508 Update internal versioning and user agents.
  130. - PR516 Remove useless properties from IEnvironmentInfo
  131. - PR520 Fix potential bug where aspect ratio would be incorrectly calculated
  132. - PR534 Add linux-arm and linux-arm64 native NuGet dependency.
  133. - PR540 Update Emby API keys to our own
  134. - PR541 Change ItemId to Guid in ProviderManager
  135. - PR556 Fix "Password Reset by PIN" page
  136. - PR562 Fix error with uppercase photo extension and fix typo in a log line
  137. - PR563 Update dev from master
  138. - PR566 Avoid printing stacktrace when bind to port 1900 fails
  139. - PR567 Shutdown gracefully when recieving a termination signal
  140. - PR571 Add more NuGet metadata properties
  141. - PR575 Reformat all C# server code to conform with code standards
  142. - PR576 Add code analysers for debug builds
  143. - PR580 Fix Docker build
  144. - PR582 Replace custom image parser with Skia
  145. - PR587 Add nuget info to Emby.Naming
  146. - PR589 Ensure config and log folders exist
  147. - PR596 Fix indentation for xml files
  148. - PR598 Remove MediaBrowser.Text for license violations and hackiness
  149. - PR606 Slim down docker image
  150. - PR613 Update MediaEncoding
  151. - PR616 Add Swagger documentation
  152. - PR619 Really slim down Docker container
  153. - PR621 Minor improvements to library scan code
  154. - PR622 Add unified build script and bump_version script
  155. - PR623 Replaced injections of ILogger with ILoggerFactory
  156. - PR625 Update taglib-sharp
  157. - PR626 Fix extra type name in parameter, add out keyword
  158. - PR627 Use string for ApplicationVersion
  159. - PR628 Update Product Name (User-Agent)
  160. - PR629 Fix subtitle converter misinterpreting 0 valued endTimeTicks
  161. - PR631 Cleanup ImageProcessor and SkiaEncoder
  162. - PR634 Replace our TVDB key with @drakus72's which is V1
  163. - PR636 Allow subtitle extraction and conversion in direct streaming
  164. - PR637 Remove unused font
  165. - PR638 Removed XmlTv testfiles and nuget install
  166. - PR639 Fix segment_time_delta for ffmpeg 4.1
  167. - PR646: Fix infinite loop bug on subtitle.m3u8 request
  168. - PR655: Support trying local branches in submodule
  169. - jellyfin-web:
  170. - PR1: Change webcomponents to non-minified version
  171. - PR4: Fix user profile regression
  172. - PR6: Make icon into proper ico and large PNG
  173. - PR7: Fix firefox failing to set password for users with no password set
  174. - PR8: Remove premiere stuff and fix crashes caused by earlier removals
  175. - PR12: Fix return from PIN reset to index.html
  176. - PR13: Send android clients to select server before login
  177. - PR14: Reimplement page to add server
  178. - PR16: Fix spinning circle at the end of config wizard
  179. - PR17: Fix directorybrower not resetting scroll
  180. - PR19: Set union merge for CONTRIBUTORS.md
  181. - PR20: Show album thumbnail and artist image in page itemdetail
  182. - PR26: Make the card titles clickable
  183. - PR27: Stop pagination and adding a library from being able to trigger multiple times
  184. - PR28: Add transparent nav bar to BlueRadiance theme CSS
  185. - PR29: Clean up imageuploader
  186. - PR30: Remove iap and simplify registrationservices
  187. - PR36: Open videos in fullscreen on android devices
  188. - PR37: Remove broken features from web interface
  189. - PR38: Fix inconsistent UI coloring around settings drawer
  190. - PR39: Remove back button from dashboard and metadata manager
  191. - PR42: Fix Home backdrop not loading
  192. - PR43: Filter videos by audio stream language
  193. - PR44: Remove filter from library collection type options
  194. - PR45: Fix data-backbutton logic
  195. - PR46: Minor changes to navbar elements
  196. - PR48: Remove Sync code
  197. * Fri Jan 11 2019 Thomas Büttner <thomas@vergesslicher.tech> - 10.0.2-1
  198. - TODO Changelog for 10.0.2