%define section Internet/Remote Access %define title Amule %define longtitle another eMule p2p client %define summary aMule - another eMule p2p client %define _prefix /usr/local %define _menudir /usr/lib/menu Summary: %summary Name: aMule-SVN Version: r[RELEASE] Release: mdv81 License: GPL Group: Applications/Internet Packager: www.aMule.org Distribution: Mandriva 2008.0 Vendor: The aMule Project URL: http://www.amule.org Source: %{name}-%{version}.tar.bz2 Prefix: %{_prefix} BuildRoot: %{_builddir}/%{name}-%{version}-root #These dependencies do not always work, so lets leave them out for now #Requires: wxGTK >= 2.8.9, wxBase >= 2.8.9, libupnp >= 1.6.6 #BuildPreReq: wxGTK-devel >= 2.8.9, grep, automake >= 1.7 BuildPreReq: grep, automake >= 1.7, ImageMagick Provides: %{name} Obsoletes: %{name} AutoReq: 0 %define _iconsdir /usr/share/icons %define _miconsdir /usr/share/icons/mini %define _liconsdir /usr/share/icons/large %define Icon00 %{_datadir}/pixmaps/amule.xpm %define Icon10 %{_datadir}/pixmaps/wxcas.xpm %define Icon20 %{_datadir}/pixmaps/alc.xpm %define Icon30 %{_datadir}/pixmaps/amulegui.xpm %define Icon01 $RPM_BUILD_ROOT%{_miconsdir}/%{name}.png %define Icon02 $RPM_BUILD_ROOT%{_iconsdir}/%{name}.png %define Icon03 $RPM_BUILD_ROOT%{_liconsdir}/%{name}.png %define Icon11 $RPM_BUILD_ROOT%{_miconsdir}/wxcas.png %define Icon12 $RPM_BUILD_ROOT%{_iconsdir}/wxcas.png %define Icon13 $RPM_BUILD_ROOT%{_liconsdir}/wxcas.png %define Icon21 $RPM_BUILD_ROOT%{_miconsdir}/alc.png %define Icon22 $RPM_BUILD_ROOT%{_iconsdir}/alc.png %define Icon23 $RPM_BUILD_ROOT%{_liconsdir}/alc.png %define Icon31 $RPM_BUILD_ROOT%{_miconsdir}/amulegui.png %define Icon32 $RPM_BUILD_ROOT%{_iconsdir}/amulegui.png %define Icon33 $RPM_BUILD_ROOT%{_liconsdir}/amulegui.png %description aMule is a peer to peer file sharing client, based on the well known eMule. Starting with 2.0.0 aMule works on Linux, Mac, *BSD and Windows, which makes it the first multi-platform edonkey network client. %pre clear if test `echo $LC_CTYPE | cut -c1-5` != 'fr_FR' ; then echo "************************************************************************************" echo "Warning: This is a cvs release intended for Mandriva 2008 Spring only!" echo "This release is made for testing purpose and it may cause several problems," echo "burn your house, kill your dog, etc, but it *should* be safe to use anyway." echo "This version uses wxGTK 2.8.9 Unicode." echo "The menu entry will be in 'Internet/File Transfer'" echo "If you would like to test some of the great new features (kademlia, etc) go on and install." echo "Otherwise you may press ctrl-c within the next 10 seconds to abort the installation." echo "" echo -n " Waiting ... " for i in $(seq 10 -1 1); do echo -n "$i, " sleep 1 done echo " 0, ok, let's go ... Muhahaha :), installing." else echo "************************************************************************************" echo "Attention : ceci est une release CVS pour Mandriva 2008 Spring seulement !" echo "Elle est faite pour des tests et peut causer de nombreux probl�mes, comme" echo "br�ler votre maison, tuer votre chien, etc, mais normalement �a *devrait* marcher." echo "Cette version s'appuie sur wxGTK 2.8.9 Unicode." echo "L'entr�e de menu sera dans 'Internet / Transfert de Fichiers'" echo "Si vous voulez tester les nouveaut�s (kademlia principalement), continuez L'installation." echo "Sinon, appuyez sur Ctrl-C dans les 10 secondes qui viennent pour l'interrompre." echo "" echo -n " Attente ... " for i in $(seq 10 -1 1); do echo -n "$i, " sleep 1 done echo " 0, ok, alors on y va ... Muhahaha :), installation en cours." fi %prep %setup -q -n %{name}-%{version} ./autogen.sh CFLAGS="$RPM_OPT_FLAGS -Os" ./configure \ --prefix=%{_prefix} \ --disable-debug \ --enable-cas \ --enable-wxcas \ --enable-amulecmd \ --enable-amule-gui \ --enable-webserver \ --enable-webservergui \ --enable-ccache \ --enable-kad-compile \ --enable-amulecmdgui \ --enable-amule-daemon \ --enable-embedded_crypto \ --enable-monolithic \ --enable-ed2k \ --enable-alc \ --enable-alcc \ --enable-systray \ --enable-geoip \ --with-wx-config=`rpm -ql wxGTK-devel|grep 'wxgtk-2\.[0-9]-config'` \ --with-wxbase-config=`rpm -ql wxBase|grep 'wxbase-2\.[0-9]-config'` %build %{__make} %install [ ! "$RPM_BUILD_ROOT" = "/" ] && rm -rf $RPM_BUILD_ROOT %{__make} prefix=$RPM_BUILD_ROOT%{_prefix} \ exec_prefix=$RPM_BUILD_ROOT%{_prefix} \ install #menu Debian %{__mkdir} -p $RPM_BUILD_ROOT%{_menudir} echo '?package(%name): command="%{_bindir}/amule" needs="X11" section="Internet/File Transfer" title="Amule-CVS" longtitle="%longtitle" icon="%name.png" startup_notify="true" xdg="true"' > $RPM_BUILD_ROOT%{_menudir}/%name echo '?package(%name): command="%{_bindir}/wxcas" needs="X11" section="Internet/File Transfer" title="Wxcas-CVS" longtitle="Online signature for aMule" icon="wxcas.png" startup_notify="true" xdg="true"' > $RPM_BUILD_ROOT%{_menudir}/wxcas-CVS echo '?package(%name): command="%{_bindir}/amulegui" needs="X11" section="Internet/File Transfer" title="amulegui-CVS" longtitle="aMule remote control" icon="amulegui.png" startup_notify="true" xdg="true"' > $RPM_BUILD_ROOT%{_menudir}/amulegui-CVS echo '?package(%name): command="%{_bindir}/alc" needs="X11" section="Internet/File Transfer" title="aLinkCreator-CVS" longtitle="aMule ed2k link creator" icon="alc.png" startup_notify="true" xdg="true"' > $RPM_BUILD_ROOT%{_menudir}/alc-CVS #icons %{__mkdir} -p $RPM_BUILD_ROOT%{_iconsdir} %{__mkdir} -p $RPM_BUILD_ROOT%{_miconsdir} %{__mkdir} -p $RPM_BUILD_ROOT%{_liconsdir} convert %{Icon00} -resize 16x16 %{Icon01} convert %{Icon00} -resize 32x32 %{Icon02} convert %{Icon00} -resize 48x48 %{Icon03} convert %{Icon10} -resize 16x16 %{Icon11} convert %{Icon10} -resize 32x32 %{Icon12} convert %{Icon10} -resize 48x48 %{Icon13} convert %{Icon20} -resize 16x16 %{Icon21} convert %{Icon20} -resize 32x32 %{Icon22} convert %{Icon20} -resize 48x48 %{Icon23} convert %{Icon30} -resize 16x16 %{Icon31} convert %{Icon30} -resize 32x32 %{Icon32} convert %{Icon30} -resize 48x48 %{Icon33} #Menu Xdg #Delete standard stuff rm -f $RPM_BUILD_ROOT%{_datadir}/applications/* echo "[Desktop Entry]" > $RPM_BUILD_ROOT%{_datadir}/applications/%name.desktop echo "Encoding=UTF-8" >>$RPM_BUILD_ROOT%{_datadir}/applications/%name.desktop echo "Name=%name" >>$RPM_BUILD_ROOT%{_datadir}/applications/%name.desktop echo "Exec=%{_bindir}/amule" >>$RPM_BUILD_ROOT%{_datadir}/applications/%name.desktop echo "Type=Application" >>$RPM_BUILD_ROOT%{_datadir}/applications/%name.desktop echo "Icon=%name" >>$RPM_BUILD_ROOT%{_datadir}/applications/%name.desktop echo "Terminal=false" >>$RPM_BUILD_ROOT%{_datadir}/applications/%name.desktop echo "Categories=Network;P2P;GTK;FileTransfer;" >>$RPM_BUILD_ROOT%{_datadir}/applications/%name.desktop echo "Comment=%longtitle" >>$RPM_BUILD_ROOT%{_datadir}/applications/%name.desktop echo "[Desktop Entry]" > $RPM_BUILD_ROOT%{_datadir}/applications/amule-gui-CVS.desktop echo "Encoding=UTF-8" >>$RPM_BUILD_ROOT%{_datadir}/applications/amule-gui-CVS.desktop echo "Name=aMuleGui-CVS" >>$RPM_BUILD_ROOT%{_datadir}/applications/amule-gui-CVS.desktop echo "Exec=%{_bindir}/amulegui" >>$RPM_BUILD_ROOT%{_datadir}/applications/amule-gui-CVS.desktop echo "Type=Application" >>$RPM_BUILD_ROOT%{_datadir}/applications/amule-gui-CVS.desktop echo "Icon=amulegui" >>$RPM_BUILD_ROOT%{_datadir}/applications/amule-gui-CVS.desktop echo "Terminal=false" >>$RPM_BUILD_ROOT%{_datadir}/applications/amule-gui-CVS.desktop echo "Categories=Network;P2P;GTK;FileTransfer;" >>$RPM_BUILD_ROOT%{_datadir}/applications/amule-gui-CVS.desktop echo "Comment=aMule remote control" >>$RPM_BUILD_ROOT%{_datadir}/applications/amule-gui-CVS.desktop echo "[Desktop Entry]" > $RPM_BUILD_ROOT%{_datadir}/applications/alc-CVS.desktop echo "Encoding=UTF-8" >>$RPM_BUILD_ROOT%{_datadir}/applications/alc-CVS.desktop echo "Name=aLinkCreator-CVS" >> $RPM_BUILD_ROOT%{_datadir}/applications/alc-CVS.desktop echo "Exec=%{_bindir}/alc" >> $RPM_BUILD_ROOT%{_datadir}/applications/alc-CVS.desktop echo "Icon=alc" >> $RPM_BUILD_ROOT%{_datadir}/applications/alc-CVS.desktop echo "Terminal=false" >> $RPM_BUILD_ROOT%{_datadir}/applications/alc-CVS.desktop echo "Type=Application" >> $RPM_BUILD_ROOT%{_datadir}/applications/alc-CVS.desktop echo "Categories=Network;P2P;GTK;FileTransfer;" >> $RPM_BUILD_ROOT%{_datadir}/applications/alc-CVS.desktop echo "Comment=aMule ed2k link creator" >> $RPM_BUILD_ROOT%{_datadir}/applications/alc-CVS.desktop echo "[Desktop Entry]" > $RPM_BUILD_ROOT%{_datadir}/applications/wxcas-CVS.desktop echo "Encoding=UTF-8" >> $RPM_BUILD_ROOT%{_datadir}/applications/wxcas-CVS.desktop echo "Name=wxCas-CVS" >> $RPM_BUILD_ROOT%{_datadir}/applications/wxcas-CVS.desktop echo "Exec=%{_bindir}/wxcas" >> $RPM_BUILD_ROOT%{_datadir}/applications/wxcas-CVS.desktop echo "Icon=wxcas" >> $RPM_BUILD_ROOT%{_datadir}/applications/wxcas-CVS.desktop echo "Terminal=false" >> $RPM_BUILD_ROOT%{_datadir}/applications/wxcas-CVS.desktop echo "Type=Application" >> $RPM_BUILD_ROOT%{_datadir}/applications/wxcas-CVS.desktop echo "Categories=Network;P2P;GTK;FileTransfer;" >> $RPM_BUILD_ROOT%{_datadir}/applications/wxcas-CVS.desktop echo "Comment=aMule online statistics" >> $RPM_BUILD_ROOT%{_datadir}/applications/wxcas-CVS.desktop desktop-file-install --vendor="" \ --remove-category="Application" \ --add-category="FileTransfer" \ --add-category="GTK" \ --add-category="Network" \ --dir $RPM_BUILD_ROOT%{_datadir}/applications $RPM_BUILD_ROOT%{_datadir}/applications/* %post %{update_menus} %postun %{clean_menus} %clean [ ! "$RPM_BUILD_ROOT" = "/" ] && %{__rm} -rf $RPM_BUILD_ROOT %{__rm} -rf %{_builddir}/%{name}-%{version} %{__rm} -rf %{_builddir}/%{name}-%{version}-root %files %defattr(-,root,root) %{_bindir}/amule %{_bindir}/ed2k %{_bindir}/amulecmd %{_bindir}/cas %{_bindir}/wxcas %{_bindir}/alc %{_bindir}/alcc %{_bindir}/amuleweb %{_bindir}/amuled %{_bindir}/amulegui %{_bindir}/autostart-xas %{_libdir}/xchat/plugins/xas.pl %{_datadir}/applications/* %{_datadir}/pixmaps/* %{_datadir}/locale/* %{_menudir}/%name %{_menudir}/wxcas-CVS %{_menudir}/amulegui-CVS %{_menudir}/alc-CVS %{_miconsdir}/* %{_iconsdir}/* %{_liconsdir}/* %dir %{_datadir}/doc/amule %doc %{_datadir}/doc/amule/* %dir %{_datadir}/cas %{_datadir}/cas/* %dir %{_datadir}/amule %dir %{_datadir}/amule/webserver %{_datadir}/amule/webserver/* %{_datadir}/amule/skins %{_datadir}/amule/skins/* %{_datadir}/man/* %{_datadir}/man/*/* %changelog * Sat Apr 15 2007 OldFrog - Added icons and XFG menus for Mandriva 2007 and higher * Sat Dec 17 2005 OldFrog - Completed configure options to enable Kad, cas, webserver, amulegui - Added icons and menus for Mandriva 2006 and higher * Mon Apr 19 2005 Marcelo Jimenez - Removed curl dependency, aMule now uses wxHTTP. * Mon Mar 26 2005 Marcelo Jimenez - Added a distro test, so we know the distro. - Tests for UTF-8 enabled LANG to use UTF-8 systray. * Mon Mar 21 2005 Marcelo Jimenez - Removed krb5-libs require and krb5-devel buildprereq. curl-lib and curl-devel is enough. * Tue Mar 08 2005 Marcelo Jimenez - Made it work with cvs snapshots at their very same day. * Wed Jun 16 2004 Ariano Bertacca - added tool package. * Sat May 22 2004 Ariano Bertacca - added webserver package. * Sun Mar 28 2004 Ariano Bertacca - added libcryptopp to dependencies/BuildPreReq - getting wx-config and wxbase-config from installed rpm to avoid problems with people using wxGTK-2.5. Idea taken from aMule-2.0.0rc1.spec done by deltaHF and pure_ascii * Tue Feb 10 2004 Ariano Bertacca - modified the BuildPreReq to satisfy amulecmd build requirements. * Sat Jan 23 2004 Ariano Bertacca - initial amule.spec release