File skylendar.spec of Package skylendar
#
# spec file for package skylendar
#
# Copyright (c) 2019 Peter Lader (lader1)
# Copyright (c) 2023 Malcolm J Lewis <malcolmlewis@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: skylendar
Version: 5.1.1pn
Release: 0
License: GPL-2.0
Summary: Astrology software
URL: https://sourceforge.net/projects/skylendar
Source0: https://cytranet.dl.sourceforge.net/project/skylendar/%{name}-%{version}.tar.xz
Group: Productivity/Scientific/Other
#Patch0: skylendar-postgresql-version.patch
#PATCH-FIX-OPENSUSE skylendar-desktop-file.patch malcolmlewis@opensuse.org -- Fix desktop mimetype duplicate.
Patch1: skylendar-desktop-file.patch
BuildRequires: fdupes
BuildRequires: fontpackages-devel
BuildRequires: gcc-c++
BuildRequires: hicolor-icon-theme
BuildRequires: mkfontdir
BuildRequires: postgresql-server-devel
BuildRequires: update-desktop-files
BuildRequires: cmake(Qt5LinguistTools)
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Network)
BuildRequires: pkgconfig(Qt5PrintSupport)
BuildRequires: pkgconfig(Qt5Sql)
BuildRequires: pkgconfig(Qt5Svg)
BuildRequires: pkgconfig(Qt5Widgets)
BuildRequires: pkgconfig(Qt5Xml)
BuildRequires: pkgconfig(libpq)
BuildRequires: pkgconfig(zlib)
Requires: postgresql-server >= 14.1
Requires: libqt5-sql-postgresql >= 5.15.5
Requires: perl >= 5.16
Requires: perl(XML::DOM) >= 1.44
Requires: perl(DBD::Pg)
%description
A powerful, portable and modern design astrology program, based on the swisseph
library, with multitasking charts and data stored in a SQL database (postgresql).
%prep
%autosetup -p1
%build
%cmake -DPostgreSQL_TYPE_INCLUDE_DIR="%{_includedir}/pgsql/server" ../
%cmake_build
%install
%cmake_install
## Fix desktop file icon location
mkdir -p %{buildroot}%{_datadir}/pixmaps
pushd %{buildroot}%{_datadir}
mv icons/* pixmaps/
popd
## Remove files we install with %%doc
rm -f %{buildroot}%{_datadir}/skylendar/{HISTORY.txt,README,COPYING}
%suse_update_desktop_file -n skylendar
%suse_update_desktop_file -n skydmin
%fdupes -s %{buildroot}%{_datadir}
## FIXME non-executable-script
chmod 0755 %{buildroot}%{_datadir}/skylendar/pp.pl
%files
%doc AUTHORS HISTORY.txt README TODO
%license COPYING
%{_bindir}/skylendar
%{_bindir}/skydmin
%{_datadir}/applications/skylendar.desktop
%{_datadir}/applications/skydmin.desktop
%{_datadir}/skylendar/
%{_datadir}/pixmaps/skylendar.png
%{_datadir}/pixmaps/skydmin.png
%{_datadir}/pixmaps/skif.png
%{_datadir}/mime/packages/skif.xml
%dir %{_datadir}/fonts/Type1
%{_datadir}/fonts/Type1/skylendar.pfb
/usr/lib/postgresql*/lib64/libadate.so
%changelog