Skip to content

Commit

Permalink
Merge pull request #54 from Bali10050/feature-qt6
Browse files Browse the repository at this point in the history
Feature qt6
  • Loading branch information
Bali10050 authored Dec 4, 2024
2 parents a455a2d + 34a3c8a commit 535ad99
Show file tree
Hide file tree
Showing 26 changed files with 1,035 additions and 487 deletions.
84 changes: 45 additions & 39 deletions .github/assets/pkgbuild/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,21 @@
# Used inside Github Action workflow archlinux-ci

# basic info
dev="Bali10050"
pkgname="lightly-qt6"
pkgver= # change this to match the name of the release tag you want to build from
pkgrel=1
pkgdesc="Bali10050's fork of Lightly (A modern style for qt applications)"
url="https://github.com/Bali10050/lightly"
url="https://github.com/$dev/lightly"
arch=('x86_64' 'aarch64')
license=("GPL-2.0-or-later")
pkgdir="$srcdir/fakeinstall_kf6"
build_dir="build_kf6"

makedepends=(
'cmake'
'extra-cmake-modules'
'git'
'cmake'
'extra-cmake-modules'
'git'
)

options=(!emptydirs !debug)
Expand All @@ -26,58 +28,62 @@ source=(

# use makepkg -g to generate the sha256sum for the release tag

# KF6/Qt6
# KF6/QT6
depends_kf6=(
'kdecoration'
'qt6-declarative'
'kcoreaddons'
'kcmutils'
'kcolorscheme'
'kconfig'
'kguiaddons'
'kiconthemes'
'kwindowsystem'
'kdecoration'
'qt6-declarative'
'kcoreaddons'
'kcmutils'
'kcolorscheme'
'kconfig'
'kguiaddons'
'kiconthemes'
'kwindowsystem'
)

depends=("${depends_kf6[@]}")
# KF5/QT5 for backward compatibility
depends_kf5=(
'kcmutils5'
'frameworkintegration5'
'kconfigwidgets5'
'kiconthemes5'
'kirigami2'
'kwindowsystem5'
)

depends=("${depends_kf6[@]}" "${depends_kf5[@]}")

conflicts=(
lightly-kf6
lightly-qt
lightly-kf6
lightly-qt
)

provides=("lightly-qt6")

pkgver() {
cd "$srcdir/$pkgname.git"
git describe --tags --long --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
cd "$srcdir/$pkgname.git"
git describe --tags --long --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
cd "$srcdir/$pkgname.git"
cd "$srcdir/$pkgname.git"
}

build() (
local cmake_options=(
-B build_kf6
-S "$pkgname.git"
-DBUILD_TESTING=OFF
-Wno-dev
)

cmake "${cmake_options[@]}"

# for build optimization: use all cores -1 to not overload system

printf "Using $(($(nproc) - 1)) cores\n"

make -j $(($(nproc) - 1)) -C "$srcdir/build_kf6/kdecoration/config/"
make -j $(($(nproc) - 1)) -C "$srcdir/build_kf6/colors/"
make -j $(($(nproc) - 1)) -C "$srcdir/build_kf6/"
local cmake_options=(
-B $build_dir
-S "$pkgname.git"
-DBUILD_TESTING=OFF
-Wno-dev
)

cmake "${cmake_options[@]}"

cmake --build $build_dir -j $(nproc)
)

package() (
install -dm755 "$pkgdir.git"
DESTDIR="$pkgdir" cmake --install build_kf6
rm -rf "$pkgdir/usr/lib/cmake"
install -dm755 "$pkgdir.git"
DESTDIR="$pkgdir" cmake --install build_kf6
rm -rf "$pkgdir/usr/lib/cmake"
)
101 changes: 0 additions & 101 deletions .github/assets/specs/fedora/lightly-qt6.spec

This file was deleted.

163 changes: 163 additions & 0 deletions .github/assets/specs/lightly.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
%global kf6_version 6.2.0
%define qt6_version 6.6.0
%define kf5_version 5.102.0
%define qt5_version 5.15.2
%define dev Bali10050
%define style Lightly
%define _style lightly
%define release_tag ${TAG} # this line gets updated automatically by Github Actions

Name: %{style}
Version: %{release_tag}
Release: 0
Summary: A modern style for qt applications
License: GPL-3.0-or-later
Group: System/GUI/KDE
URL: https://github.com/%{dev}/%{style}
Source0: https://github.com/%{dev}/%{style}/archive/refs/tags/%{version}.tar.gz
BuildRequires: cmake >= 3.16
BuildRequires: fdupes
BuildRequires: gettext
%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel_version}
BuildRequires: extra-cmake-modules >= %{kf6_version}
BuildRequires: kf5-rpm-macros
BuildRequires: kf6-rpm-macros
%elif 0%{?mageia}
BuildRequires: kf6-extra-cmake-modules >= %{kf6_version}
BuildRequires: kf5-macros
BuildRequires: kf6-macros

%else
#OpenSUSE
BuildRequires: kf6-extra-cmake-modules >= %{kf6_version}
BuildRequires: kf5-filesystem
BuildRequires: kf6-filesystem
%endif
BuildRequires: pkgconfig

#lightly5 dependencies
BuildRequires: cmake(KF5Config) >= %{kf5_version}
BuildRequires: cmake(KF5ConfigWidgets) >= %{kf5_version}
BuildRequires: cmake(KF5CoreAddons) >= %{kf5_version}
BuildRequires: cmake(KF5FrameworkIntegration) >= %{kf5_version}
BuildRequires: cmake(KF5GuiAddons) >= %{kf5_version}
BuildRequires: cmake(KF5I18n) >= %{kf5_version}
BuildRequires: cmake(KF5IconThemes) >= %{kf5_version}
BuildRequires: cmake(KF5Kirigami2) >= %{kf5_version}
BuildRequires: cmake(KF5WindowSystem) >= %{kf5_version}
BuildRequires: cmake(Qt5DBus) >= %{qt5_version}
BuildRequires: cmake(Qt5Quick) >= %{qt5_version}
BuildRequires: cmake(Qt5Widgets) >= %{qt5_version}

