diff --git a/.github/workflows/package-fedora.yml b/.github/workflows/package-fedora.yml new file mode 100644 index 000000000..82da1329d --- /dev/null +++ b/.github/workflows/package-fedora.yml @@ -0,0 +1,37 @@ +name: Package GEDKeeper3 for Fedora + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +env: + DOTNET_VERSION: '6.0.*' + +jobs: + build-fedora: + runs-on: ubuntu-latest + steps: + - name: Init + uses: actions/checkout@v3 + with: + submodules: recursive + - name: .NET SDK check + run: dotnet sdk check +# error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'freebsd-x64' +# https://learn.microsoft.com/en-us/dotnet/devops/dotnet-build-github-action +# - name: Install dependencies +# run: dotnet restore +# working-directory: projects/GKv3 + - name: Build + run: dotnet build -c Linux_Release + working-directory: projects/GKv3 + - name: Package + run: rpmbuild --build-in-place -bb deploy/rpm/gedkeeper-github.spec + - name: Upload + uses: actions/upload-artifact@v3 + with: + name: gedkeeper3-rpm + path: ~/rpmbuild/RPMS/x86_64/*.rpm + if-no-files-found: error diff --git a/deploy/rpm/gedkeeper-github.spec b/deploy/rpm/gedkeeper-github.spec new file mode 100644 index 000000000..1859833c8 --- /dev/null +++ b/deploy/rpm/gedkeeper-github.spec @@ -0,0 +1,61 @@ +%define summary GEDKeeper - program for work with personal genealogical database. + +Name: gedkeeper +Version: 3.2.1 +Release: 1%{?dist} +Summary: %{summary} +License: GPLv3 +Group: Applications/Editors +Url: https://github.com/serg-norseman/gedkeeper +BuildArch: x86_64 + +AutoReqProv:no +AutoReq: no +Requires: dotnet-runtime-6.0 +Requires: sqlite + +%install + +# main install +mkdir -p %{buildroot}%{_libdir}/%{name} +cp -r bin \ + locales \ + plugins \ + samples \ + scripts %{buildroot}%{_libdir}/%{name} + +# clean multi-arch builds (TODO: fix me) +ls -la %{buildroot}%{_libdir}/%{name}/plugins/runtimes/ +rm -rf %{buildroot}%{_libdir}/%{name}/plugins/runtimes +install -t %{buildroot}%{_libdir}/%{name}/plugins/runtimes/linux-x64/native/ -D plugins/runtimes/linux-x64/native/* +ls -la %{buildroot}%{_libdir}/%{name}/plugins/runtimes/ + +# symlink to binary file +mkdir -p %{buildroot}%{_bindir} +ln -fs %{_libdir}/%{name}/bin/GEDKeeper3 %{buildroot}%{_bindir}/%{name} + +#rpm --eval %{_metainfodir} # not found (TODO: check rpm version, make metainfo) +#install -D deploy/%{name}.metainfo.xml %{buildroot}%{_metainfodir}/%{name}.metainfo.xml +#install -D deploy/%{name}.metainfo.xml %{buildroot}%{_datadir}/metainfo/%{name}.metainfo.xml +install -D deploy/application-x-%{name}.xml %{buildroot}%{_datadir}/mime/packages/%{name}.xml +install -D deploy/rpm/%{name}.desktop %{buildroot}%{_datadir}/applications/%{name}.desktop +install -D deploy/%{name}.png %{buildroot}%{_datadir}/pixmaps/%{name}.png + +cd %{buildroot} +chmod -Rf a-x,a+rX,u+w,g-w,o-w . +chmod a+x %{buildroot}%{_libdir}/%{name}/bin/GEDKeeper3 + +%files +%license LICENSE +%{_bindir}/%{name} +%{_libdir}/%{name} +%{_datadir}/mime/packages/%{name}.xml +%{_datadir}/applications/%{name}.desktop +%{_datadir}/pixmaps/%{name}.png + +%description +%{summary} + +%changelog +* Fri Apr 28 2023 GEDKeeper - 3.2.1 +- New upstream release diff --git a/deploy/rpm/gedkeeper.desktop b/deploy/rpm/gedkeeper.desktop new file mode 100644 index 000000000..9681ea9c6 --- /dev/null +++ b/deploy/rpm/gedkeeper.desktop @@ -0,0 +1,23 @@ +[Desktop Entry] +Name=GEDKeeper +Comment=Personal genealogical database editor +Comment[cs]=Editor osobní genealogické databáze +Comment[de]=Persönlicher genealogischer Datenbankeditor +Comment[es]=Editor de una base de datos genealógica personal +Comment[fr]=L'éditeur personnelle généalogique de la base de données +Comment[it]=Editor di un database genealogico personali +Comment[kk]=Жеке генеалогиялық деректер қорының редакторы +Comment[pl]=Edytor osobista baza genealogiczna +Comment[pt]=Editor de um banco de dados genealógico pessoal +Comment[ru]=Редактор персональной генеалогической базы данных +Comment[uk]=Редактор персональної генеалогічної бази даних +Comment[zh]=个人系谱数据库编辑器 +Path=/usr/bin/ +Exec=gedkeeper +MimeType=application/x-gedkeeper +MimeType=application/x-gedcom +Icon=/usr/share/pixmaps/gedkeeper.png +Terminal=false +Type=Application +Categories=Office +StartupNotify=true diff --git a/deploy/rpm/gedkeeper.spec b/deploy/rpm/gedkeeper.spec index c43c40e6f..8969963b8 100644 --- a/deploy/rpm/gedkeeper.spec +++ b/deploy/rpm/gedkeeper.spec @@ -8,13 +8,10 @@ Summary: %{summary} License: GPLv3 Group: Applications/Editors Url: https://github.com/serg-norseman/gedkeeper -Source: %{name}-%{version}.tar.gz +Source: %{name}-%{version}.tar.gz BuildArch: x86_64 -#Requires: mono-core -#Requires: mono-data -#Requires: mono-winforms -#Requires: lua +Requires: dotnet-runtime-6.0 Requires: sqlite AutoReq: no @@ -33,11 +30,6 @@ AutoReqProv: no %prep %setup -qc -find . -type f -iname "*.dll" -exec chmod -x {} \; -find ./locales -type f -exec chmod -x '{}' \; -find ./plugins -type f -exec chmod -x '{}' \; -find ./scripts -type f -exec chmod -x '{}' \; -find ./samples -type f -exec chmod -x '{}' \; %install install -Dm 0755 gk_run.sh %{buildroot}%{_bindir}/gk_run.sh @@ -52,7 +44,7 @@ cp -r bin \ scripts %{buildroot}%{_libdir}/%{name} ## E: zero-length -rm -rf %{buildroot}%{_libdir}/%{name}/scripts/readme.txt +#rm -rf %{buildroot}%{_libdir}/%{name}/scripts/readme.txt %changelog * Apr 28 2023 GEDKeeper - 3.2.1 diff --git a/deploy/rpm/gk_files.txt b/deploy/rpm/gk_files.txt index b06695bde..f757e6798 100644 --- a/deploy/rpm/gk_files.txt +++ b/deploy/rpm/gk_files.txt @@ -3,25 +3,7 @@ ./gedkeeper.desktop ./application-x-gedkeeper.xml ./gedkeeper.appdata.xml -../bin/GEDKeeper3.exe -../bin/GKCore.dll -../bin/GKComponents.dll -../bin/BSLib.dll -../bin/BSLib.DataViz.Model.dll -../bin/BSLib.SQLite.dll -../bin/RtfWriter.dll -../bin/ExcelLibrary.dll -../bin/GKMap.Core.dll -../bin/GKMap.WinForms.dll -../bin/itextsharp.dll -../bin/KopiLua.dll -../bin/NLua.dll -../bin/NLog.dll -../bin/nVLC.dll -../bin/UtfUnknown.dll -../bin/YamlDotNet.dll -../bin/Newtonsoft.Json.dll -../bin/ZedGraph.dll +../bin/ ../LICENSE ../locales/ ../plugins/