152 lines
5.1 KiB
RPMSpec
152 lines
5.1 KiB
RPMSpec
%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.39
|
|
Release: %autorelease
|
|
Summary: New control center for Linux Deepin
|
|
License: GPLv3
|
|
URL: https://github.com/linuxdeepin/%{repo}
|
|
Source0: %{url}/archive/%{version}/%{repo}-%{version}.tar.gz
|
|
|
|
# PATCHES FROM SOURCE GIT:
|
|
|
|
# systeminfo-deepin-icon
|
|
# Author: Robin Lee <cheeselee@fedoraproject.org>
|
|
Patch0001: 0001-systeminfo-deepin-icon.patch
|
|
|
|
# no user experience
|
|
# Author: Robin Lee <cheeselee@fedoraproject.org>
|
|
Patch0002: 0002-no-user-experience.patch
|
|
|
|
# feat: Initial packit setup
|
|
# Author: Robin Lee <cheeselee@fedoraproject.org>
|
|
Patch0003: 0003-feat-Initial-packit-setup.patch
|
|
|
|
# Arch fixes
|
|
# Author: Robin Lee <cheeselee@fedoraproject.org>
|
|
Patch0004: 0004-Arch-fixes.patch
|
|
|
|
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: desktop-file-utils
|
|
BuildRequires: %{dde_prefix}-dock-devel
|
|
BuildRequires: pkgconfig(dde-network-utils)
|
|
BuildRequires: dtkwidget-devel
|
|
BuildRequires: dtkgui-devel dtkcore-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
|
|
BuildRequires: make
|
|
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: Development package for %{name}
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
%description devel
|
|
Header files and libraries for %{name}.
|
|
|
|
%prep
|
|
%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 \
|
|
com.deepin.controlcenter.develop.policy \
|
|
README.md
|
|
|
|
sed -i '/TARGETS/s|lib|%{_lib}|' src/frame/CMakeLists.txt
|
|
|
|
sed -i '/#include <QPainter>/a #include <QPainterPath>' src/frame/widgets/basiclistdelegate.cpp src/frame/window/modules/update/updatehistorybutton.cpp \
|
|
src/frame/window/modules/commoninfo/commonbackgrounditem.cpp src/frame/modules/accounts/useroptionitem.cpp \
|
|
src/frame/window/modules/sync/pages/avatarwidget.cpp src/frame/window/modules/accounts/avataritemdelegate.cpp \
|
|
src/frame/modules/accounts/avatarwidget.cpp src/frame/window/modules/accounts/accountswidget.cpp \
|
|
src/frame/modules/datetime/timezone_dialog/popup_menu.cpp src/frame/modules/display/recognizedialog.cpp \
|
|
src/frame/window/modules/personalization/roundcolorwidget.cpp src/frame/window/modules/unionid/pages/avatarwidget.cpp
|
|
sed -i '/#include <QRect>/a #include <QPainterPath>' src/frame/window/modules/personalization/personalizationgeneral.cpp
|
|
|
|
sed -i 's|/bin/deepin-recovery-tool|%{_bindir}/deepin-recovery-tool|' src/frame/window/modules/systeminfo/backupandrestoreworker.cpp
|
|
|
|
# remove after -DDISABLE_SYS_UPDATE=YES working properly
|
|
sed -i '/new UpdateModule/d' src/frame/window/mainwindow.cpp
|
|
|
|
%build
|
|
export PATH=%{_qt5_bindir}:$PATH
|
|
%cmake %{!?fedora:.} -DDCC_DISABLE_GRUB=YES \
|
|
-DDISABLE_SYS_UPDATE=YES -DDISABLE_ACTIVATOR=YES -DDISABLE_RECOVERY=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}/%{repo}/plugins
|
|
|
|
%check
|
|
desktop-file-validate %{buildroot}%{_datadir}/applications/%{repo}.desktop
|
|
|
|
%files
|
|
%doc README.md
|
|
%license LICENSE
|
|
%{_bindir}/%{repo}
|
|
%{_libdir}/%{repo}
|
|
%{_libdir}/libdccwidgets.so
|
|
%{_datadir}/applications/%{repo}.desktop
|
|
%{_datadir}/dbus-1/services/*.service
|
|
%{_datadir}/polkit-1/actions/com.deepin.*.policy
|
|
%{_datadir}/%{repo}/
|
|
%{_datadir}/dict/MainEnglishDictionary_ProbWL.txt
|
|
|
|
%files devel
|
|
%{_includedir}/%{repo}
|
|
%{_libdir}/cmake/DdeControlCenter/
|
|
|
|
%changelog
|
|
%autochangelog
|