]> git.pld-linux.org Git - packages/PackageKit.git/blobdiff - PackageKit.spec
Release 2 (by relup.sh)
[packages/PackageKit.git] / PackageKit.spec
index 83f023d5f987cf2e4ded7194d107cd3ed43d55bb..4d281e42c3734faf47ac58a343d22ce47bab7939 100644 (file)
@@ -1,9 +1,11 @@
 # TODO:
 # - BASH command-not-found functionality disabled for now as it needs patched bash
 #   (details in bash from Fedora Rawhide)
+# - setup dnf vendor properly? (see meson command)
+# - daemon user (see meson command)
 #
 # Conditional build:
-%bcond_without doc             # build without docs
+%bcond_without apidocs         # API documentation
 %bcond_without introspection   # gobject introspection, time to time broken
 %bcond_without static_libs     # static library
 %bcond_without python          # Python binding (used by entropy and portage backends)
 # backends
 %bcond_with    alpm            # ALPM (Arch Linux package manager) backend
 %bcond_with    apt             # APT (Debian/Ubuntu) backend using C++ API
-%bcond_with    dnf             # DNF (Fedora/RHEL/Mageia/OpenMandriva/OpenSUSE/Rosa) backend
+%bcond_without dnf             # DNF (Fedora/RHEL/Mageia/OpenMandriva/OpenSUSE/Rosa) backend
 %bcond_with    entropy         # Entropy (Sabayon) backend (Python)
-%bcond_with    nix             # Nix (NixOS) backend [broken as of 1.2.0]
+%bcond_with    nix             # Nix (NixOS) backend [broken as of 1.2.0-1.2.5]
+%bcond_with    pisi            # PiSi (Pardus) backend (Python)
 %bcond_without poldek          # Poldek (PLD) backend
 %bcond_with    portage         # portage (Gentoo) backend (Python)
 %bcond_with    slack           # Slack (Slackware) backend
-%bcond_with    zypp            # ZYPP (openSUSE/SLE) backend [broken as of 1.2.0]
+%bcond_with    zypp            # ZYPP (openSUSE/SLE) backend
 
 %if %{without python}
 %undefine      with_entropy
+%undefine      with_pisi
 %undefine      with_portage
 %endif
 
 Summary:       System daemon that is a D-Bus abstraction layer for package management
 Summary(pl.UTF-8):     Demon systemowy będący warstwą abstrakcji D-Bus do zarządzania pakietami
 Name:          PackageKit
-Version:       1.2.2
-Release:       1
+Version:       1.2.8
+Release:       2
 License:       GPL v2+
 Group:         Applications/System
 Source0:       https://www.freedesktop.org/software/PackageKit/releases/%{name}-%{version}.tar.xz
-# Source0-md5: 2bfa2687bcc4e189bb90e2228c11e558
+# Source0-md5: 78cb918f4128a57bfc8a454b60f5a3c1
 Patch0:                %{name}-poldek.patch
 Patch2:                %{name}-meson.patch
 Patch3:                consolekit-fallback.patch
 URL:           https://www.freedesktop.org/software/PackageKit/
-%{?with_apt:BuildRequires:     AppStream-devel >= 0.12}
+%{?with_dnf:BuildRequires:     AppStream-devel >= 0.14.0}
+%{?with_apt:BuildRequires:     AppStream-devel >= 0.16.0}
 BuildRequires: NetworkManager-devel >= 0.6.5
-# pkgconfig(libalpm) >= 12.0.0
-%{?with_alpm:BuildRequires:    alpm-devel >= 5.2}
-%{?with_dnf:BuildRequires:     appstream-glib-devel}
+# pkgconfig(libalpm) >= 13.0.0
+%{?with_alpm:BuildRequires:    alpm-devel >= 6.0}
 %{?with_apt:BuildRequires:     apt-devel >= 1.9.2}
-BuildRequires: bash-completion-devel >= 2.0
+BuildRequires: bash-completion-devel >= 1:2.0
 BuildRequires: connman-devel
 %{?with_slack:BuildRequires:   curl-devel}
 BuildRequires: dbus-devel >= 1.2.0
 BuildRequires: dbus-glib-devel >= 0.76
 BuildRequires: docbook-dtd412-xml
 BuildRequires: docbook-dtd42-xml
+BuildRequires: docbook-style-xsl-nons
 BuildRequires: fontconfig-devel
 BuildRequires: gettext-tools
