File iMule.spec of Package iMule

# spec file for package iMule
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# 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

Name:           iMule
Release:        0
Summary:        I2P aware version of aMule
License:        GPL-2.0-or-later
Group:          Productivity/Networking/File-Sharing
URL:            http://imule.i2p/
Source:         http://www.imule.i2p/files/download.php?Fichier=iMule-%{version}-src.tbz
Patch0:         new_cryptopp.patch
Patch1:         name_fix.patch
BuildRequires:  bison
BuildRequires:  fdupes
BuildRequires:  flex
BuildRequires:  gcc-c++
BuildRequires:  man
BuildRequires:  pkgconfig(cryptopp)
BuildRequires:  pkgconfig(gdlib)
BuildRequires:  pkgconfig(libpng)
%if %{suse_version} <= 1500
# This is probably a missed dependency of wxWidgets
BuildRequires:  pkgconfig(xpm)
BuildRequires:  pkgconfig(zlib)
BuildRequires:  update-desktop-files
BuildRequires:  wxGTK2-devel

iMule is a peer to peer file sharing client, based on the well known eMule.
Starting with 2.0.0 iMule works on Linux, Mac, *BSD and Windows, which makes it
the first multi-platform edonkey network client.

%setup -q -n iMule-%{version}-src
%patch0 -p1
%patch1 -p1

export CCACHE_COMPILERCHECK="string:$(rpm -q -f $(realpath /usr/bin/c++))"
%configure \
    --disable-debug \
    --disable-gmp \
    --disable-rpath \
    --disable-upnp \
    --enable-alc \
    --enable-alcc \
    --enable-cas \
    --enable-imulecmd \
    --enable-imule-daemon \
    --enable-imule-gui \
    --enable-mmap \
    --enable-optimize \
    --enable-webserver \
    --enable-wxcas \
    --with-denoise-level=0 \
make %{?_smp_mflags}

rm %{buildroot}%{_datadir}/doc/imule/INSTALL
%fdupes -s %{buildroot}%{_datadir}/imule/webserver/
%find_lang imule
%suse_update_desktop_file imule Network P2P

%files -f imule.lang
%dir %{_mandir}/tr
%dir %{_mandir}/tr/man1
%docdir %{_datadir}/doc/*