Код: Выделить всё
Ошибки сборки пакетов:
Файл должен начинаться с "/": GPLv3
Файл должен начинаться с "/": LICENSE
Файл должен начинаться с "/": GPLv3
Файл должен начинаться с "/": LICENSE*
Файл должен начинаться с "/": GPLv3
Файл должен начинаться с "/": LICENSE
?%package -n libappmenu-gtk-parser-devel
Код: Выделить всё
#
# spec file for package appmenu-gtk-module
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define sover 0
Name: appmenu-gtk-module
Version: 0.6.1
Release: 1
Summary: GTK+ module for exporting old-style menus as GMenuModels
License: GPLv3
Group: Graphical desktop/KDE
URL: https://github.com/rilian-la-te/vala-panel-appmenu
Source: https://github.com/rilian-la-te/vala-panel-appmenu/releases/download/%{version}/appmenu-gtk-module.tar.gz
BuildRequires: cmake >= 2.8.0
BuildRequires: pkgconfig
BuildRequires: systemd
BuildRequires: pkgconfig(gtk+-2.0) >= 2.24.0
BuildRequires: pkgconfig(gtk+-3.0) >= 3.2.0
BuildRequires: pkgconfig(x11)
%description
Many applications implement menus as GtkMenuShells and GtkMenuItems
and aren't looking to migrate to the newer GMenuModel API.
This GTK+ module watches for these types of menus and exports the
appropriate GMenuModel implementation.
%package -n libappmenu-gtk-parser-devel
Summary: Common development-files for libappmenu-gtk{2,3}-parser
BuildRequires: gtk-doc
BuildArch: noarch
%description -n libappmenu-gtk-parser-devel
This package contains common headers and documentation for
libappmenu-gtk{2,3}-parser.
%package -n libappmenu-gtk2-parser%{sover}
Summary: Gtk2MenuShell to GMenuModel parser
%description -n libappmenu-gtk2-parser%{sover}
This library converts Gtk2MenuShells into GMenuModels.
%package -n libappmenu-gtk2-parser-devel
Summary: Development-files for libappmenu-gtk2-parser
Requires: libappmenu-gtk-parser-devel = %{version}-%{release}
Requires: libappmenu-gtk2-parser%{?_isa} = %{version}-%{release}
%description -n libappmenu-gtk2-parser-devel
This package contains development-files for libappmenu-gtk2-parser.
%package -n libappmenu-gtk3-parser%{sover}
Summary: GtkMenuShell to GMenuModel parser
%description -n libappmenu-gtk3-parser%{sover}
This library converts GtkMenuShells into GMenuModels.
%package -n libappmenu-gtk3-parser-devel
Summary: Development-files for libappmenu-gtk3-parser
Requires: libappmenu-gtk-parser-devel = %{version}-%{release}
Requires: libappmenu-gtk3-parser%{?_isa} = %{version}-%{release}
%description -n libappmenu-gtk3-parser-devel
This package contains development-files for libappmenu-gtk3-parser.
%package -n appmenu-gtk2-module
Summary: GtkMenuShell D-Bus exporter (GTK+ 2)
Requires: appmenu-gtk-module = %{version}-%{release}
Provides: appmenu-gtk = %{version}-%{release}
%description -n appmenu-gtk2-module
This GTK 2 module exports GtkMenuShells over D-Bus.
%package -n appmenu-gtk3-module
Summary: GtkMenuShell D-Bus exporter (GTK+ 3)
Requires: appmenu-gtk-module = %{version}-%{release}
Provides: appmenu-gtk3 = %{version}-%{release}
%description -n appmenu-gtk3-module
This GTK 3 module exports GtkMenuShells over D-Bus.
%prep
%setup -q -n appmenu-gtk-module
cat > %{name}.sh << EOF
if [ -n "$GTK_MODULES" ]; then
GTK_MODULES="${GTK_MODULES}:appmenu-gtk-module"
else
GTK_MODULES="appmenu-gtk-module"
fi
if [ -z "$UBUNTU_MENUPROXY" ]; then
UBUNTU_MENUPROXY=1
fi
export GTK_MODULES
export UBUNTU_MENUPROXY
EOF
cat > %{name}.csh << EOF
if [ -n "$GTK_MODULES" ]; then
GTK_MODULES="${GTK_MODULES}:appmenu-gtk-module"
else
GTK_MODULES="appmenu-gtk-module"
fi
if [ -z "$UBUNTU_MENUPROXY" ]; then
UBUNTU_MENUPROXY=1
fi
export GTK_MODULES
export UBUNTU_MENUPROXY
EOF
%build
%cmake
make %{?_smp_mflags}
%install
%makeinstall_std -C build
# Setup systemd.
mkdir -p %{buildroot}%{_userunitdir}/default.target.wants
ln -s \
%{_userunitdir}/%{name}.service \
%{buildroot}%{_userunitdir}/default.target.wants/%{name}.service
install -Dpm 0644 %{name}.sh %{buildroot}%{_sysconfdir}/profile.d/%{name}.sh
install -Dpm 0644 %{name}.csh %{buildroot}%{_sysconfdir}/profile.d/%{name}.csh
# Remove unneeded files
rm -rf %{buildroot}%{_datadir}/locale/
%post -n libappmenu-gtk2-parser%{sover} -p /sbin/ldconfig
%postun -n libappmenu-gtk2-parser%{sover} -p /sbin/ldconfig
%post -n libappmenu-gtk3-parser%{sover} -p /sbin/ldconfig
%postun -n libappmenu-gtk3-parser%{sover} -p /sbin/ldconfig
%postun
if [ $1 -eq 0 ] ; then
%{_bindir}/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
fi
%posttrans
%{_bindir}/glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%postun -n appmenu-gtk2-module
%{_bindir}/gtk-query-immodules-2.0-%{__isa_bits} --update-cache &> /dev/null || :
%post -n appmenu-gtk2-module
if [ $1 -eq 1 ] ; then
%{_bindir}/gtk-query-immodules-2.0-%{__isa_bits} --update-cache &> /dev/null || :
fi
%postun -n appmenu-gtk3-module
%{_bindir}/gtk-query-immodules-3.0-%{__isa_bits} --update-cache &> /dev/null || :
%post -n appmenu-gtk3-module
if [ $1 -eq 1 ] ; then
%{_bindir}/gtk-query-immodules-3.0-%{__isa_bits} --update-cache &> /dev/null || :
fi
%files -n libappmenu-gtk-parser-devel
%{_includedir}/appmenu-gtk-parser
%files -n libappmenu-gtk2-parser%{sover}
%license LICENSE*
%{_libdir}/libappmenu-gtk2-parser.so.%{sover}*
%files -n libappmenu-gtk2-parser-devel
%{_libdir}/libappmenu-gtk2-parser.so
%{_libdir}/pkgconfig/appmenu-gtk2-parser.pc
%files -n libappmenu-gtk3-parser%{sover}
%license LICENSE
%{_libdir}/libappmenu-gtk3-parser.so.%{sover}*
%files -n libappmenu-gtk3-parser-devel
%{_libdir}/libappmenu-gtk3-parser.so
%{_libdir}/pkgconfig/appmenu-gtk3-parser.pc
%files
%license LICENSE
%config %{_sysconfdir}/profile.d/%{name}.*
%{_datadir}/glib-2.0/schemas/*
%{_userunitdir}/appmenu-gtk-module.service
%dir %{_userunitdir}/default.target.wants
%{_userunitdir}/default.target.wants/appmenu-gtk-module.service
%files -n appmenu-gtk2-module
%{_libdir}/gtk-2.0/modules/libappmenu-gtk-module.so
%files -n appmenu-gtk3-module
%{_libdir}/gtk-3.0/modules/libappmenu-gtk-module.so
%changelog
* Mon Mar 5 2018 cornelis@solcon.nl
- Inital package (based on the spec file by Konstantin (ria.freelander@gmail.com)