#lightly6 dependencies
BuildRequires: cmake(KF6ColorScheme) >= %{kf6_version}
BuildRequires: cmake(KF6Config) >= %{kf6_version}
BuildRequires: cmake(KF6CoreAddons) >= %{kf6_version}
BuildRequires: cmake(KF6FrameworkIntegration) >= %{kf6_version}
BuildRequires: cmake(KF6GuiAddons) >= %{kf6_version}
BuildRequires: cmake(KF6I18n) >= %{kf6_version}
BuildRequires: cmake(KF6IconThemes) >= %{kf6_version}
BuildRequires: cmake(KF6KCMUtils) >= %{kf6_version}
BuildRequires: cmake(KF6KirigamiPlatform) >= %{kf6_version}
BuildRequires: cmake(KF6WindowSystem) >= %{kf6_version}
BuildRequires: cmake(Qt6Core) >= %{qt6_version}
BuildRequires: cmake(Qt6DBus) >= %{qt6_version}
BuildRequires: cmake(Qt6Quick) >= %{qt6_version}
BuildRequires: cmake(Qt6Widgets) >= %{qt6_version}

%description
Lightly is a fork of breeze theme style that aims to be visually modern and minimalistic.

%prep
%autosetup -n %{name}-%{version} -p1

%build
%cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DKDE_INSTALL_USE_QT_SYS_PATHS=ON
%cmake_build

%install
%cmake_install


%fdupes %{buildroot}/%{_prefix}

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%license COPYING
%doc AUTHORS README.md

%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel_version}

%{_libdir}/lib%{_style}common5.so.*
%{_libdir}/lib%{_style}common6.so.*
%{_datadir}/applications/%{_style}styleconfig.desktop
%{_datadir}/applications/kcm_%{_style}decoration.desktop
%{_datadir}/kservices6/%{_style}decorationconfig.desktop
%dir %{_kf6_qtplugindir}
%dir %{_kf6_qtplugindir}/org.kde.kdecoration2.kcm
%{_kf6_qtplugindir}/org.kde.kdecoration2.kcm/kcm_%{_style}decoration.so
%dir %{_kf6_qtplugindir}/org.kde.kdecoration2/
%{_kf6_qtplugindir}/org.kde.kdecoration2/org.kde.%{_style}.so
%dir %{_kf6_qtplugindir}/kstyle_config
%{_kf6_qtplugindir}/kstyle_config/%{_style}styleconfig.so
%dir %{_kf5_qtplugindir}/styles
%{_kf5_qtplugindir}/styles/%{_style}5.so
%dir %{_kf6_qtplugindir}/styles
%{_kf6_qtplugindir}/styles/%{_style}6.so
%dir %{_datadir}/kstyle
%dir %{_datadir}/kstyle/themes
%{_datadir}/kstyle/themes/%{_style}.themerc
%{_bindir}/%{_style}-settings6
%dir %{_datadir}/icons/hicolor/scalable
%dir %{_datadir}/icons/hicolor/scalable/apps
%{_datadir}/icons/hicolor/scalable/apps/%{_style}-settings.svgz
%dir %{_datadir}/color-schemes/
%{_datadir}/color-schemes/%{style}.colors
%{_libdir}/cmake/%{style}/


%else
#OpenSUSE

%{_libdir}/lib%{_style}common5.so.*
%{_libdir}/lib%{_style}common6.so.*
%{_kf6_applicationsdir}/%{_style}styleconfig.desktop
%{_kf6_applicationsdir}/kcm_%{_style}decoration.desktop
%{_datadir}/kservices6/%{_style}decorationconfig.desktop
%dir %{_kf6_plugindir}
%dir %{_kf6_plugindir}/org.kde.kdecoration2.kcm
%{_kf6_plugindir}/org.kde.kdecoration2.kcm/kcm_%{_style}decoration.so
%dir %{_kf6_plugindir}/org.kde.kdecoration2/
%{_kf6_plugindir}/org.kde.kdecoration2/org.kde.%{_style}.so
%dir %{_kf6_plugindir}/kstyle_config
%{_kf6_plugindir}/kstyle_config/%{_style}styleconfig.so
%dir %{_kf5_plugindir}/styles
%{_kf5_plugindir}/styles/%{_style}5.so
%dir %{_kf6_plugindir}/styles
%{_kf6_plugindir}/styles/%{_style}6.so
%dir %{_kf6_sharedir}/kstyle
%dir %{_kf6_sharedir}/kstyle/themes
%{_kf6_sharedir}/kstyle/themes/%{_style}.themerc
%{_kf6_bindir}/%{_style}-settings6
%dir %{_kf6_iconsdir}/hicolor/scalable
%dir %{_kf6_iconsdir}/hicolor/scalable/apps
%{_kf6_iconsdir}/hicolor/scalable/apps/%{_style}-settings.svgz
%dir %{_datadir}/color-schemes/
%{_datadir}/color-schemes/%{style}.colors
%{_kf6_libdir}/cmake/%{style}/

%endif

%if 0%{?fedora} || 0%{?centos_version} || 0%{?rhel_version}

%changelog
%autochangelog

%else
#OpenSUSE

%changelog

%endif
Loading

0 comments on commit 535ad99

Please sign in to comment.