190 lines
6.1 KiB
Diff
190 lines
6.1 KiB
Diff
From 6ae28f9192bea743a19ec8c411f9d236e9dda3e9 Mon Sep 17 00:00:00 2001
|
|
From: Robin Lee <cheeselee@fedoraproject.org>
|
|
Date: Fri, 6 Nov 2020 10:55:08 +0800
|
|
Subject: [PATCH 3/4] 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-control-center.spec | 111 +++++++++++++++++++++++-------------
|
|
1 file changed, 72 insertions(+), 39 deletions(-)
|
|
|
|
diff --git a/rpm/dde-control-center.spec b/rpm/dde-control-center.spec
|
|
index bc5e4cc08..4f8f26d47 100644
|
|
--- a/rpm/dde-control-center.spec
|
|
+++ b/rpm/dde-control-center.spec
|
|
@@ -1,89 +1,122 @@
|
|
-Name: dde-control-center
|
|
-Version: 5.1.0.19
|
|
-Release: 2
|
|
+%global repo dde-control-center
|
|
+
|
|
+%if 0%{?fedora}
|
|
+%global dde_prefix deepin
|
|
+Name: deepin-control-center
|
|
+%else
|
|
+%global dde_prefix dde
|
|
+Name: %{repo}
|
|
+%endif
|
|
+Version: 5.3.0.68
|
|
+Release: 1%{?fedora:%dist}
|
|
Summary: New control center for Linux Deepin
|
|
License: GPLv3
|
|
-URL: https://github.com/linuxdeepin/%{name}
|
|
-Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz
|
|
+URL: https://github.com/linuxdeepin/%{repo}
|
|
+Source0: %{url}/archive/%{version}/%{repo}-%{version}.tar.gz
|
|
|
|
-#BuildRequires: dtkcore-devel >= 5.1.1
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: desktop-file-utils
|
|
-BuildRequires: dde-dock-devel
|
|
+BuildRequires: %{dde_prefix}-dock-devel
|
|
BuildRequires: pkgconfig(dde-network-utils)
|
|
-#BuildRequires: pkgconfig(dtkwidget) >= 5.1
|
|
-BuildRequires: dtkwidget-devel
|
|
+BuildRequires: dtkwidget-devel >= 5.4.0
|
|
BuildRequires: dtkgui-devel dtkcore-devel
|
|
-#BuildRequires: pkgconfig(dtkwidget2)
|
|
-#BuildRequires: pkgconfig(dframeworkdbus) >= 2.0
|
|
-BuildRequires: dde-qt-dbus-factory-devel
|
|
+BuildRequires: %{dde_prefix}-qt-dbus-factory-devel
|
|
BuildRequires: pkgconfig(gsettings-qt)
|
|
BuildRequires: pkgconfig(geoip)
|
|
BuildRequires: pkgconfig(libnm)
|
|
BuildRequires: libpwquality-devel
|
|
+%if 0%{?fedora}
|
|
+BuildRequires: pkgconfig(Qt5Core)
|
|
+BuildRequires: pkgconfig(Qt5Concurrent)
|
|
+BuildRequires: pkgconfig(Qt5DBus)
|
|
+BuildRequires: pkgconfig(Qt5Multimedia)
|
|
+BuildRequires: pkgconfig(Qt5Svg)
|
|
+BuildRequires: pkgconfig(Qt5Sql)
|
|
+BuildRequires: pkgconfig(Qt5Xml)
|
|
+BuildRequires: pkgconfig(Qt5X11Extras)
|
|
+BuildRequires: qt5-qtbase-private-devel
|
|
+%else
|
|
BuildRequires: qt5-devel
|
|
+%endif
|
|
BuildRequires: pkgconfig(xcb-ewmh)
|
|
+BuildRequires: pkgconfig(xext)
|
|
BuildRequires: kf5-networkmanager-qt-devel
|
|
BuildRequires: udisks2-qt5-devel
|
|
BuildRequires: qt5-linguist
|
|
BuildRequires: cmake
|
|
-Requires: dde-account-faces
|
|
-Requires: dde-api
|
|
-Requires: dde-daemon
|
|
-Requires: dde-qt5integration
|
|
-Requires: dde-network-utils
|
|
+Requires: %{dde_prefix}-account-faces
|
|
+Requires: %{dde_prefix}-api
|
|
+Requires: %{dde_prefix}-daemon
|
|
+Requires: %{dde_prefix}-qt5integration
|
|
+Requires: %{dde_prefix}-network-utils
|
|
Requires: startdde
|
|
+%if 0%{?fedora} == 0
|
|
Requires: dde-server-industry-config
|
|
+%endif
|
|
|
|
%description
|
|
New control center for Linux Deepin.
|
|
|
|
%package devel
|
|
-Summary: %{summary}
|
|
+Summary: Development package for %{name}
|
|
+Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
BuildArch: noarch
|
|
|
|
%description devel
|
|
-%{summary}.
|
|
+Header files and libraries for %{name}.
|
|
|
|
%prep
|
|
-%setup -q -n %{name}-%{version}
|
|
-sed -i 's|lrelease|lrelease-qt5|' translate_generation.sh
|
|
+%autosetup -p1 -n %{repo}-%{version}
|
|
sed -i -E '/add_compile_definitions/d' CMakeLists.txt
|
|
|
|
+sed -i '/%{repo}/ s|/usr/lib|%{_libdir}|' src/frame/modules/update/updatework.cpp \
|
|
+ src/frame/window/mainwindow.cpp \
|
|
+ src/frame/window/insertplugin.cpp
|
|
+
|
|
+sed -i '/TARGETS/s|lib|%{_lib}|' src/frame/CMakeLists.txt
|
|
+
|
|
+# remove after -DDISABLE_SYS_UPDATE=YES working properly
|
|
+sed -i '/new UpdateModule/d' src/frame/window/mainwindow.cpp
|
|
+
|
|
%build
|
|
-%cmake . -DDCC_DISABLE_GRUB=YES \
|
|
- -DDISABLE_SYS_UPDATE=YES
|
|
+export PATH=%{_qt5_bindir}:$PATH
|
|
+%cmake %{!?fedora:.} -DDCC_DISABLE_GRUB=YES \
|
|
+ -DDISABLE_SYS_UPDATE=YES \
|
|
+ -DCMAKE_INSTALL_LIBDIR=%{_libdir}
|
|
+%if 0%{?fedora}
|
|
+%cmake_build
|
|
+%else
|
|
%make_build
|
|
+%endif
|
|
|
|
%install
|
|
+%if 0%{?fedora}
|
|
+%cmake_install
|
|
+%else
|
|
%make_install INSTALL_ROOT=%{buildroot}
|
|
+%endif
|
|
# place holder plugins dir
|
|
-mkdir -p %{buildroot}%{_libdir}/%{name}/plugins
|
|
-# https://github.com/linuxdeepin/dde-control-center/issues/115
|
|
-# And we disabled SYS_UPDATE, so reboot-reminder-dialog is useless.
|
|
-#rm %{buildroot}%{_bindir}/reboot-reminder-dialog
|
|
-mkdir -p %{buildroot}/usr/lib64/cmake/DdeControlCenter
|
|
-mv %{buildroot}/cmake/DdeControlCenter/DdeControlCenterConfig.cmake %{buildroot}/usr/lib64/cmake/DdeControlCenter
|
|
-mv %{buildroot}/usr/lib/libdccwidgets.so %{buildroot}%{_libdir}/
|
|
-install -Dm644 com.deepin.controlcenter.addomain.policy %{buildroot}%{_datadir}/polkit-1/actions/
|
|
+mkdir -p %{buildroot}%{_libdir}/%{repo}/plugins
|
|
|
|
%check
|
|
-desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop ||:
|
|
-
|
|
-%ldconfig_scriptlets
|
|
+desktop-file-validate %{buildroot}%{_datadir}/applications/%{repo}.desktop
|
|
|
|
%files
|
|
%doc README.md
|
|
%license LICENSE
|
|
-%{_sysconfdir}/
|
|
%{_bindir}/abrecovery
|
|
-%{_bindir}/dde-control-center
|
|
-%{_datadir}/
|
|
+%{_bindir}/%{repo}
|
|
+%{_libdir}/%{repo}
|
|
%{_libdir}/libdccwidgets.so
|
|
-/etc/xdg/autostart/deepin-ab-recovery.desktop
|
|
+%{_datadir}/applications/%{repo}.desktop
|
|
+%{_datadir}/dbus-1/services/*.service
|
|
+%{_datadir}/polkit-1/actions/com.deepin.*.policy
|
|
+%{_datadir}/%{repo}/
|
|
+%{_datadir}/dict/MainEnglishDictionary_ProbWL.txt
|
|
+%{_sysconfdir}/xdg/autostart/deepin-ab-recovery.desktop
|
|
|
|
%files devel
|
|
-%{_includedir}/dde-control-center
|
|
+%{_includedir}/%{repo}
|
|
%{_libdir}/cmake/DdeControlCenter/
|
|
|
|
%changelog
|
|
--
|
|
2.26.2
|
|
|