File aMule.spec of Package aMule
#
# spec file for package aMule
#
# Copyright (c) 2025 Packman Team <packman@links2linux.de>
#
# 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.links2linux.org/
#
%define _name amule
Name: aMule
Version: 3.0.1
Release: 0
Summary: Another eMule file-sharing program
License: GPL-2.0-or-later
Group: Productivity/Networking/Other
#URL: https://www.amule.org
#https://github.com/amule-project/amule
URL: https://amule-org.github.io
#https://github.com/amule-org/amule
Source0: %{_name}-%{version}.tar.gz
Patch0: FTBFS-%{name}-leap-15.6.patch
Patch1: define_MULE_EVT_NOTIFY.patch
BuildRequires: binutils-devel
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: libcurl-devel
BuildRequires: libayatana-appindicator3-devel
BuildRequires: libmaxminddb-devel
BuildRequires: man-pages-ro
BuildRequires: mozilla-nspr
BuildRequires: pkgconfig
BuildRequires: po4a
BuildRequires: readline-devel
BuildRequires: update-desktop-files
BuildRequires: wxWidgets-3_2-nostl-devel
BuildRequires: pkgconfig(cryptopp)
BuildRequires: pkgconfig(gdlib)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(libupnp)
Conflicts: aMule-kde4
%description
aMule stand for another eMule file-sharing program, it is also
another fork of the xMule (former lMule) project. It connects
to eDonkey2000 network, supports Linux, *BSD platforms, and has
a new vision of the GUI.
%lang_package
%prep
%autosetup -p1 -n %{_name}-%{version}
%build
#override version "GIT"
if grep -qF 'VERSION "GIT"' CMakeLists.txt ; then
VER=$(echo %{version} | cut -f1-3 -d.)
SDATE=$(echo %{version} | cut -f4 -d.)
if grep -q '^[[:digit:]]\{8\}$' <<<$SDATE ; then
sed -i '/VERSION "GIT"/s@.*@set (VERSION "'$VER'")\nset (SVNDATE "git '$SDATE'")@' CMakeLists.txt
fi
fi
%cmake \
-DBUILD_ALC=ON \
-DBUILD_ALCC=ON \
-DBUILD_AMULECMD=ON \
-DBUILD_CAS=ON \
-DBUILD_DAEMON=ON \
-DBUILD_ED2K=ON \
-DBUILD_FILEVIEW=ON \
-DBUILD_MONOLITHIC=ON \
-DBUILD_REMOTEGUI=ON \
-DBUILD_WEBSERVER=ON \
-DBUILD_WXCAS=ON \
-DBUILD_XAS=ON \
-DENABLE_UPNP=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_DOCDIR=%{_defaultdocdir}/%{name}
find %{_includedir} -type f -name "bmpbndl.h" -print
%cmake_build
%install
%cmake_install
%suse_update_desktop_file -G "P2P Client" -i org.amule.aMule Network P2P
%suse_update_desktop_file %{buildroot}%{_datadir}/applications/alc.desktop
%suse_update_desktop_file %{buildroot}%{_datadir}/applications/org.amule.aMule.gui.desktop
%suse_update_desktop_file %{buildroot}%{_datadir}/applications/wxcas.desktop
%find_lang %{name} --all-name --with-man
%fdupes %{buildroot}
%files
%license LICENSE.md
%doc docs/AUTHORS.md
%doc %{_defaultdocdir}/*
%{_bindir}/alc
%{_bindir}/alcc
%{_bindir}/amule
%{_bindir}/amulecmd
%{_bindir}/amuled
%{_bindir}/amulegui
%{_bindir}/amuleweb
%{_bindir}/cas
%{_bindir}/ed2k
%{_bindir}/fileview
%{_bindir}/wxcas
%dir %{_datadir}/amule
%{_datadir}/amule/skins
%{_datadir}/amule/webserver
%{_datadir}/applications/alc.desktop
%{_datadir}/applications/org.amule.aMule.desktop
%{_datadir}/applications/org.amule.aMule.gui.desktop
%{_datadir}/applications/wxcas.desktop
%{_datadir}/cas
%{_datadir}/pixmaps/*.xpm
%{_datadir}/pixmaps/*.png
%{_datadir}/icons/hicolor/128x128/apps/*.png
%{_datadir}/icons/hicolor/256x256/apps/*.png
%{_datadir}/metainfo/org.amule.aMule.metainfo.xml
%{_mandir}/man1/alc.1%{?ext_man}
%{_mandir}/man1/alcc.1%{?ext_man}
%{_mandir}/man1/amule.1%{?ext_man}
%{_mandir}/man1/amulecmd.1%{?ext_man}
%{_mandir}/man1/amuled.1%{?ext_man}
%{_mandir}/man1/amulegui.1%{?ext_man}
%{_mandir}/man1/amuleweb.1%{?ext_man}
%{_mandir}/man1/cas.1%{?ext_man}
%{_mandir}/man1/ed2k.1%{?ext_man}
%{_mandir}/man1/wxcas.1%{?ext_man}
%files lang -f %{name}.lang
%changelog