-BuildRequires: glib2-devel >= 1:2.54.0
+BuildRequires: glib2-devel >= 1:2.62
 %{?with_introspection:BuildRequires:   gobject-introspection-devel >= 0.9.9}
 BuildRequires: gstreamer-devel >= 1.0.0
 BuildRequires: gstreamer-plugins-base-devel >= 1.0.0
 BuildRequires: gtk+3-devel >= 3.0.0
-%{?with_doc:BuildRequires:     gtk-doc >= 1.11}
+%{?with_apidocs:BuildRequires: gtk-doc >= 1.11}
 BuildRequires: libarchive-devel
 %{?with_dnf:BuildRequires:     libdnf-devel >= 0.43.1}
 %if %{with apt} || %{with nix}
@@ -65,19 +70,18 @@ BuildRequires:      libstdc++-devel >= 6:4.7
 %endif
 %{?with_slack:BuildRequires:   libstdc++-devel >= 6:5}
 BuildRequires: libxslt-progs
-%{?with_zypp:BuildRequires:    libzypp-devel >= 15}
+%{?with_zypp:BuildRequires:    libzypp-devel >= 17.31.0}
 BuildRequires: meson >= 0.50
 BuildRequires: ninja >= 1.5
 # nix-expr nix-main nix-store
-%{?with_nix:BuildRequires:     nix-devel >= 1.12}
+%{?with_nix:BuildRequires:     nix-devel >= 2.9}
 BuildRequires: pango-devel
 BuildRequires: pkgconfig
 # just to detect which reboot modes to use (library not linked)
 #BuildRequires:        plymouth-devel >= 0.9.5
 %{?with_poldek:BuildRequires:  poldek-devel >= 0.30-1.rc6.4}
 BuildRequires: polkit-devel >= 0.114
-# or 1:3.2
-%{?with_python:BuildRequires:  python-devel >= 1:2.7}
+%{?with_python:BuildRequires:  python3-devel >= 1:3.2}
 BuildRequires: readline-devel
 BuildRequires: rpm-build >= 4.6
 %{?with_dnf:BuildRequires:     rpm-devel >= 1:4.6}
@@ -85,6 +89,7 @@ BuildRequires:        rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.736
 BuildRequires: sed >= 4.0
 BuildRequires: sqlite3-devel >= 3
+# or elogind >= 229.4
 BuildRequires: systemd-devel >= 1:213
 BuildRequires: tar >= 1:1.22
 BuildRequires: udev-glib-devel
@@ -96,7 +101,6 @@ Requires:    %{name}-libs = %{version}-%{release}
 Requires:      crondaemon
 Requires:      polkit >= 0.114
 Suggests:      ConsoleKit-x11
-Obsoletes:     PackageKit-backend-pisi < 1.2
 Obsoletes:     PackageKit-backend-ports < 1.2
 Obsoletes:     PackageKit-backend-smart < 1.0
 Obsoletes:     PackageKit-backend-urpmi < 1.2
@@ -119,7 +123,7 @@ zgodnego z wieloma dystrybucjami i architekturami.
 Summary:       packagekit-glib library
 Summary(pl.UTF-8):     Biblioteka packagekit-glib
 Group:         Libraries
-Requires:      glib2 >= 1:2.54.0
+Requires:      glib2 >= 1:2.62
 Obsoletes:     browser-plugin-packagekit < 1.1.0
 
 %description libs
@@ -134,7 +138,7 @@ Summary(pl.UTF-8):  Pliki nagłówkowe biblioteki packagekit-glib
 Group:         Development/Libraries
 Requires:      %{name}-libs = %{version}-%{release}
 Requires:      dbus-devel >= 1.2.0
-Requires:      glib2-devel >= 1:2.54.0
+Requires:      glib2-devel >= 1:2.62
 Requires:      sqlite3-devel
 
 %description devel
@@ -237,8 +241,8 @@ Summary:    PackageKit Entropy backend
 Summary(pl.UTF-8):     Backend PackageKit Entropy
 Group:         Libraries
 Requires:      %{name} = %{version}-%{release}
-Requires:      python-packagekit = %{version}-%{release}
-#Requires:     python-entropy
+Requires:      python3-packagekit = %{version}-%{release}
+#Requires:     python3-entropy
 Provides:      %{name}-backend = %{version}-%{release}
 
 %description backend-entropy
@@ -254,7 +258,7 @@ Summary:    PackageKit Nix backend
 Summary(pl.UTF-8):     Backend PackageKit oparty na zarządcy pakietów Nix
 Group:         Libraries
 Requires:      %{name} = %{version}-%{release}
