%global uuid com.github.dail8859.NotepadNext %global qtversion 6 %global dep1_name SingleApplication %global dep1_ver 3.5.1 # TODO: disable uchardet for f38+ as we got this in the repos # package: uchardet-devel %global dep2_name uchardet %global dep2_ver 0.0.8 %global dep3_name editorconfig-core-qt %global dep3_commit ee967262db4fdbd735f9971cc0c90cf4f3100d3a %global dep3_scommit %(c=%{dep3_commit}; echo ${c:0:7}) %global dep4_name Qt-Advanced-Docking-System %global dep4_ver 4.3.1 %global dep5_name QSimpleUpdater %global dep5_commit 911727370d90001077f93ea94545099e197400a0 %global dep5_scommit %(c=%{dep5_commit}; echo ${c:0:7}) Name: NotepadNext Version: 0.9 Release: 1%{?dist} Summary: A cross-platform, reimplementation of Notepad++ License: GPLv3 URL: https://github.com/dail8859/%{name} Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz # Dependencys Source1: https://github.com/itay-grudev/%{dep1_name}/archive/v%{dep1_ver}/%{dep1_name}-%{dep1_ver}.tar.gz Source2: https://gitlab.freedesktop.org/%{dep2_name}/%{dep2_name}/-/archive/v%{dep2_ver}/%{dep2_name}-v%{dep2_ver}.tar.bz2 Source3: https://github.com/editorconfig/%{dep3_name}/archive/%{dep3_commit}/%{dep3_name}-%{dep3_scommit}.tar.gz Source4: https://github.com/githubuser0xFFFF/%{dep4_name}/archive/%{dep4_ver}/%{dep4_name}-%{dep4_ver}.tar.gz Source5: https://github.com/alex-spataru/%{dep5_name}/archive/%{dep5_commit}/%{dep5_name}-%{dep5_scommit}.tar.gz BuildRequires: desktop-file-utils BuildRequires: make # dependency from .gitmodule #BuildRequires: uchardet-devel %if %{qtversion} == 5 # qt 5 deps BuildRequires: pkgconfig(Qt5) BuildRequires: qt5-linguist BuildRequires: qt5-qttranslations BuildRequires: qt5-qtbase-private-devel %elif %{qtversion} == 6 # qt 6 BuildRequires: pkgconfig(Qt6) BuildRequires: qt6-linguist BuildRequires: qt6-qtbase-private-devel BuildRequires: qt6-qt5compat-devel BuildRequires: qt6-qttranslations BuildRequires: libxkbcommon-devel %endif BuildRequires: libappstream-glib Requires: hicolor-icon-theme %description A cross-platform, reimplementation of Notepad++. %prep %setup -q # disable default uchardet include #sed -i 's#.*uchardet.*#INCLUDEPATH += /usr/include/uchardet#' src/NotepadNext/NotepadNext.pro #sed -i 's#.*uchardet.*#QMAKE_CXXFLAGS += -isystem#' src/NotepadNext/NotepadNext.pro # rewrite header to the location on fedora #sed -i 's#uchardet.h#uchardet/uchardet.h#' src/NotepadNext/ScintillaNext.cpp %setup -q -D -T -a1 %setup -q -D -T -a2 %setup -q -D -T -a3 %setup -q -D -T -a4 %setup -q -D -T -a5 mv %{dep1_name}-%{dep1_ver}/* src/singleapplication mv %{dep2_name}-v%{dep2_ver}/* src/%{dep2_name} mv %{dep3_name}-%{dep3_commit}/* src/%{dep3_name} mv %{dep4_name}-%{dep4_ver}/* src/ads mv %{dep5_name}-%{dep5_commit}/* src/%{dep5_name} mkdir -p %{_vpath_builddir} %build pushd %{_vpath_builddir} %if %{qtversion} == 5 %qmake_qt5 \ %else %qmake_qt6 \ %endif PREFIX=%{buildroot}%{_prefix} \ ../src/%{name}.pro # INCLUDEPATH+=/usr/include/uchardet \ # QMAKE_CXXFLAGS+=-isystem %make_build popd #make_build -C %{_vpath_builddir} %install %make_install -C %{_vpath_builddir} #INSTALL_ROOT=%{buildroot} install -Dpm 0644 deploy/linux/%{uuid}.metainfo.xml \ %{buildroot}%{_metainfodir}/%{uuid}.metainfo.xml %check appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{uuid}.metainfo.xml desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop %files %license LICENSE %doc README.md doc/ %{_bindir}/NotepadNext %{_datadir}/applications/%{name}.desktop %{_metainfodir}/%{uuid}.metainfo.xml %{_datadir}/icons/hicolor/scalable/mimetypes/%{name}.svg %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %changelog * Wed Nov 20 2024 Christian Birk - 0.9-1 - new version * Tue Jun 25 2024 Christian Birk - 0.8-1 - new version * Sat Feb 24 2024 Christian Birk - 0.7-1 - new version * Fri Oct 20 2023 Christian Birk - 0.6.4-1 - new version * Fri Jun 02 2023 Christian Birk - 0.6.3-1 - new version * Fri Apr 07 2023 Christian Birk - 0.6.1-1 - new version * Fri Jan 13 2023 Christian Birk - 0.6-1 - new version * Sun Nov 20 2022 Christian Birk - 0.5.6-1 - new version * Sat Sep 24 2022 Christian Birk - 0.5.5-1 - new version * Tue Aug 02 2022 Christian Birk - 0.5.4-1 - new version * Wed Jul 06 2022 Christian Birk - 0.5.3-1 - new version * Sat May 28 2022 Christian Birk - 0.5.2-1 - new version