%define api 1 %define major 0 %define libname %mklibname %{name} %{api} %{major} %define gtk2libname %mklibname %{name}-gtk2_ %{api} %{major} %define gtk3libname %mklibname %{name}-gtk3_ %{api} %{major} %define develname %mklibname %{name} -d %define url_ver %(echo %{version} | cut -d. -f1,2) %bcond_with gtk2 Summary: Xfce's freedesktop.org compliant menu library Name: garcon Version: 0.6.4 Release: %mkrel 1 License: GPLv2+ Group: Graphical desktop/Xfce Url: https://www.xfce.org Source0: https://archive.xfce.org/src/libs/garcon/%{url_ver}/%{name}-%{version}.tar.bz2 BuildRequires: intltool BuildRequires: xfce4-dev-tools BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(libxfce4util-1.0) BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(libxfce4ui-2) #BuildRequires: pkgconfig(gtk-doc) %if %{with gtk2} BuildRequires: pkgconfig(gtk+-2.0) BuildRequires: pkgconfig(libxfce4ui-1) %endif %description Garcon is an implementation of the freedesktop.org menu specification replacing the former Xfce menu library libxfce4menu. It is based on GLib/GIO only and aims at covering the entire specification except for legacy menus. %package data Summary: Locale and data files for %{name} Group: Graphical desktop/Xfce Conflicts: %{_lib}garcon0 < 0.2.0 #Added 11/2012 (wally) Obsoletes: %{name} < 0.2.0-2 %description data This package contains the common data files and localizations for garcon, Xfce's freedesktop.org menu implementation. %package -n %{libname} Summary: Xfce's freedesktop.org menu implementation Group: System/Libraries Requires: %{name}-data >= %{version}-%{release} #Added 04/2012 (wally) Obsoletes: %{_lib}garcon0 < 0.2.0 %description -n %{libname} Garcon is an implementation of the freedesktop.org menu specification replacing the former Xfce menu library libxfce4menu. It is based on GLib/GIO only and aims at covering the entire specification except for legacy menus. %package -n %{gtk2libname} Summary: Common GTK library for Xfce's freedesktop.org menu implementation Group: System/Libraries %description -n %{gtk2libname} Garcon is an implementation of the freedesktop.org menu specification replacing the former Xfce menu library libxfce4menu. It is based on GLib/GIO only and aims at covering the entire specification except for legacy menus. %package -n %{gtk3libname} Summary: Common GTK3 library for Xfce's freedesktop.org menu implementation Group: System/Libraries %description -n %{gtk3libname} Garcon is an implementation of the freedesktop.org menu specification replacing the former Xfce menu library libxfce4menu. It is based on GLib/GIO only and aims at covering the entire specification except for legacy menus. %package -n %{develname} Summary: Development files for %{name} Group: Development/C Requires: %{libname} = %{version}-%{release} %if %{with gtk2} Requires: %{gtk2libname} = %{version}-%{release} %endif Requires: %{gtk3libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} Provides: lib%{name}-devel = %{version}-%{release} %description -n %{develname} Development files and headers for %{name}. %prep %setup -q %autopatch -p1 %build %xdt_autogen %configure2_5x \ --disable-static \ --enable-gtk-doc=no %make %install %makeinstall_std # this file is in %{_real_vendor}-xfce-config package rm -rf %{buildroot}%{_sysconfdir}/xdg/menus/xfce-applications.menu # don't ship .la find %{buildroot} -name "*.la" -delete %find_lang %{name} %files data -f %{name}.lang %{_datadir}/desktop-directories/xfce-*.directory %files -n %{libname} %{_libdir}/lib%{name}-%{api}.so.%{major}{,.*} %if %{with gtk2} %files -n %{gtk2libname} %{_libdir}/lib%{name}-gtk2-%{api}.so.%{major}{,.*} %endif %files -n %{gtk3libname} %{_libdir}/lib%{name}-gtk3-%{api}.so.%{major}{,.*} %files -n %{develname} %doc AUTHORS HACKING NEWS README STATUS TODO %doc %{_datadir}/gtk-doc/html/%{name}/ %{_includedir}/%{name}*/ %{_libdir}/lib%{name}*-%{api}.so %{_libdir}/pkgconfig/%{name}*-%{api}.pc