LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File software-center.spec of Package software-center (Project GNOME:Ayatana)

#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define _default_patch_fuzz 99999
%define _name   softwarecenter

Name:           software-center
Version:        5.2.2
Release:        1
License:        GPL-3.0 and LGPL-3.0
Summary:        Appstream Software Center
Url:            http://gitorious.org/appstream/software-center
Group:          System/GUI/GNOME
Source:         %{name}_%{version}.tar.gz
# Potential application icon file. Upstream links to a GNOME icon theme link.
Source1:        %{name}.svg
Source2:        setup.py
Source99:       %{name}-rpmlintrc
# PATCH-FIX-OPENSUSE - software-center-opensuse-setup-fixes.patch nmarques@opensuse.org -- Use unbranded and minor changes on .desktop. Change bug reporting to bnc
Patch0:         %{name}-opensuse-setup-fixes.patch
# PATCH-FIX-OPENSUSE - software-center-alexef.patch alex@rosedu.org -- FIXME
Patch1:         software-center-alexef.patch
# PATCH-FIX-OPENSUSE - software-center-nochannels.patch prusnak@opensuse.org -- FIXME - don't install channel file
Patch2:         software-center-nochannels.patch
BuildRequires:  PackageKit
#BuildRequires:  dbus-1-python
BuildRequires:  fdupes
BuildRequires:  gettext
# Directory ownership, we install icons in hicolor
BuildRequires:  hicolor-icon-theme
BuildRequires:  intltool
BuildRequires:  po4a
BuildRequires:  python-distutils-extra
BuildRequires:  python-gobject
BuildRequires:  python-xapian
BuildRequires:  python-xdg
BuildRequires:  python-xml
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(python)
Requires:       PackageKit >= 0.6.16
Requires:       python-gobject
Requires:       python-lxml
Requires:       piston-mini-client
Requires:       pywebkitgtk
Requires:       python-xapian
Requires:       python-xdg
Requires:       python-xml
Requires:       zeitgeist
Recommends:     %{name}-backend-appstream
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
Software Center is a utility for software management. Current versions allow
easy finding and installing of software. In addition to that it supports
software purchases, includes a recommendation feature.

%package backend-apt
Summary:        Apt backend for Software center
Group:          System/Packages
Requires:       %{name} = %{version}

%description backend-apt
Software Center is a utility for software management. Current versions allow
easy finding and installing of software. In addition to that it supports
software purchases, includes a recommendation feature.

%package backend-appstream
Summary:        Appstream backend for Software center
Group:          System/Packages
Requires:       %{name} = %{version}

%description backend-appstream
Software Center is a utility for software management. Current versions allow
easy finding and installing of software. In addition to that it supports
software purchases, includes a recommendation feature.

%lang_package

%prep
%setup -q -n %{name}-%{version}
%patch0 -p1
%patch1 -p1
#patch2 -p1

%build
rm setup.py
cp %{SOURCE2} setup.py
python setup.py build

%install
python setup.py install \
    --root=%{buildroot} \
    --prefix=%{_prefix}
%find_lang %{name}
# appdata.xml
install -D -m 0644 contrib/appstream-xml/appdata.xml \
       %{buildroot}%{_datadir}/app-info/xmls/appdata.xml
# Move the scripts to %{_datadir}/software-center and relink them again later
mv %{buildroot}%{_prefix}/*bin/* %{buildroot}%{_datadir}/%{name}
mkdir -p %{buildroot}%{_sbindir}
pushd %{buildroot}%{_bindir}
ln -s ../share/%{name}/%{name} %{name}
popd
pushd %{buildroot}%{_sbindir}
ln -s ../share/%{name}/update-%{name} update-%{name}
popd
# Replace ubuntu branded icons by a generic scalable icon in hicolor
pushd %{buildroot}%{_datadir}/icons/hicolor
rm */apps/softwarecenter.*
install -D -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
popd
# Desktop entry
if [ -f %{buildroot}%{_datadir}/applications/unbranded-%{name}.desktop ]; then
   mv %{buildroot}%{_datadir}/applications/unbranded-%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop
fi
%suse_update_desktop_file %{name}
# Wiping apport stuff
if [ -d %{buildroot}%{_datadir}/apport ]; then
   rm -r %{buildroot}%{_datadir}/apport
fi
# Wiping *info files
rm %{buildroot}%{python_sitelib}/*.egg-info
%fdupes %{buildroot}%{python_sitelib}
%fdupes %{buildroot}%{_datadir}

%post
%icon_theme_cache_post
%desktop_database_post
# ??
#/sbin/service dbus restart
#%{_bindir}/update-software-center --use-packagekit --appstream-only

%postun
%icon_theme_cache_postun
%desktop_database_postun

%files
%defattr(-,root,root)
%doc AUTHORS COPYING COPYING.LGPL
%dir %{_sysconfdir}/dbus-1
%dir %{_sysconfdir}/dbus-1/system.d
# E: suse-dbus-unauthorized-service
%config %{_sysconfdir}/dbus-1/system.d/com.ubuntu.SoftwareCenter.conf
%{_bindir}/software-center
%{_sbindir}/update-software-center
%{python_sitelib}/%{_name}/
%{_datadir}/app-install/
%{_datadir}/applications/software-center.desktop
%{_datadir}/icons/hicolor/
%{_datadir}/%{name}/

%files backend-appstream
%defattr(-,root,root)
%dir %{_datadir}/app-info
%{_datadir}/app-info/xmls/

%files backend-apt
%defattr(-,root,root)
%{_datadir}/apt-xapian-index/

%files lang -f %{name}.lang
%defattr(-,root,root)
%dir %{_datadir}/gnome
%dir %{_datadir}/gnome/help
%dir %{_datadir}/omf

%changelog