[packit] 5.11.0.13 upstream release

Upstream tag: 5.11.0.13
Upstream commit: 5d834e99

Signed-off-by: Robin Lee <cheeselee@fedoraproject.org>
This commit is contained in:
Robin Lee 2020-11-10 17:12:14 +08:00
parent cc5f24bb4b
commit 85aee2bd33
7 changed files with 412 additions and 34 deletions

1
.gitignore vendored
View File

@ -12,3 +12,4 @@
/dde-dock-4.8.9.tar.gz
/dde-dock-4.9.0.tar.gz
/dde-dock-5.0.0.tar.gz
/dde-dock-5.11.0.13.tar.gz

20
.packit.yaml Normal file
View File

@ -0,0 +1,20 @@
# See the documentation for more information:
# https://packit.dev/docs/configuration/
specfile_path: rpm/deepin-dock.spec
# add or remove files that should be synced
synced_files:
- rpm/deepin-dock.spec
- .packit.yaml
upstream_ref: 5.3.0.13
upstream_package_name: dde-dock
# downstream (Fedora) RPM package name
downstream_package_name: deepin-dock
actions:
fix-spec-file: |
bash -c "sed -i -r \"0,/Version:/ s/Version:(\s*)\S*/Version:\1${PACKIT_PROJECT_VERSION}/\" rpm/deepin-dock.spec"
post-upstream-clone: |
cp rpm/dde-dock.spec rpm/deepin-dock.spec

View File

