7119fbf
%global _terminals gnome-terminal mate-terminal xfce4-terminal lxterminal qterminal qterminal-qt5 terminology yakuake fourterm roxterm lilyterm termit xterm mrxvt
7119fbf
7119fbf
Name:           deepin-terminal
be4ee51
Version:        2.9.2
7119fbf
Release:        1%{?dist}
7119fbf
Summary:        Default terminal emulation application for Deepin
7119fbf
License:        GPLv3
7119fbf
URL:            https://github.com/linuxdeepin/deepin-terminal
7119fbf
Source0:        %{url}/archive/%{version}/%{name}-%{version}.tar.gz
2c0bbfa
Patch0:         %{name}_unbundle_vte.patch
7119fbf
7119fbf
BuildRequires:  cmake
7119fbf
BuildRequires:  gettext
b29de3d
BuildRequires:  vala-devel
b29de3d
BuildRequires:  pkgconfig(fontconfig)
b29de3d
BuildRequires:  pkgconfig(gtk+-3.0)
b29de3d
BuildRequires:  pkgconfig(gee-0.8)
b29de3d
BuildRequires:  pkgconfig(json-glib-1.0)
b29de3d
BuildRequires:  pkgconfig(libsecret-1)
b29de3d
BuildRequires:  pkgconfig(libwnck-3.0)
be4ee51
BuildRequires:  pkgconfig(librsvg-2.0)
b29de3d
BuildRequires:  pkgconfig(vte-2.91)
7119fbf
# right-click menu style
7119fbf
Requires:       deepin-menu
7119fbf
# run command by create_from_commandline
7119fbf
Requires:       deepin-shortcut-viewer
7119fbf
Requires:       expect
7119fbf
Requires:       xdg-utils
7119fbf
Recommends:     deepin-manual
be4ee51
Recommends:     zssh
7119fbf
Requires:       %{name}-data = %{version}-%{release}
7119fbf
7119fbf
%description
7119fbf
Default terminal emulation application for Deepin.
7119fbf
7119fbf
%package data
7119fbf
Summary:        Data files of Deepin Terminal
7119fbf
BuildArch:      noarch
7119fbf
Requires:       hicolor-icon-theme
7119fbf
7119fbf
%description data
7119fbf
The %{name}-data package provides shared data for Deepin Terminal.
7119fbf
7119fbf
%prep
7119fbf
%setup -q
2c0bbfa
%patch0 -p1 -b .unbundle_vte
7119fbf
sed -i 's|return __FILE__;|return "%{_datadir}/%{name}/project_path.c";|' project_path.c
be4ee51
sed -i 's|/usr/lib/%{name}/zssh|%{_bindir}/zssh|' ssh_login.sh
be4ee51
sed -i '/ssh_login/s|lib|libexec|' lib/utils.vala
be4ee51
sed -i 's|2.7|2.9|' lib/constant.vala
7119fbf
7119fbf
# remove es_419 locale
7119fbf
rm -rf po/es_419/
7119fbf
sed -i '/es_419/d' deepin-terminal.desktop
7119fbf
7119fbf
%build
7119fbf
%cmake -DCMAKE_BUILD_TYPE=Release
7119fbf
%make_build
7119fbf
7119fbf
%install
7119fbf
%make_install
7119fbf
7119fbf
%find_lang %{name}
7119fbf
7119fbf
%preun
7119fbf
if [ $1 -eq 0 ]; then
7119fbf
  %{_sbindir}/alternatives --remove x-terminal-emulator %{_bindir}/%{name}
7119fbf
fi
7119fbf
7119fbf
%post
7119fbf
if [ $1 -ge 1 ]; then
7119fbf
  %{_sbindir}/alternatives --install %{_bindir}/x-terminal-emulator \
7119fbf
    x-terminal-emulator %{_bindir}/%{name} 20
7119fbf
fi
7119fbf
7119fbf
%triggerin -- konsole5 %_terminals
7119fbf
if [ $1 -ge 1 ]; then
7119fbf
  PRI=20
7119fbf
  for i in konsole %{_terminals}; do
7119fbf
    PRI=$((PRI-1))
7119fbf
    test -x %{_bindir}/$i && \
7119fbf
    %{_sbindir}/alternatives --install %{_bindir}/x-terminal-emulator \
7119fbf
      x-terminal-emulator %{_bindir}/$i $PRI
7119fbf
  done
7119fbf
fi
7119fbf
7119fbf
%triggerpostun -- konsole5 %_terminals
7119fbf
if [ $2 -eq 0 ]; then
7119fbf
  for i in konsole %{_terminals}; do
7119fbf
    test -x %{_bindir}/$i || \
7119fbf
    %{_sbindir}/alternatives --remove x-terminal-emulator %{_bindir}/$i &>/dev/null ||:
7119fbf
  done
