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 https://bugs.opensuse.org/
#

Name:           iMule
Version:        2.3.3.3
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)
%endif
BuildRequires:  pkgconfig(zlib)
BuildRequires:  update-desktop-files
BuildRequires:  wxGTK2-devel

%description
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.

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

%build
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 \
    --with-zlib
make %{?_smp_mflags}

%install
%make_install
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
%{_bindir}/*
%{_datadir}/applications/*
%{_datadir}/pixmaps/*
%{_mandir}/man1/*
%{_mandir}/*/man1/*
%dir %{_mandir}/tr
%dir %{_mandir}/tr/man1
%docdir %{_datadir}/doc/*
%{_datadir}/doc/*
%{_datadir}/casdata
%{_datadir}/imule

%changelog