@ -0,0 +1,151 @@
From f61f8a701fc3b6f02ff6bca0b22b4044e056246b Mon Sep 17 00:00:00 2001
From: "Zhang, DingYuan" <justforlxz@gmail.com>
Date: Fri, 7 Aug 2020 18:18:16 +0800
Subject: [PATCH 1/2] fix: build failed cause dde-network-utils update unknown
enum
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
dde-network-utils update enum unknown
Log: 修复编译失败
Change-Id: Ifbdd1e7920dd2fdd77f705876727fe8d0733936d
Reviewed-on: http://gerrit.uniontech.com/c/dde-dock/+/3689
Reviewed-by: <mailman@uniontech.com>
Reviewed-by: zhangdingyuan <justforlxz@gmail.com>
Tested-by: <mailman@uniontech.com>
---
plugins/network/item/applet/accesspointwidget.cpp | 6 +++---
plugins/network/item/wireditem.cpp | 6 +++---
plugins/network/item/wireditem.h | 2 +-
plugins/network/item/wirelessitem.cpp | 2 +-
plugins/network/item/wirelessitem.h | 2 +-
plugins/network/networkitem.cpp | 4 ++--
6 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/plugins/network/item/applet/accesspointwidget.cpp b/plugins/network/item/applet/accesspointwidget.cpp
index 21f79ac2..c123b145 100644
--- a/plugins/network/item/applet/accesspointwidget.cpp
+++ b/plugins/network/item/applet/accesspointwidget.cpp
@@ -46,7 +46,7 @@ extern void initFontColor(QWidget *widget);
AccessPointWidget::AccessPointWidget()
: QFrame(nullptr)
- , m_activeState(NetworkDevice::Unknow)
+ , m_activeState(NetworkDevice::Unknown)
, m_ssidBtn(new SsidButton(this))
, m_securityLabel(new QLabel)
, m_strengthLabel(new QLabel)
@@ -127,7 +127,7 @@ void AccessPointWidget::updateAP(const AccessPoint &ap)
}
// reset state
- setActiveState(NetworkDevice::Unknow);
+ setActiveState(NetworkDevice::Unknown);
}
bool AccessPointWidget::active() const
@@ -200,6 +200,6 @@ void AccessPointWidget::ssidClicked()
void AccessPointWidget::disconnectBtnClicked()
{
- setActiveState(NetworkDevice::Unknow);
+ setActiveState(NetworkDevice::Unknown);
emit requestDeactiveAP(m_ap);
}
diff --git a/plugins/network/item/wireditem.cpp b/plugins/network/item/wireditem.cpp
index 31d86ff3..5eb056da 100644
--- a/plugins/network/item/wireditem.cpp
+++ b/plugins/network/item/wireditem.cpp
@@ -133,7 +133,7 @@ WiredItem::WiredStatus WiredItem::getDeviceState()
}
switch (m_device->status()) {
- case NetworkDevice::Unknow: return Unknow;
+ case NetworkDevice::Unknown: return Unknown;
case NetworkDevice::Unmanaged:
case NetworkDevice::Unavailable: return Nocable;
case NetworkDevice::Disconnected: return Disconnected;
@@ -174,7 +174,7 @@ void WiredItem::setWiredStateIcon()
auto ratio = devicePixelRatioF();
switch (m_deviceState) {
- case NetworkDevice::Unknow:
+ case NetworkDevice::Unknown:
case NetworkDevice::Unmanaged:
case NetworkDevice::Unavailable: {
stateString = "error";
@@ -246,7 +246,7 @@ void WiredItem::deviceStateChanged(NetworkDevice::DeviceStatus state)
{
m_deviceState = state;
switch (state) {
- case NetworkDevice::Unknow:
+ case NetworkDevice::Unknown:
case NetworkDevice::Unmanaged:
case NetworkDevice::Unavailable:
case NetworkDevice::Disconnected:
diff --git a/plugins/network/item/wireditem.h b/plugins/network/item/wireditem.h
index 8bb81c0d..4c4b5751 100644
--- a/plugins/network/item/wireditem.h
+++ b/plugins/network/item/wireditem.h
@@ -43,7 +43,7 @@ class WiredItem : public DeviceItem
public:
enum WiredStatus {
- Unknow = 0,
+ Unknown = 0,
Enabled = 0x00000001,
Disabled = 0x00000002,
Connected = 0x00000004,
diff --git a/plugins/network/item/wirelessitem.cpp b/plugins/network/item/wirelessitem.cpp
index 858fc1b1..24396427 100644
--- a/plugins/network/item/wirelessitem.cpp
+++ b/plugins/network/item/wirelessitem.cpp
@@ -117,7 +117,7 @@ WirelessItem::WirelessStatus WirelessItem::getDeviceState()
}
switch (m_device->status()) {
- case NetworkDevice::Unknow: return Unknow;
+ case NetworkDevice::Unknown: return Unknown;
case NetworkDevice::Unmanaged:
case NetworkDevice::Unavailable:
case NetworkDevice::Disconnected: return Disconnected;
diff --git a/plugins/network/item/wirelessitem.h b/plugins/network/item/wirelessitem.h
index d4d7d5ca..43d535c9 100644
--- a/plugins/network/item/wirelessitem.h
+++ b/plugins/network/item/wirelessitem.h
@@ -38,7 +38,7 @@ class WirelessItem : public DeviceItem
public:
enum WirelessStatus {
- Unknow = 0,
+ Unknown = 0,
Enabled = 0x00010000,
Disabled = 0x00020000,
Connected = 0x00040000,
diff --git a/plugins/network/networkitem.cpp b/plugins/network/networkitem.cpp
index 0c7211b7..c6bdc2ca 100644
--- a/plugins/network/networkitem.cpp
+++ b/plugins/network/networkitem.cpp
@@ -525,7 +525,7 @@ void NetworkItem::getPluginState()
// 按如下顺序得到当前无线设备状态
temp = state;
if (!temp)
- wirelessState = WirelessItem::Unknow;
+ wirelessState = WirelessItem::Unknown;
temp = state;
if ((temp & WirelessItem::Disabled) >> 17)
wirelessState = WirelessItem::Disabled;
@@ -569,7 +569,7 @@ void NetworkItem::getPluginState()
}
temp = state;
if (!temp)
- wiredState = WiredItem::Unknow;
+ wiredState = WiredItem::Unknown;
temp = state;
if ((temp & WiredItem::Nocable) >> 9)
wiredState = WiredItem::Nocable;
--
2.26.2

View File

@ -0,0 +1,153 @@
From 5d834e9942827696ee240db14128bd8da567d8eb Mon Sep 17 00:00:00 2001
From: Robin Lee <cheeselee@fedoraproject.org>
Date: Thu, 22 Oct 2020 14:56:42 +0800
Subject: [PATCH 2/2] feat: Initial packit setup
This commit contains the specfile for building the official package for Fedora
with a Packit setup.
Ultimately, a unified specfile is targeted for Fedora and any other rpm-based
distributions, e.g. openEuler.
And Packit(https://packit.dev/) is a tool for maintaining specfile within
upstream source. It requires a simple config file(.packit.yaml).
Log: Initial packit setup
Signed-off-by: Robin Lee <cheeselee@fedoraproject.org>
---
rpm/dde-dock.spec | 66 +++++++++++++++++++++++++++++++++++------------
1 file changed, 49 insertions(+), 17 deletions(-)
diff --git a/rpm/dde-dock.spec b/rpm/dde-dock.spec
index ef295e29..3d5cb940 100644
--- a/rpm/dde-dock.spec
+++ b/rpm/dde-dock.spec
@@ -1,18 +1,31 @@
%global sname deepin-dock
-
-Name: dde-dock
-Version: 5.1.0.13
-Release: 1
+%global repo dde-dock
+%global __provides_exclude_from ^%{_libdir}/%{repo}/.*\\.so$
+
+%if 0%{?fedora}
+%global start_logo start-here
+Name: %{sname}
+%else
+Name: %{repo}
+%endif
+Version: 5.3.0.13
+Release: 1%{?fedora:%dist}
Summary: Deepin desktop-environment - Dock module
License: GPLv3
+%if 0%{?fedora}
+URL: https://github.com/linuxdeepin/dde-dock
+Source0: %{url}/archive/%{version}/%{repo}-%{version}.tar.gz
+%else
URL: http://shuttle.corp.deepin.com/cache/repos/eagle/release-candidate/RERFNS4wLjAuNjU3NQ/pool/main/d/dde-dock/
Source0: %{name}_%{version}.orig.tar.xz
+%endif
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig(dbusmenu-qt5)
BuildRequires: pkgconfig(dde-network-utils)
BuildRequires: dtkwidget-devel >= 5.1
+BuildRequires: dtkgui-devel >= 5.2.2.16
BuildRequires: dtkcore-devel >= 5.1
BuildRequires: pkgconfig(dframeworkdbus) >= 2.0
BuildRequires: pkgconfig(gsettings-qt)
@@ -31,11 +44,16 @@ BuildRequires: pkgconfig(xcb-icccm)
BuildRequires: pkgconfig(xcb-image)
BuildRequires: qt5-linguist
Requires: dbusmenu-qt5
+%if 0%{?fedora}
+BuildRequires: qt5-qtbase-private-devel
+Requires: deepin-network-utils
+Requires: deepin-qt-dbus-factory
+%else
Requires: dde-network-utils
Requires: dde-qt-dbus-factory
+%endif
Requires: xcb-util-wm
Requires: xcb-util-image
-Requires: libxcb
%description
Deepin desktop-environment - Dock module.
@@ -55,45 +73,59 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
deepin desktop-environment - dock plugin.
%prep
-%setup -q -n %{name}-%{version}
+%autosetup -p1 -n %{repo}-%{version}
sed -i '/TARGETS/s|lib|%{_lib}|' plugins/*/CMakeLists.txt \
plugins/plugin-guide/plugins-developer-guide.md
-sed -i -E '30,39d' CMakeLists.txt
-
sed -i 's|/lib|/%{_lib}|' frame/controller/dockpluginscontroller.cpp \
frame/panel/mainpanelcontrol.cpp \
plugins/tray/system-trays/systemtrayscontroller.cpp
-sed -i 's|/lib|/libexec|g' plugins/show-desktop/showdesktopplugin.cpp
+sed -i 's|/lib|/libexec|g' plugins/show-desktop/showdesktopplugin.cpp \
+ frame/panel/mainpanelcontrol.cpp
+
+sed -i 's:libdir.*:libdir=%{_libdir}:' dde-dock.pc
sed -i 's|/usr/lib/dde-dock/plugins|%{_libdir}/dde-dock/plugins|' plugins/plugin-guide/plugins-developer-guide.md
sed -i 's|local/lib/dde-dock/plugins|local/%{_lib}/dde-dock/plugins|' plugins/plugin-guide/plugins-developer-guide.md
+%if 0%{?fedora}
+# set icon to Fedora logo
+sed -i 's|deepin-launcher|%{start_logo}|' frame/item/launcheritem.cpp
+%endif
+
%build
export PATH=%{_qt5_bindir}:$PATH
+%if 0%{?fedora}
+%cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DARCHITECTURE=%{_arch}
+%cmake_build
+%else
%cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DARCHITECTURE=%{_arch} .
%make_build
+%endif
%install
+%if 0%{?fedora}
+%cmake_install
+%else
%make_install INSTALL_ROOT=%{buildroot}
-
-%ldconfig_scriptlets
+%endif
%files
%license LICENSE
-%{_sysconfdir}/%{name}/indicator/keybord_layout.json
-%{_bindir}/%{name}
-%{_libdir}/%{name}/
-%{_datadir}/%{name}/
+%{_sysconfdir}/%{repo}/
+%{_bindir}/%{repo}
+%{_libdir}/%{repo}/
+%{_datadir}/%{repo}/
%{_datadir}/dbus-1/services/*.service
%{_datarootdir}/glib-2.0/schemas/com.deepin.dde.dock.module.gschema.xml
%{_datarootdir}/polkit-1/actions/com.deepin.dde.dock.overlay.policy
%files devel
-%{_includedir}/%{name}/
-%{_libdir}/pkgconfig/%{name}.pc
+%doc plugins/plugin-guide
+%{_includedir}/%{repo}/
+%{_libdir}/pkgconfig/%{repo}.pc
%{_libdir}/cmake/DdeDock/DdeDockConfig.cmake
%files onboard-plugin
--
2.26.2

3
README.packit Normal file
View File

@ -0,0 +1,3 @@
This repository is maintained by packit.
https://packit.dev/
The file was generated using packit 0.18.0.

View File

@ -1,20 +1,43 @@
%global sname deepin-dock
%global repo dde-dock
%global start_logo start-here
%global __provides_exclude_from ^%{_libdir}/%{repo}/.*\\.so$
Name: deepin-dock
Version: 5.0.0
Release: 4%{?dist}
%if 0%{?fedora}
%global start_logo start-here
Name: %{sname}
%else
Name: %{repo}
%endif
Version: 5.11.0.13
Release: 1%{?fedora:%dist}
Summary: Deepin desktop-environment - Dock module
License: GPLv3
%if 0%{?fedora}
URL: https://github.com/linuxdeepin/dde-dock
Source0: %{url}/archive/%{version}/%{repo}-%{version}.tar.gz
%else
URL: http://shuttle.corp.deepin.com/cache/repos/eagle/release-candidate/RERFNS4wLjAuNjU3NQ/pool/main/d/dde-dock/
Source0: %{name}_%{version}.orig.tar.xz
%endif
# PATCHES FROM SOURCE GIT:
# fix: build failed cause dde-network-utils update unknown enum
# Author: Zhang, DingYuan <justforlxz@gmail.com>
Patch0001: 0001-fix-build-failed-cause-dde-network-utils-update-unkn.patch
# feat: Initial packit setup
# Author: Robin Lee <cheeselee@fedoraproject.org>
Patch0002: 0002-feat-Initial-packit-setup.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig(dbusmenu-qt5)
BuildRequires: pkgconfig(dde-network-utils)
BuildRequires: pkgconfig(dtkwidget) >= 2.0.6
BuildRequires: dtkwidget-devel >= 5.1
BuildRequires: dtkgui-devel >= 5.2.2.16
BuildRequires: dtkcore-devel >= 5.1
BuildRequires: pkgconfig(dframeworkdbus) >= 2.0
BuildRequires: pkgconfig(gsettings-qt)
BuildRequires: pkgconfig(gtk+-2.0)
@ -31,54 +54,74 @@ BuildRequires: pkgconfig(xcb-ewmh)
BuildRequires: pkgconfig(xcb-icccm)
BuildRequires: pkgconfig(xcb-image)
BuildRequires: qt5-linguist
BuildRequires: deepin-icon-theme
BuildRequires: fedora-logos
Requires: dbusmenu-qt5
%if 0%{?fedora}
BuildRequires: qt5-qtbase-private-devel
Requires: deepin-daemon
Requires: deepin-launcher
Requires: deepin-menu
Requires: deepin-qt5integration
Requires: onboard
Requires: deepin-icon-theme
Requires: fedora-logos
Requires: deepin-network-utils
Requires: deepin-qt-dbus-factory
%else
Requires: dde-network-utils
Requires: dde-qt-dbus-factory
%endif
Requires: xcb-util-wm
Requires: xcb-util-image
%description
Deepin desktop-environment - Dock module.
%package devel
Summary: Development package for %{name}
Summary: Development package for %{sname}
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Header files and libraries for %{name}.
Header files and libraries for %{sname}.
%package onboard-plugin
Summary: deepin desktop-environment - dock plugin
Requires: %{name}%{?_isa} = %{version}-%{release}
%description onboard-plugin
deepin desktop-environment - dock plugin.
%prep
%setup -q -n %{repo}-%{version}
sed -i '/TARGETS/s|lib|%{_lib}|' plugins/*/CMakeLists.txt
%autosetup -p1 -n %{repo}-%{version}
sed -i '/TARGETS/s|lib|%{_lib}|' plugins/*/CMakeLists.txt \
plugins/plugin-guide/plugins-developer-guide.md
sed -i 's|/lib|/%{_lib}|' frame/controller/dockpluginscontroller.cpp \
plugins/tray/system-trays/systemtrayscontroller.cpp
sed -i 's|/lib|/libexec|' frame/item/showdesktopitem.cpp
frame/panel/mainpanelcontrol.cpp \
plugins/tray/system-trays/systemtrayscontroller.cpp
sed -i 's|/lib|/libexec|g' plugins/show-desktop/showdesktopplugin.cpp \
frame/panel/mainpanelcontrol.cpp
sed -i 's:libdir.*:libdir=%{_libdir}:' dde-dock.pc
sed -i 's|/usr/lib/dde-dock/plugins|%{_libdir}/dde-dock/plugins|' plugins/plugin-guide/plugins-developer-guide.md
sed -i 's|local/lib/dde-dock/plugins|local/%{_lib}/dde-dock/plugins|' plugins/plugin-guide/plugins-developer-guide.md
%if 0%{?fedora}
# set icon to Fedora logo
sed -i 's|deepin-launcher|%{start_logo}|' frame/item/launcheritem.cpp
%endif
%build
export PATH=%{_qt5_bindir}:$PATH
%if 0%{?fedora}
%cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DARCHITECTURE=%{_arch}
%cmake_build
%else
%cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DARCHITECTURE=%{_arch} .
%make_build
%endif
%install
%if 0%{?fedora}
%cmake_install
for theme in deepin deepin-dark; do
for dir in %{_datadir}/icons/$theme/places/*; do
size=$(basename $dir)
if [ -f %{_datadir}/icons/hicolor/${size}x${size}/places/%{start_logo}.png ]; then
mkdir -p %{buildroot}$dir
ln -sf ../../../hicolor/256x256/places/%{start_logo}.png %{buildroot}$dir
fi
done
done
%ldconfig_scriptlets
%else
%make_install INSTALL_ROOT=%{buildroot}
%endif
%files
%license LICENSE
@ -87,8 +130,8 @@ done
%{_libdir}/%{repo}/
%{_datadir}/%{repo}/
%{_datadir}/dbus-1/services/*.service
%{_datadir}/icons/*/places/*/*.png
%{_datadir}/polkit-1/actions/*.policy
%{_datarootdir}/glib-2.0/schemas/com.deepin.dde.dock.module.gschema.xml
%{_datarootdir}/polkit-1/actions/com.deepin.dde.dock.overlay.policy
%files devel
%doc plugins/plugin-guide
@ -96,7 +139,14 @@ done
%{_libdir}/pkgconfig/%{repo}.pc
%{_libdir}/cmake/DdeDock/DdeDockConfig.cmake
%files onboard-plugin
%{_libdir}/dde-dock/plugins/libonboard.so
%changelog
* Tue Nov 10 2020 Robin Lee <cheeselee@fedoraproject.org> - 5.11.0.13-1
- new upstream release: 5.11.0.13
* Fri Aug 7 2020 Robin Lee <cheeselee@fedoraproject.org> - 5.0.0-4
- BR: qt5-qtbase-private-devel
- Improve compatibility with new CMake macro

View File

@ -1 +1 @@
SHA512 (dde-dock-5.0.0.tar.gz) = 17c0f1cc7400cec0a054ff5c385026e42359709aafb65739c400f67db68ccfb790b5ed68222e0a72e115b523b6e7da66dda6677aeda760e4c7355d518434debe
SHA512 (dde-dock-5.11.0.13.tar.gz) = c72089fcc401954ffc82b208e29168b979d1503a7ed5796cac15694083fe2af69c47423266af63865d9d62e4fbf6d6955268d83ed3eef3847d10e5f844cb2e6d