LogoopenSUSE Build Service > Projects
Sign Up | Log In

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

#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

%define fdupes(s) \
 _target=""; \
 _symlinks=0; \
 %{-s:_symlinks=1;} \
 fdupes -q -n -r %1 | \
  while read _file; do \
    if test -z "$_target" ; then \
      _target="$_file"; \
    else \
      if test -z "$_file" ; then \
        _target=""; \
        continue ; \
      fi ; \
      if test "$_symlinks" = 1; then \
        ln -sf "${_target#%{buildroot}}" "$_file"; \
      else \
        ln -f "$_target" "$_file"; \
      fi ;\
    fi ; \
 done \
%{nil}


%define _default_patch_fuzz 99999
%define _name   softwarecenter

Name:           appstream-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}.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:  pygobject2 pygobject3
BuildRequires:  xapian-bindings-python
BuildRequires:  pyxdg
BuildRequires:  python-lxml
BuildRequires:  PackageKit-yum
BuildRequires:  python-distutils-extra
BuildRequires:  python <= 2.9
BuildRequires:  po4a
BuildRequires:  gtk2-ubuntu-devel
BuildRequires:  libXfixes-ubuntu-devel
BuildRequires:  xorg-x11-proto-ubuntu-devel
BuildRequires:  python-setuptools
Requires:       PackageKit >= 0.6.16
Requires:       pygobject2
Requires:       pygobject3
Requires:       python-lxml
Requires:       piston-mini-client
Requires:       pywebkitgtk
Requires:       xapian-bindings-python
Requires:       pyxdg
Requires:       pyxml
Requires:       zeitgeist
Requires:       xapian-core
Requires:       xapian-bindings
Requires:       %{name}-backend-appstream
Requires:       %{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.

%package lang
Summary:        Language files for Software center
Group:          System/Packages
Requires:       %{name} = %{version}

%description lang
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.

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

%build
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
# 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


%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
%{_datadir}/gnome/help/software-center/*
%{_datadir}/omf/software-center/software-center-C.omf

%changelog