%global major 0 %global minor 54 %global maintenance 0 %global branch_ver %{major}.%{minor} #%global optflags %(echo %{optflags} | sed 's/-g/-g -std=c++11/') %define doc_license %{nil} %define doc_license 1 %if 0%{?rhel}%{?fedora} %if 0%{?rhel} %if 0%{?rhel} < 7 %define doc_license 0 %endif %else %if 0%{?fedora} < 19 %define doc_license 0 %endif %endif %endif %define license_file COPYING %define backport %{nil} %if 0%{?rhel}%{?fedora} %if 0%{?fedora} %if 0%{?fedora} <= 19 %define backport 1 %endif %endif %if 0%{?rhel} %if 0%{?rhel} <= 6 %define backport 1 %endif %endif %endif %define devtoolset %{nil} %if 0%{?rhel} %if 0%{?rhel} <= 7 %define devtoolset 6 %endif %endif Name: subtitleeditor Version: %{major}.%{minor}.%{maintenance} Release: 1%{?dist} Summary: GTK+3 tool to edit subtitles for GNU/Linux/*BSD Group: Applications/Multimedia License: GPLv3+ #URL: http://home.gna.org/subtitleeditor/ URL: https://kitone.github.io/subtitleeditor/ #Source0: http://download.gna.org/subtitleeditor/%{branch_ver}/%{name}-%{version}.tar.gz Source0: https://github.com/kitone/subtitleeditor/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz # Fix for build with GCC 4.6 (taking address of temporary) #Patch0: %{name}-0.39.0-temp-addr.patch #Patch0: %{name}-0.40.0-glib.patch #Patch0: %{name}-0.41.0-textoverlay.patch #Patch1: %{name}-0.41.0-keyframe-generation.patch #Patch2: %{name}-0.41.0-fix-custom-class-interfaces.patch #Patch3: %{name}-0.41.0-fix-custom-class-interfaces-timecell.patch Patch4: %{name}-0.52.1-dialogfilechooser.patch Patch5: %{name}-0.53.0-aclocal.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: desktop-file-utils BuildRequires: gettext BuildRequires: gstreamer-devel BuildRequires: gstreamer-plugins-good BuildRequires: gstreamer-plugins-base-devel BuildRequires: gstreamer1-devel BuildRequires: gstreamer1-plugins-good BuildRequires: gstreamer1-plugins-base-devel %if 0%{?backport} BuildRequires: gtkmm30-devel %else BuildRequires: gtkmm30-devel >= 3.10 %endif BuildRequires: glibmm24-devel >= 2.18.0 BuildRequires: libxml++-devel >= 2.20 BuildRequires: intltool BuildRequires: ccache BuildRequires: gstreamermm-devel >= 1.0.0 BuildRequires: enchant >= 1.4.0 BuildRequires: libtool BuildRequires: automake %if 0%{?backport} #BuildRequires: automake %else #BuildRequires: automake >= 1.15 %endif # For spell checking (Optional) BuildRequires: enchant-devel >= 1.4.0 # ISO-CODES 639 + 3166 (Optional) BuildRequires: iso-codes-devel %if 0%{?devtoolset} BuildRequires: devtoolset-%{devtoolset}-gcc BuildRequires: devtoolset-%{devtoolset}-gcc-c++ # Better safe than sorry... BuildRequires: devtoolset-%{devtoolset} BuildRequires: devtoolset-%{devtoolset}-build BuildRequires: devtoolset-%{devtoolset}-libstdc++-devel BuildRequires: devtoolset-%{devtoolset}-libasan-devel BuildRequires: devtoolset-%{devtoolset}-runtime %if %{?devtoolset} >= 6 BuildRequires: devtoolset-%{devtoolset}-make %endif Requires: devtoolset-%{devtoolset} Requires: devtoolset-%{devtoolset}-runtime %else BuildRequires: gcc-c++ %endif Requires(post): /sbin/ldconfig Requires(postun): /sbin/ldconfig %description Subtitle Editor is a GTK+3 tool to edit subtitles for GNU/Linux/*BSD. It can be used for new subtitles or as a tool to transform, edit, correct and refine existing subtitle. This program also shows sound waves, which makes it easier to synchronize subtitles to voices. %prep %setup -q #%patch0 -p1 -b .temp-addr #%patch0 -p1 -b .glib #%patch0 -p1 -b .textoverlay #%patch1 -p1 -b .keyframe-generation #%patch2 -p1 -b .fix-custom-class-interfaces #%patch3 -p1 -b .fix-custom-class-interfaces-timecell %if 0%{?backport} # https://developer.gnome.org/gtkmm/stable/classGtk_1_1FileChooser.html#af13782c9ff3bc13f536e511176fc9d0d %patch4 -p1 -b .dialogfilechooser #%patch5 -p1 -b .backport %endif # They force the ansi flag - why? #sed -i '/-ansi/ d' configure %if 0%{?backport} # fix gtkmm version for file in {configure,configure.ac}; do date_orig="$( stat -c "%Y" "${file}" )" sed -i -re "s/(gtkmm-3\.0 >= 3)((\.[0-9]+)*)/\1.0/" "${file}" touch -d "@${date_orig}" "${file}" done # fix automake/aclocal version #for file in {configure,aclocal.m4}; do # sed -i -re "s/(am__api_version=')([^']*)(')/\11.13\3/" "${file}" #done #for file in aclocal.m4; do # sed -i -re "s/(\[AM_AUTOMAKE_VERSION\(\[)([0-9]+(\.[0-9]+)*)(\]\))/\11.13\4/" "${file}" # sed -i -re "s/(m4_if\(\[\$1\], \[)([0-9]+(\.[0-9]+)*)(\])/\11.13\4/" "${file}" #done %endif %build %if 0%{?devtoolset} export CC="/opt/rh/devtoolset-%{devtoolset}/root%{_bindir}/gcc" export CPP="/opt/rh/devtoolset-%{devtoolset}/root%{_bindir}/cpp" export CXX="/opt/rh/devtoolset-%{devtoolset}/root%{_bindir}/c++" %endif %if 0%{?devtoolset} export DEVTOOLSET_ROOT_PATH="/opt/rh/devtoolset-%{devtoolset}/root" export DEVTOOLSET_BIN_PATH="${DEVTOOLSET_ROOT_PATH}%{_bindir}" if [[ -n "${PATH}" ]]; then PATH="${DEVTOOLSET_BIN_PATH}:${PATH}" else PATH="${DEVTOOLSET_BIN_PATH}" fi export PATH export DEVTOOLSET_LIB_PATH="${DEVTOOLSET_ROOT_PATH}%{_libdir}" if [[ -n "${LD_LIBRARY_PATH}" ]]; then LD_LIBRARY_PATH="${DEVTOOLSET_LIB_PATH}:${LD_LIBRARY_PATH}" else LD_LIBRARY_PATH="${DEVTOOLSET_LIB_PATH}" fi export LD_LIBRARY_PATH export DEVTOOLSET_PKG_CONFIG_PATH="${DEVTOOLSET_LIB_PATH}/pkgconfig" if [[ -n "${PKG_CONFIG_PATH}" ]]; then PKG_CONFIG_PATH="${DEVTOOLSET_PKG_CONFIG_PATH}:${PKG_CONFIG_PATH}" else PKG_CONFIG_PATH="${DEVTOOLSET_PKG_CONFIG_PATH}" fi export PKG_CONFIG_PATH export DEVTOOLSET_RUN_PATH="${DEVTOOLSET_LIB_PATH}" if [[ -n "${LD_RUN_PATH}" ]]; then LD_RUN_PATH="${DEVTOOLSET_RUN_PATH}:${LD_RUN_PATH}" else LD_RUN_PATH="${DEVTOOLSET_RUN_PATH}" fi export LD_RUN_PATH %endif # introduced in 0.54.0 ./autogen.sh %configure \ --disable-debug \ --disable-static \ --disable-gl \ --enable-ccache %{__make} %{?_smp_mflags} %install %{__rm} -rf "${RPM_BUILD_ROOT}" %{__make} install DESTDIR="${RPM_BUILD_ROOT}" #remove .la's find "${RPM_BUILD_ROOT}" -name '*.la' -exec %{__rm} -f '{}' \; #remove useless development files %{__rm} -f "${RPM_BUILD_ROOT}%{_libdir}/lib%{name}.so" %find_lang %{name} desktop-file-install --delete-original \ %if 0%{?fedora} && 0%{?fedora} < 19 --vendor="fedora" \ %endif --dir "%{buildroot}%{_datadir}/applications" \ --mode 0644 \ "%{buildroot}%{_datadir}/applications/%{name}.desktop" # Register as an application to be visible in the software center # # NOTE: It would be *awesome* if this file was maintained by the upstream # project, translated and installed into the right place during `make install`. # # See http://www.freedesktop.org/software/appstream/docs/ for more details. # mkdir -p "${RPM_BUILD_ROOT}%{_datadir}/appdata" cat > "${RPM_BUILD_ROOT}%{_datadir}/appdata/%{name}.appdata.xml" < subtitleeditor.desktop CC0-1.0 Subtitle Editor GTK+3 tool to edit subtitles for GNU/Linux/*BSD

