File NetMauMau-server.spec of Package NetMauMau-server
#
# spec file for package NetMauMau-server
#
# Copyright (c) 2020 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
# See also http://en.opensuse.org/openSUSE:Specfile_guidelines
%define sourcename NetMauMau
%define progname netmaumau
%define so_ver_common 6
%define so_ver_client 5
%if 0%{?suse_version} > 1500
%define _lto_cflags %{nil}
%endif
Name: NetMauMau-server
Version: 0.24.4
Release: 0
Summary: The NetMauMau server
License: GPL-3.0-or-later
Group: Amusements/Games/Board/Card
URL: https://github.com/velnias75/NetMauMau
Source0: https://github.com/velnias75/NetMauMau/archive/V%{version}/%{name}-%{version}.tar.gz
Source99: %{name}.rpmlintrc
Patch0: %{name}_xinetd.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: doxygen
BuildRequires: fdupes
#BuildRequires: xxd from vlm?
BuildRequires: file-devel
BuildRequires: gcc-c++
BuildRequires: gsl-devel
BuildRequires: libtool
BuildRequires: pkgconfig
#Patch1: %%{name}_lua.patch
BuildRequires: popt-devel >= 1.10
BuildRequires: sqlite3-devel
BuildRequires: vim
BuildRequires: xinetd
BuildRequires: zlib-devel
Requires: libnetmaumauclient%{so_ver_client} = %{version}
Requires: libnetmaumaucommon%{so_ver_common} = %{version}
%if 0%{?suse_version} > 1320
BuildRequires: pkgconfig(lua5.3) >= 5.3.3
%else
BuildRequires: pkgconfig(lua) < 5.4
%endif
%description
Play the popular card game Mau Mau against the computer or over the network with your friends.
This is the NetMauMau server.
%package -n netmaumau-devel
Summary: NetMauMau library header files
Group: Development/Languages/C and C++
Requires: %{name} = %{version}
Requires: libnetmaumauclient%{so_ver_client} = %{version}
Requires: libnetmaumaucommon%{so_ver_common} = %{version}
%description -n netmaumau-devel
Development Libraries for NetMauMau Server
%package -n libnetmaumauclient%{so_ver_client}
Summary: NetMauMau client library
Group: System/Libraries
%description -n libnetmaumauclient%{so_ver_client}
Share Libraries for NetMauMau Server
%package -n libnetmaumaucommon%{so_ver_common}
Summary: NetMauMau client library
Group: System/Libraries
%description -n libnetmaumaucommon%{so_ver_common}
Share Libraries for NetMauMau Server
%prep
%setup -q -n %{sourcename}-%{version}
%patch0 -p1
#%%patch1 -p1
chmod -x *pdf
%build
autoreconf -ifv
%configure --localstatedir=%{_datadir}/games --datarootdir=%{_datadir}/games --datadir=%{_datadir}/games
%make_build CPPFLAGS=-DNDEBUG
%install
make install DESTDIR=%{buildroot} docdir=%{_docdir}/%{name}-devel
rm -rf %{buildroot}%{_libdir}/libnetmaumauclient.la
rm -rf %{buildroot}%{_libdir}/libnetmaumaucommon.la
%fdupes -s %{buildroot}
%post -n libnetmaumauclient%{so_ver_client} -p /sbin/ldconfig
%postun -n libnetmaumauclient%{so_ver_client} -p /sbin/ldconfig
%post -n libnetmaumaucommon%{so_ver_common} -p /sbin/ldconfig
%postun -n libnetmaumaucommon%{so_ver_common} -p /sbin/ldconfig
%files
%doc *.pdf README.md
%exclude %{_libdir}/*.a
%exclude %{_libdir}/*.so
%exclude %{_libdir}/pkgconfig/*.pc
%dir %{_datadir}/games/%{progname}
%config(noreplace) %{_sysconfdir}/xinetd.d/%{progname}
%config(noreplace) %{_sysconfdir}/bash_completion.d/nmm-server
%{_bindir}/nmm-server
%{_datadir}/games/%{progname}/*
%files -n netmaumau-devel
%doc %{_docdir}/%{name}-devel/
%dir %{_includedir}/%{progname}
%{_includedir}/%{progname}/*
%{_libdir}/*.a
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%files -n libnetmaumauclient%{so_ver_client}
%{_libdir}/libnetmaumauclient.so.%{so_ver_client}*
%files -n libnetmaumaucommon%{so_ver_common}
%{_libdir}/libnetmaumaucommon.so.%{so_ver_common}*
%changelog