%bcond_with systemd

# this package provides libvte-2.91.so
%global abiver 2.91

Summary: An terminal emulator.
Summary(ja): ターミナルエミュレータ
Name: vte3
Version: 0.64.0
Release: 2%{?_dist_release}%{?with_systemd:.systemd}
Group: system
Vendor: Project Vine
Distribution: Vine Linux

License: LGPL
%global         shortver %(echo %{version} | cut -d . -f 1,2)
#Source0:        https://download.gnome.org/sources/vte/%{shortver}/vte-%{version}.tar.xz
Source0:        vte-%{version}.tar.gz

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: meson
BuildRequires: gtk-doc
BuildRequires: gtk3-devel
BuildRequires: gobject-introspection-devel
BuildRequires: ncurses-devel
BuildRequires: gnutls-devel
BuildRequires: vala
BuildRequires: fribidi-devel
BuildRequires: libicu-devel
BuildRequires: pcre2-devel >= 10.21
%if %{with systemd}
BuildRequires: systemd-devel
%endif

%description
VTE is an experimental terminal emulator widget for use with GTK+ 3.0.

%description -l ja
VTE は GTK+3.0 用のターミナルエミュレータウィジェットです。


%package        devel
Summary:        Files needed for developing applications which use vte.
Summary(ja):    VTE を使用したアプリケーションの開発に必要なファイル群
Group:          programming
Requires:       %{name} = %{version}-%{release}
Requires:       gtk3-devel

%description devel
VTE is an experimental terminal emulator widget for use with GTK+ 3.0.  This
package contains the files needed for building applications using VTE.


%package        docs
Summary:        Documentation for %{name}
Summary(ja):    %{name} 用のドキュメント
Group:          documentation
BuildArch:      noarch

%description    docs
This package contains documentation for %{name}.


%package        vala
Summary:        Vala bindings for %{name}
Summary(ja):    %{name} の Vala バインディング
Group:          programming
Requires:       %{name} = %{version}-%{release}
Requires:       vala

%description    vala
Vala bindings for %{name}.


%debug_package


%prep
%setup -q -n vte-%{version}


%build
%meson \
	--libexecdir=%{_libexecdir}/%{name} \
	-Ddocs=true \
%if %{with systemd}
	-D_systemd=true
%else
	-D_systemd=false
%endif
%meson_build


%install
rm -fr $RPM_BUILD_ROOT
%meson_install

%find_lang vte-%{abiver}


%clean
rm -fr $RPM_BUILD_ROOT


%files -f vte-%{abiver}.lang
%defattr(-,root,root)
%license COPYING*
%doc AUTHORS NEWS README*
%doc doc/boxes.txt
%{_sysconfdir}/profile.d/*
%{_bindir}/vte-%{abiver}
%{_libdir}/*.so.*
%{_libdir}/girepository-1.0/*.typelib
%{_libexecdir}/vte3
%if %{with systemd}
%{_userunitdir}/*
%endif

%files devel
%defattr(-,root,root)
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*
%{_datadir}/gir-1.0/*.gir
%dir %{_datadir}/glade
%dir %{_datadir}/glade/catalogs
%{_datadir}/glade/catalogs/*
%dir %{_datadir}/glade/pixmaps
%dir %{_datadir}/glade/pixmaps/hicolor
%dir %{_datadir}/glade/pixmaps/hicolor/16x16/actions
%{_datadir}/glade/pixmaps/hicolor/16x16/actions/*
%dir %{_datadir}/glade/pixmaps/hicolor/16x16
%dir %{_datadir}/glade/pixmaps/hicolor/22x22
%dir %{_datadir}/glade/pixmaps/hicolor/22x22/actions
%{_datadir}/glade/pixmaps/hicolor/22x22/actions/*

%files docs
%defattr(-,root,root)
%{_datadir}/gtk-doc/html/vte-%{abiver}

%files vala
%defattr(-,root,root)
%dir %{_datadir}/vala
%dir %{_datadir}/vala/vapi
%{_datadir}/vala/vapi/*


%changelog
* Fri Apr 09 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.64.0-2
- rebuilt with icu69.

* Fri Apr 02 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.64.0-1
- new upstream release.

* Mon Mar 29 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.62.3-1
- new upstream release.
- dropped ldconfig scriptlets.

* Tue May 05 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.60.2-1
- new upstream relese.

* Sun May 20 2018 IWAI, Masaharu <iwaim.sub@gmail.com> 0.52.1-1
- update to 0.52.1

* Mon Jul 18 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.44.2-1
- new upstream release

* Wed Dec 30 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.42.1-2
- rebuild with gnutls-3.4.7

* Sun Nov 01 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.42.1-1
- new upstream release

* Sat May 16 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.40.2-1
- new upstream release

* Sun Mar 29 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.40.0-1
- new upstream release
- add BuildRequires: gnutls-devel

* Mon Dec 22 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.38.3-1
- new upstream release

* Wed Nov 19 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.38.2-1
- new upstream release

* Sun Oct 26 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.38.1-1
- new upstream release
- add BuildRequires: vala-devel, vala-tools

* Sat Jun 28 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.36.3-1
- new upstream release

* Fri May 16 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.36.2-1
- new upstream release

* Sat Mar 29 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.36.0-1
- new upstream release

* Sat Jan 04 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.34.9-2
- rebuild with VineSeed environment

* Sat Oct 26 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.34.9-1
- new upstream release

* Mon Jul 15 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.34.7-1
- new upstream release

* Sat May 18 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.34.5-1
- new upstream release

* Sun Apr 21 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.34.3-1
- new upstream release
- create %%{name}-docs subpackage

* Wed Nov 14 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.34.2-1
- new upstream release

* Tue Oct 16 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.34.1-1
- new upstream release

* Sat Sep 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.34.0-1
- new upstream release

* Tue Jun 05 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.32.2-1
- new upstream release

* Sun Apr 22 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.32.1-1
- new upstream release

* Fri Oct 21 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.30.1-1
- new upstream release

* Thu Sep 29 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.30.0-1
- new upstream release
- add BuildRequires: gobject-introspection-devel

* Sat Sep 03 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.28.2-1
- new upstream release

* Mon Aug 15 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.28.1-1
- initial build for Vine Linux