Subtitle Editor is a GTK+3 tool to edit subtitles for GNU/Linux/*BSD. It can be used for new subtitles or as a tool to transform, edit, correct and refine existing subtitle. This program also shows sound waves, which makes it easier to synchronize subtitles to voices.

http://home.gna.org/subtitleeditor/screenshots/se-0.34-01.png http://home.gna.org/subtitleeditor/ kitone@gna.org
EOF %clean %{__rm} -rf "${RPM_BUILD_ROOT}" %post /sbin/ldconfig touch --no-create "%{_datadir}/icons/hicolor" if [ -x "%{_bindir}/gtk-update-icon-cache" ]; then "%{_bindir}/gtk-update-icon-cache" --quiet "%{_datadir}/icons/hicolor" || : fi %postun /sbin/ldconfig touch --no-create "%{_datadir}/icons/hicolor" if [ -x "%{_bindir}/gtk-update-icon-cache" ]; then "%{_bindir}/gtk-update-icon-cache" --quiet "%{_datadir}/icons/hicolor" || : fi %files -f %{name}.lang %defattr(-,root,root,-) %if 0%{?doc_license} %license %{license_file} %else %doc %{license_file} %endif %doc AUTHORS ChangeLog NEWS README TODO %{_bindir}/%{name} %{_datadir}/icons/hicolor/*/apps/%{name}.* %{_datadir}/pixmaps/%{name}.svg %{_datadir}/%{name} %if 0%{?fedora} && 0%{?fedora} < 19 %{_datadir}/appdata/%{name}.appdata.xml %{_datadir}/applications/fedora-%{name}.desktop %else %{_datadir}/appdata/%{name}.appdata.xml %{_datadir}/applications/%{name}.desktop %endif %{_datadir}/man/man1/%{name}.1.* %{_libdir}/lib%{name}.so.* %{_libdir}/%{name} %changelog * Tue Oct 24 2017 Tomasz Tomasik - 0.54.0-1 - Update to version 0.54.0 - Update URL and Source - Update requirements - Rebuilt for EL7 * Tue Oct 24 2017 Tomasz Tomasik - 0.53.0-5 - Disable dialogfilechooser patch (gtkmm30 backport) in EL7 due upgrade gtkmm30 to 3.22 - Rebuilt for EL7 * Tue Oct 24 2017 Tomasz Tomasik - 0.53.0-4 - Add a few changes to the SPEC file - Rebuilt for EL7 * Thu Mar 09 2017 Tomasz Tomasik - 0.53.0-3 - Rebuilt for EL7 - Backport to gtkmm30 < 3.10 - Provide new patches - Fixed description and summary * Sat Feb 11 2017 Fedora Release Engineering - 0.53.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Sat Jul 30 2016 Ankur Sinha - 0.53.0-1 - Update to 0.53.0 * Thu Jul 28 2016 Ankur Sinha - 0.52.1-1 - Update to latest upstream release * Fri Jun 10 2016 Ankur Sinha - .41.0-11 - Rebuild spec bump * Fri Feb 05 2016 Fedora Release Engineering - 0.41.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Sun Jan 10 2016 Ankur Sinha 0.41.0-9 - define -> global * Fri Jun 19 2015 Fedora Release Engineering - 0.41.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat May 02 2015 Kalev Lember - 0.41.0-7 - Rebuilt for GCC 5 C++11 ABI change * Thu Mar 26 2015 Richard Hughes - 0.41.0-6 - Add an AppData file for the software center * Thu Jan 29 2015 Artur Szymczak - 0.41.0-5 - Added patches for rhbz #1187152 (upstream #22857 and #23018) * Mon Aug 18 2014 Fedora Release Engineering - 0.41.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sun Jun 08 2014 Fedora Release Engineering - 0.41.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun Jan 19 2014 Martin Sourada - 0.41.0-2 - Added patch for rhbz #1017469 (upstream #21501 and #20653) * Thu Jan 16 2014 Artur Szymczak - 0.41.0-1 - Updated to latest release. - Dropping the temporary patch (%{name}-0.40.0-glib.patch) - Fixed upstream. - Added patch for rhbz #906226 (upstream #20793) * Sun Aug 04 2013 Fedora Release Engineering - 0.40.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Sun Feb 24 2013 Toshio Kuratomi - 0.40.0-4 - Remove --vendor from desktop-file-install for F19+. https://fedorahosted.org/fesco/ticket/1077 * Fri Feb 15 2013 Fedora Release Engineering - 0.40.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sat Jul 21 2012 Fedora Release Engineering - 0.40.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Wed Mar 14 2012 Martin Sourada - 0.40.0-1 - Update to latest release. * Lots of bugfixes. * Adds ability to seek by frames. * Adds default ASS/SSA style in config file. * Adds support for DLP Cinema Subtitle format. * Adds 'recent files' for Video and Wave Frame. * Tue Feb 28 2012 Fedora Release Engineering - 0.39.0-4 - Rebuilt for c++ ABI breakage * Sat Jan 14 2012 Fedora Release Engineering - 0.39.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Tue Dec 06 2011 Adam Jackson - 0.39.0-2 - Rebuild for new libpng * Mon Jul 18 2011 Martin Sourada - 0.39.0-1 - New upstream release 0.39.0 - adds support for SAMI subtitle format - detects movie fps - various fixes and improvements * Wed Feb 09 2011 Fedora Release Engineering - 0.37.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed Jul 14 2010 Martin Sourada - 0.37.1-1 - rhbz #583343 (upstream #16016) fixed upstream, dropping the temporary patch - displays saving dialog after generating waveforms or keyframes - adds support for .stl subtitle format (Spruce STL) - adds an option to scall all subtitles - fixes a crash at "find and replace" with regexp (upstream #16058) * Mon Jun 21 2010 Martin Sourada - 0.36.2-2 - Updated patch for rhbz #583343 (upstream #16016) * Sun Jun 06 2010 Martin Sourada - 0.36.2-1 - New subtitle format SBV - Build with gl waveform renderer now works, we'll keep Cairo based one though - Fixes non-working video playback (upstream #15525) - Fixes some segfaults on waveform generation (upstream #15464) - Add temporary patch for rhbz #583343 (upstream #16016) * Sun Feb 14 2010 Martin Sourada - 0.36.0-1 - disable gl waveform renderer (fails to build, cairo based is good enough) - two new plugins : sortsubtitles, typewriter - various fixes - fixes rhbz#564215 and its duplicates * Sun Jan 10 2010 Martin Sourada - 0.35.1-2 - Fix source URL * Thu Dec 31 2009 Martin Sourada - 0.35.1-1 - New release - improvements to waveform editor - video player rewritten, should fix rhbz#538382 - various bug fixes * Sun Oct 25 2009 Martin Sourada - 0.34.0-1 - New release - supports pulsesink now - new plugin 'textcorrection' - new plugin 'keyframesmanagement' - spell checking plugin completely rewrite - find and replace plugin completely rewrite - libglademm -> Gtk::Builder - new translations - various bug fixes - fix for upstream bug #12649 has been included in tarbal * Sun Jul 26 2009 Fedora Release Engineering - 0.30.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Mon Feb 23 2009 Martin Sourada - 0.30.0-4 - Fix build on rawhide * Thu Dec 11 2008 Martin Sourada - 0.30.0-3 - Apply patch to upstream bug 12649 (lubek) - Various changes to spec file (lubek) * Sat Dec 06 2008 Martin Sourada - 0.30.0-2 - Add intltool to BuildRequires * Sat Dec 06 2008 Martin Sourada - 0.30.0-1 - Drop rhbz #459792 workaround - New upstream release - Each function work around extension system (enable/disable/configure) - Add 'Generate Wavefrom From Video' - Add line break policy option: soft, hard, intelligent (ASS/SSA) - Add 'Wavefrom & Media' filter in the wavefrom dialog - The subtitle format system was completely rewritten - Update the UI when files are open. - Add option --enable-profiling - New Error Checking tool. - New options to set default document values. - Add "Edit Cell" and "Edit Next Cell". - Another characters coding can be selected if it fails. - Waveform Renderer use now Pango to draw subtitle text. * Mon Aug 25 2008 Martin Sourada - 0.22.3-1 - New upstream release - Don't build with cppunit testing (rhbz #458607) - Workaround rhbz #459792 * Thu Jul 03 2008 Martin Sourada - 0.21.3-1 - New upstream release - Add option -f --file for open a file - Add MimeType in desktop file. - Update Czech translation - Fix: Play/Pause button - Fix: #10494 (upstream) * Thu Jun 19 2008 Martin Sourada - 0.21.2-1 - New upstream release * Wed May 28 2008 Martin Sourada - 0.21.1-3 - Enable unit testing * Tue May 27 2008 Martin Sourada - 0.21.1-2 - Update the icon cache update scriplet to follow the packaging guidelines - Add BR: gstreamer-plugins-good * Tue May 27 2008 Martin Sourada - 0.21.1-1 - Initial Fedora RPM package