Name:           glade
Version:        3.40.0
Release:        1
Summary:        User Interface Designer for GTK+
License:        GPLv2+ and LGPLv2+
URL:            https://glade.gnome.org/
Source0:        https://download.gnome.org/sources/glade/3.40/glade-%{version}.tar.xz

BuildRequires:  desktop-file-utils docbook-style-xsl gettext gtk3-devel intltool
BuildRequires:  itstool libxml2-devel pygobject3-devel python3-devel webkit2gtk3-devel
BuildRequires:  meson gjs-devel gcc gtk-doc
BuildRequires:  /usr/bin/appstream-util /usr/bin/xsltproc

Requires:       %{name}-libs = %{version}-%{release}

Obsoletes:      glade3 < 1:3.11.0-3

%description
Glade is a RAD tool to enable quick and easy development of user interfaces for
the GTK+ toolkit and the GNOME desktop environment.

The user interfaces designed in Glade are saved as XML, which can be used in
numerous programming languages including C, C++, C#, Vala, Java, Perl, Python,
and others.

%package        libs
Summary:        Widget library for Glade UI designer
Obsoletes:      glade3-libgladeui < 1:3.11.0-3

%description    libs
Widget library for Glade UI designer

%package devel
Summary:        Development files for %{name}
Requires:       %{name} = %{version}-%{release}
Requires:       %{name}-libs = %{version}-%{release}
Obsoletes:      glade3-libgladeui-devel < 1:3.11.0-3

%description    devel
The %{name}-devel package contains libraries and header files for
developing applications that use Glade widget library.

%package_help

%prep
%autosetup -n %{name}-%{version}

%build
%meson -Dgtk_doc=true
%meson_build


%install
%meson_install

%find_lang glade --with-gnome

%check
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/org.gnome.Glade.appdata.xml
desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Glade.desktop

%files
%defattr(-,root,root)
%license COPYING*
%{_bindir}/glade
%{_bindir}/glade-previewer
%{_datadir}/locale/*
%{_datadir}/applications/org.gnome.Glade.desktop
%{_datadir}/help/*
%{_datadir}/icons/*
%{_datadir}/metainfo/org.gnome.Glade.appdata.xml

%files libs
%defattr(-,root,root)
%{_libdir}/libgladeui-2.so.*
%dir %{_libdir}/glade/modules/
%{_libdir}/glade/modules/*.so
%dir %{_libdir}/girepository-1.0
%{_libdir}/girepository-1.0/Gladeui-2.0.typelib
%{_datadir}/glade/

%files devel
%defattr(-,root,root)
%doc %{_datadir}/gtk-doc/
%{_includedir}/libgladeui-2.0/
%{_libdir}/libgladeui-2.so
%{_libdir}/pkgconfig/gladeui-2.0.pc
%{_datadir}/gir-1.0/Gladeui-2.0.gir
%{_datadir}/gettext/its/glade-catalog.its
%{_datadir}/gettext/its/glade-catalog.loc

%files help
%doc AUTHORS NEWS
%{_mandir}/man1/*

%changelog
* Wed Aug 02 2023 haomimi <haomimi@uniontech.com> - 3.40.0-1
- update to 3.40.0

* Mon Mar 14 2022 zhanzhimin <zhanzhimin@h-partners.com> - 3.36.0-2
- delete old so file

* Thu Jul 23 2020 hanhui <hanhui15@huawei.com> - 3.36.0-1
- update to 3.36.0

* Fri Nov 8 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.22.1-5
- Type:bugfix
- Id:NA
- SUG:NA
- DESC:add libs package

* Sat Oct 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 3.22.1-4
- Package init