-Requires:      nix >= 1.12
+Requires:      nix >= 2.9
 Provides:      %{name}-backend = %{version}-%{release}
 
 %description backend-nix
@@ -264,6 +268,24 @@ NixOS).
 %description backend-nix -l pl.UTF-8
 Backend PackageKit dodający obsługę pakietów Nix (używanych w NixOS).
 
+%package backend-pisi
+Summary:       PackageKit PiSi backend
+Summary(pl.UTF-8):     Backend PackageKit PiSi
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
+Requires:      python3-packagekit = %{version}-%{release}
+#Requires:     python3-piksemel
+#Requires:     python3-pisi
+Provides:      %{name}-backend = %{version}-%{release}
+
+%description backend-pisi
+A backend for PackageKit to enable PiSi packages support. PiSi
+packages are originated in Pardus distribution.
+
+%description backend-pisi -l pl.UTF-8
+Backend PackageKit dodający obsługę pakietów PiSi. Pakiety PiSi
+wywodzą się z dystrybucji Pardus.
+
 %package backend-poldek
 Summary:       PackageKit Poldek backend
 Summary(pl.UTF-8):     Backend PackageKit oparty na Poldku
@@ -285,8 +307,8 @@ Summary:    PackageKit Portage backend
 Summary(pl.UTF-8):     Backend PackageKit Portage
 Group:         Libraries
 Requires:      %{name} = %{version}-%{release}
-Requires:      python-packagekit = %{version}-%{release}
-#Requires:     python-portage
+Requires:      python3-packagekit = %{version}-%{release}
+#Requires:     python3-portage
 Provides:      %{name}-backend = %{version}-%{release}
 
 %description backend-portage
@@ -315,7 +337,7 @@ Summary:    PackageKit Zypp backend
 Summary(pl.UTF-8):     Backend PackageKit Zypp
 Group:         Libraries
 Requires:      %{name} = %{version}-%{release}
-Requires:      libzypp >= 15
+Requires:      libzypp >= 17.31.0
 Provides:      %{name}-backend = %{version}-%{release}
 
 %description backend-zypp
@@ -360,7 +382,7 @@ Summary:    Bash completion for PackageKit console commands
 Summary(pl.UTF-8):     Bashowe uzupełnianie parametrów dla poleceń konsolowych PackageKit
 Group:         Applications/Shells
 Requires:      %{name} = %{version}-%{release}
-Requires:      bash-completion >= 2
+Requires:      bash-completion >= 1:2.0
 BuildArch:     noarch
 
 %description -n bash-completion-packagekit
@@ -370,17 +392,16 @@ This package provides bash-completion for PackageKit console commands.
 Pakiet ten dostarcza bashowe uzupełnianie parametrów dla poleceń
 konsolowych PackageKit.
 
-%package -n python-packagekit
+%package -n python3-packagekit
 Summary:       PackageKit Python bindings
 Summary(pl.UTF-8):     Wiązania PackageKit dla Pythona
 Group:         Development/Languages/Python
-Requires:      python-dbus
-Requires:      python-pygobject
+Obsoletes:     python-packagekit < 1.2.7
 
-%description -n python-packagekit
+%description -n python3-packagekit
 PackageKit Python bindings.
 
-%description -n python-packagekit -l pl.UTF-8
+%description -n python3-packagekit -l pl.UTF-8
 Wiązania PackageKit dla Pythona.
 
 %prep
@@ -389,19 +410,20 @@ Wiązania PackageKit dla Pythona.
 %patch2 -p1
 %patch3 -p1
 
+%{__sed} -i -e '1s,/usr/bin/python$,%{__python3},' backends/pisi/pisiBackend.py
+
 %if %{with static_libs}
 %{__sed} -i -e '/^packagekit_glib2_library =/ s/shared_library/library/' lib/packagekit-glib2/meson.build
 %endif
 
 %build
-%{?with_zypp:CPPFLAGS="%{rpmcppflags} -D_RPM_5 -I/usr/include/rpm"}
 %meson build \
+       --python.bytecompile=2 \
        -Dbash_command_not_found=false \
        %{!?with_introspection:-Dgobject_introspection=false} \
