xfce4-panel/xfce4-panel.spec
Luke Yue aa94c11bf5 add marcos to fix build
Signed-off-by: Luke Yue <lukedyue@gmail.com>
2020-09-18 21:52:09 +08:00

135 lines
4.1 KiB
RPMSpec

%global xfceversion 4.14
# Don't check .so files in /lib64/xfce4/panel/plugins
%global __provides_exclude_from ^%{_libdir}/xfce4/panel/plugins/.*\\.so$
%global _with_vala 0
Name: xfce4-panel
Version: 4.14.4
Release: 2
Summary: panel for Xfce4 desktop environment
License: GPLv2+ and LGPLv2+
#Group: Development/Libraries
URL: http://www.xfce.org/
Source0: http://archive.xfce.org/src/xfce/%{name}/%{xfceversion}/%{name}-%{version}.tar.bz2
# clock icon taken from system-config-date, license is GPLv2+
Source1: xfce4-clock.png
Source2: xfce4-clock.svg
# patch from Debian
Patch1: 02_pager-size-for-viewport.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
#BuildArch: noarch
BuildRequires: gcc-c++
BuildRequires: gtk3-devel
BuildRequires: libxfce4ui-devel >= %{xfceversion}
BuildRequires: xfconf-devel >= %{xfceversion}
BuildRequires: garcon-devel >= 0.6.0
BuildRequires: libxml2-devel >= 2.4.0
BuildRequires: startup-notification-devel
BuildRequires: exo-devel >= 0.3.93
BuildRequires: libwnck3-devel >= 3.14
BuildRequires: gettext
BuildRequires: intltool
BuildRequires: desktop-file-utils
BuildRequires: gtk-doc
BuildRequires: gobject-introspection-devel
%if %{_with_vala}
BuildRequires: vala
%endif
%description
This package includes the panel for the Xfce desktop environment.
%package devel
Summary: Xfce4 panel development files
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig
Requires: libxfce4util-devel >= %{xfceversion}
Requires: libxfce4ui-devel >= %{xfceversion}
%description devel
This package includes the header files you will need to build
plugins for xfce4-panel.
%prep
%setup -q
%patch1 -p1 -b .default
# Fix icon in 'Add new panel item' dialog
sed -i 's|Icon=office-calendar|Icon=xfce4-clock|g' plugins/clock/clock.desktop.in.in
%build
%configure \
%if !%{_with_vala}
--enable-vala=no \
%endif
--enable-gtk-doc \
--disable-static
# Remove rpaths
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
# The LD_LIBRARY_PATH hack is needed for --enable-gtk-doc
# because lt-libxfce4panel-scan is linked against libxfce4panel
export LD_LIBRARY_PATH="`pwd`/libxfce4panel/.libs"
%make_build
%install
%make_install
# fix permissions for installed libs
chmod 755 %{buildroot}%{_libdir}/*.so
find %{buildroot} -name '*.la' -exec rm -f {} ';'
# remove duplicate docs
rm -f %{buildroot}%{_docdir}/xfce4-panel/README.gtkrc-2.0
# FIXME: We need to own these dirs until all plugins are ported to Xfce 4.8
mkdir -p %{buildroot}%{_libexecdir}/xfce4/panel-plugins
mkdir -p %{buildroot}%{_libdir}/xfce4/panel-plugins
mkdir -p %{buildroot}%{_datadir}/xfce4/panel-plugins
%find_lang %{name}
desktop-file-validate %{buildroot}/%{_datadir}/applications/panel-desktop-handler.desktop
desktop-file-validate %{buildroot}/%{_datadir}/applications/panel-preferences.desktop
# install additional icons
install -pm 0644 %{SOURCE1} %{buildroot}%{_datadir}/icons/hicolor/48x48/apps/
install -pm 0644 %{SOURCE2} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/
%files -f %{name}.lang
%license COPYING
%doc AUTHORS ChangeLog NEWS README docs/README.gtkrc-2.0
%config(noreplace) %{_sysconfdir}/xdg/xfce4/panel/default.xml
%{_bindir}/*
%{_libdir}/libxfce4panel-*.so.*
%{_libdir}/xfce4/panel/
%{_libdir}/girepository-1.0/libxfce4panel-2.0.typelib
%{_datadir}/gir-1.0/libxfce4panel-2.0.gir
%{_datadir}/icons/hicolor/*/*/*
%{_datadir}/xfce4/panel/
%{_datadir}/applications/*.desktop
%if %{_with_vala}
%{_datadir}/vala/vapi/libxfce4panel-2.0.deps
%{_datadir}/vala/vapi/libxfce4panel-2.0.vapi
%endif
# FIXME: Remove these when no longer needed
%dir %{_libexecdir}/xfce4/panel-plugins/
%dir %{_libdir}/xfce4/panel-plugins
%dir %{_datadir}/xfce4/panel-plugins
%files devel
%{_libdir}/pkgconfig/*
%{_libdir}/libxfce4panel-*.so
%doc %{_datadir}/gtk-doc/html/libxfce4panel-*/
%{_includedir}/xfce4/libxfce4panel-*/
%changelog
* Thu Jul 9 2020 Dillon Chen <dillon.chen@turbolinux.com.cn> - 4.14.4-1
- Init package