mozjpeg-vl.spec 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. %bcond_with shared
  2. Summary: Improved JPEG encoder
  3. Summary(ja): 改良されたJPEGエンコーダ
  4. Name: mozjpeg
  5. Version: 4.1.1
  6. Release: 1%{?_dist_release}
  7. Group: graphics
  8. Vendor: Project Vine
  9. Distribution: Vine Linux
  10. License: IJG and BSD
  11. URL: https://github.com/mozilla/mozjpeg
  12. Source0: https://github.com/mozilla/mozjpeg/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
  13. #Patch1000: CVE-2018-14498.patch
  14. #Patch1001: CVE-2020-13790.patch
  15. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  16. BuildRequires: cmake
  17. BuildRequires: libpng-devel
  18. BuildRequires: zlib-devel
  19. %if !%{with shared}
  20. BuildRequires: libpng-static
  21. BuildRequires: zlib-static
  22. %endif
  23. %ifarch %{ix86} x86_64
  24. BuildRequires: nasm
  25. %endif
  26. %description
  27. MozJPEG reduces file sizes of JPEG images while retaining quality and
  28. compatibility with the vast majority of the world's deployed decoders.
  29. %description -l ja
  30. MozJPEGは、品質と世界で利用されている大多数のデコーダとの互換性を維持
  31. しつつJPEG画像のファイルサイズを縮小します。
  32. %if %{with shared}
  33. %package libs
  34. Summary: drop-in libraries of mozjpeg
  35. Group: system
  36. %description libs
  37. This package contains drop-in libraries of mozjpeg.
  38. %package devel
  39. Summary: development files of mozjpeg
  40. Group: programming
  41. Requires: %{name}-libs
  42. %description devel
  43. This package contains development files of mozjpeg.
  44. %endif
  45. %debug_package
  46. %prep
  47. %setup -q
  48. %autopatch -p1
  49. %build
  50. %cmake \
  51. -DWITH_JPEG8=ON \
  52. %if %{with shared}
  53. -DENABLE_STATIC=OFF \
  54. -DENABLE_SHARED=ON \
  55. %else
  56. -DENABLE_STATIC=ON \
  57. -DENABLE_SHARED=OFF \
  58. %endif
  59. %{nil}
  60. %cmake_build
  61. %install
  62. %{__rm} -rf %{buildroot}
  63. %cmake_install
  64. rm -rf pkgdocs
  65. cp -rf %{buildroot}%{_docdir}/mozjpeg ./pkgdocs
  66. rm -rf %{buildroot}%{_docdir}/mozjpeg
  67. %if %{with shared}
  68. rm -f %{buildroot}%{_libdir}/*.{a,la}
  69. %else
  70. rm -rf %{buildroot}%{_includedir}/*
  71. rm -rf %{buildroot}%{_libdir}/*
  72. %endif
  73. %clean
  74. %{__rm} -rf %{buildroot}
  75. %files
  76. %defattr(-,root,root)
  77. %license LICENSE.md
  78. %doc README.*
  79. %{_bindir}/*
  80. %{_mandir}/man1/*
  81. %if %{with shared}
  82. %files libs
  83. %{_libdir}/*.so.*
  84. %files devel
  85. %doc pkgdocs/*
  86. %{_libdir}/*.so
  87. %{_libdir}/pkgconfig/*
  88. %{_includedir}/*
  89. %endif
  90. %changelog
  91. * Mon Aug 15 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.1.1-1
  92. - new upstream release.
  93. * Thu Sep 02 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.3-2
  94. - rebuilt as statically linked binary.
  95. * Mon Jul 26 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 4.0.3-1
  96. - new upstream release.
  97. * Thu Jun 18 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 3.3.1-1
  98. - initial build for Vine Linux