-       %{?with_doc:-Dgtk_doc=true} \
-       -Dpackaging_backend=dummy%{?with_alpm:,alpm}%{?with_apt:,aptcc}%{?with_dnf:,dnf}%{?with_entropy:,entropy}%{?with_poldek:,poldek}%{?with_portage:,portage}%{?with_slack:,slack}%{?with_zypp:,zypp}%{?with_nix:,nix} \
+       %{?with_apidocs:-Dgtk_doc=true} \
+       -Dpackaging_backend=dummy%{?with_alpm:,alpm}%{?with_apt:,aptcc}%{?with_dnf:,dnf}%{?with_entropy:,entropy}%{?with_pisi:,pisi}%{?with_poldek:,poldek}%{?with_portage:,portage}%{?with_slack:,slack}%{?with_zypp:,zypp}%{?with_nix:,nix} \
        %{!?with_python:-Dpython_backend=false} \
-       -Dpythonpackagedir=%{py_sitescriptdir} \
        -Dsystemdsystemunitdir=%{systemdunitdir}
 
 # TODO:
@@ -424,14 +446,7 @@ ln -s pk-gstreamer-install $RPM_BUILD_ROOT%{_libexecdir}/gst-install-plugins-hel
 
 install -d $RPM_BUILD_ROOT%{systemdunitdir}/system-update.target.wants
 ln -sf ../packagekit-offline-update.service \
-        $RPM_BUILD_ROOT%{systemdunitdir}/system-update.target.wants/packagekit-offline-update.service
-
-%if %{with python}
-%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
-%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
-
-%py_postclean
-%endif
+       $RPM_BUILD_ROOT%{systemdunitdir}/system-update.target.wants/packagekit-offline-update.service
 
 %find_lang %{name}
 
@@ -462,13 +477,14 @@ rm -rf $RPM_BUILD_ROOT
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/PackageKit/PackageKit.conf
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/PackageKit/Vendor.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/packagekit-background
-/etc/dbus-1/system.d/org.freedesktop.PackageKit.conf
 %dir %{_datadir}/PackageKit
 %dir %{_datadir}/PackageKit/helpers
 %attr(755,root,root) %{_datadir}/PackageKit/pk-upgrade-distro.sh
 %{_datadir}/polkit-1/actions/org.freedesktop.packagekit.policy
 %{_datadir}/polkit-1/rules.d/org.freedesktop.packagekit.rules
 %{_datadir}/dbus-1/system-services/org.freedesktop.PackageKit.service
+%{_datadir}/dbus-1/system.d/org.freedesktop.PackageKit.conf
+%{_datadir}/metainfo/org.freedesktop.packagekit.metainfo.xml
 %{_mandir}/man1/pkcon.1*
 %{_mandir}/man1/pkmon.1*
 %{systemdunitdir}/packagekit.service
@@ -525,6 +541,10 @@ rm -rf $RPM_BUILD_ROOT
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/PackageKit/alpm.d/groups.list
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/PackageKit/alpm.d/pacman.conf
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/PackageKit/alpm.d/repos.list
+# FIXME: dirs should be owned by alpm?
+%dir %{_datadir}/libalpm
+%dir %{_datadir}/libalpm/hooks
+%{_datadir}/libalpm/hooks/90-packagekit-refresh.hook
 %endif
 
 %if %{with apt}
@@ -542,6 +562,9 @@ rm -rf $RPM_BUILD_ROOT
 %files backend-dnf
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_dnf.so
+%attr(755,root,root) %{_libexecdir}/packagekit-dnf-refresh-repo
+%{py3_sitescriptdir}/dnf-plugins/notify_packagekit.py
+%{py3_sitescriptdir}/dnf-plugins/__pycache__/notify_packagekit.cpython-*.py[co]
 %endif
 
 %if %{with entropy}
@@ -558,6 +581,14 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_nix.so
 %endif
 
+%if %{with pisi}
+%files backend-pisi
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/packagekit-backend/libpk_backend_pisi.so
+%dir %{_datadir}/PackageKit/helpers/pisi
+%attr(755,root,root) %{_datadir}/PackageKit/helpers/pisi/pisiBackend.py
+%endif
+
 %if %{with poldek}
 %files backend-poldek
 %defattr(644,root,root,755)
@@ -604,8 +635,7 @@ rm -rf $RPM_BUILD_ROOT
 %{bash_compdir}/pkcon
 
 %if %{with python}
-%files -n python-packagekit
+%files -n python3-packagekit
 %defattr(644,root,root,755)
-%dir %{py_sitescriptdir}/packagekit
-%{py_sitescriptdir}/packagekit/*.py[co]
+%{py3_sitescriptdir}/packagekit
 %endif
This page took 0.366701 seconds and 4 git commands to generate.