7119fbf
fi
7119fbf
7119fbf
%files
7119fbf
%doc README.md
7119fbf
%license LICENSE
7119fbf
%{_bindir}/%{name}
be4ee51
%{_libexecdir}/%{name}/ssh_login.sh
7119fbf
7119fbf
%files data -f %{name}.lang
7119fbf
%{_datadir}/%{name}/
7119fbf
%{_datadir}/dman/%{name}/
7119fbf
%{_datadir}/icons/hicolor/*/apps/%{name}*
7119fbf
%{_datadir}/applications/%{name}.desktop
7119fbf
7119fbf
%changelog
be4ee51
* Thu Dec  7 2017 mosquito <sensor.wen@gmail.com> - 2.9.2-1
be4ee51
- Update to 2.9.2
be4ee51
be4ee51
* Wed Nov 15 2017 mosquito <sensor.wen@gmail.com> - 2.7.6-1
be4ee51
- Update to 2.7.6
be4ee51
be4ee51
* Fri Oct 27 2017 mosquito <sensor.wen@gmail.com> - 2.7.4-1
be4ee51
- Update to 2.7.4
be4ee51
be4ee51
* Mon Oct 23 2017 mosquito <sensor.wen@gmail.com> - 2.7.2-1
be4ee51
- Update to 2.7.2
be4ee51
846ff28
* Tue Oct 17 2017 mosquito <sensor.wen@gmail.com> - 2.7-1
846ff28
- Update to 2.7
846ff28
2c0bbfa
* Mon Oct 16 2017 mosquito <sensor.wen@gmail.com> - 2.6.4-1
2c0bbfa
- Update to 2.6.4
2c0bbfa
- Unbundle vte
2c0bbfa
2c0bbfa
* Thu Sep 21 2017 mosquito <sensor.wen@gmail.com> - 2.6.1-1
2c0bbfa
- Update to 2.6.1
2c0bbfa
b29de3d
* Tue Aug 29 2017 mosquito <sensor.wen@gmail.com> - 2.5.5-1
b29de3d
- Update to 2.5.5
b29de3d
b29de3d
* Mon Aug 21 2017 mosquito <sensor.wen@gmail.com> - 2.5.3-1
b29de3d
- Update to 2.5.3
b29de3d
7119fbf
* Mon Jul 31 2017 mosquito <sensor.wen@gmail.com> - 2.5.2-1
7119fbf
- Update to 2.5.2
7119fbf
b29de3d
* Fri Jul 21 2017 mosquito <sensor.wen@gmail.com> - 2.5.1-2.git82c4a12
7119fbf
- Split package
7119fbf
b29de3d
* Tue Jul 18 2017 mosquito <sensor.wen@gmail.com> - 2.5.1-1.git82c4a12
7119fbf
- Update to 2.5.1
7119fbf
b29de3d
* Fri Jul 14 2017 mosquito <sensor.wen@gmail.com> - 2.5.0-1.git439ab57
7119fbf
- Update to 2.5.0
7119fbf
b29de3d
* Fri May 19 2017 mosquito <sensor.wen@gmail.com> - 2.4.2-1.git76b20cd
7119fbf
- Update to 2.4.2
7119fbf
b29de3d
* Tue Mar  7 2017 mosquito <sensor.wen@gmail.com> - 2.2.2-1.git3ec5488
7119fbf
- Update to 2.2.2
7119fbf
b29de3d
* Sat Feb 11 2017 mosquito <sensor.wen@gmail.com> - 2.1.12-1.git4f7069e
7119fbf
- Update to 2.1.12
7119fbf
b29de3d
* Sun Feb  5 2017 mosquito <sensor.wen@gmail.com> - 2.1.9-3.git1ded038
7119fbf
- Rewrite Req depends
7119fbf
b29de3d
* Sat Jan 28 2017 mosquito <sensor.wen@gmail.com> - 2.1.9-2.git1ded038
7119fbf
- Add trigger for terminal emulator
7119fbf
b29de3d
* Sat Jan 28 2017 mosquito <sensor.wen@gmail.com> - 2.1.9-1.git1ded038
7119fbf
- Update to 2.1.9
7119fbf
b29de3d
* Sun Jan 22 2017 mosquito <sensor.wen@gmail.com> - 2.1.7-2.git32f96be
7119fbf
- Add x-terminal-emulator command for dde-file-manager
7119fbf
b29de3d
* Tue Jan 17 2017 mosquito <sensor.wen@gmail.com> - 2.1.7-1.git32f96be
7119fbf
- Update to 2.1.7
7119fbf
7119fbf
* Thu Jan 12 2017 Jaroslav <cz.guardian@gmail.com> Stepanek 2.1.6-1
7119fbf
- Updated to version 2.1.6
7119fbf
7119fbf
* Thu Dec 15 2016 Jaroslav <cz.guardian@gmail.com> Stepanek 2.1.5-2
7119fbf
- Fixed icon path
7119fbf
7119fbf
* Mon Dec 12 2016 Jaroslav <cz.guardian@gmail.com> Stepanek 2.1.5-1
7119fbf
- Initial package build