diff --git a/.cvsignore b/.cvsignore index 46de498..c0b56cd 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -mldonkey-3.0.0.tar.bz2 +mldonkey-3.0.1.tar.bz2 diff --git a/import.log b/import.log index f035ad3..2f2ee24 100644 --- a/import.log +++ b/import.log @@ -2,3 +2,4 @@ mldonkey-2_9_6-3_fc10:EL-5:mldonkey-2.9.6-3.fc10.src.rpm:1232967945 mldonkey-2_9_7-1_fc10:EL-5:mldonkey-2.9.7-1.fc10.src.rpm:1234091220 mldonkey-2_9_7-2_fc10:EL-5:mldonkey-2.9.7-2.fc10.src.rpm:1234280124 mldonkey-3_0_0-1_fc10:EL-5:mldonkey-3.0.0-1.fc10.src.rpm:1237018500 +mldonkey-3_0_1-1_fc12:EL-5:mldonkey-3.0.1-1.fc12.src.rpm:1264589279 diff --git a/mldonkey-initscript.patch b/mldonkey-initscript.patch index dbb21cb..75ceead 100644 --- a/mldonkey-initscript.patch +++ b/mldonkey-initscript.patch @@ -1,7 +1,5 @@ -diff --git a/packages/rpm/mldonkey.init b/packages/rpm/mldonkey.init -index 536a88a..2291a9b 100755 ---- a/packages/rpm/mldonkey.init -+++ b/packages/rpm/mldonkey.init +--- packages/rpm/mldonkey.init~ 2003-05-09 10:12:30.000000000 +0400 ++++ packages/rpm/mldonkey.init 2010-01-26 17:25:03.748635819 +0300 @@ -4,7 +4,7 @@ # # Laurent Culioli @@ -11,7 +9,7 @@ index 536a88a..2291a9b 100755 # description: Mldonkey is client to access multiple peer-to-peer network # processname: mldonkey # config: /etc/sysconfig/mldonkey -@@ -15,6 +15,8 @@ +@@ -15,11 +15,19 @@ # Source some options . /etc/sysconfig/mldonkey @@ -19,8 +17,19 @@ index 536a88a..2291a9b 100755 + RETVAL=0 ++prog=mldonkey ++ # Path to the mldonkey binarie. -@@ -27,17 +29,18 @@ fullpath=/usr/bin/mlnet + fullpath=/usr/bin/mlnet + ++lockfile=/var/lock/subsys/$prog ++piddir=/var/run/$prog ++pidfile=$piddir/mlnet.pid ++ + # Source networking configuration. + . /etc/sysconfig/network + +@@ -27,17 +35,35 @@ [ ${NETWORKING} = "no" ] && exit 0 start() { @@ -30,11 +39,22 @@ index 536a88a..2291a9b 100755 - touch /var/lock/subsys/mldonkey - echo + echo -n $"Starting Mldonkey (mlnet): " -+ cd $DIRECTORY -+ daemon --user mldonkey --check mldonkey $NICE "$fullpath > $LOGFILE 2>&1 &" -+ RETVAL=$? -+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/mldonkey ++ if status -p $pidfile $prog 2>&1 > /dev/null ; then ++ echo -n $"already started" && warning ++ else ++ cd $DIRECTORY ++ daemon --user mldonkey --check mldonkey $NICE "\ ++ $fullpath \ ++ -log_to_syslog yes \ ++ -log_file $LOGFILE \ ++ -pid $piddir \ ++ $ADDON_PARAMS > /dev/null 2>&1 & \ ++ " ++ RETVAL=$? ++ fi + echo ++ [ $RETVAL -eq 0 ] && touch $lockfile ++ return $RETVAL } stop() { - gprintf "Stopping Mldonkey (mlnet): " @@ -42,18 +62,33 @@ index 536a88a..2291a9b 100755 - rm -fr /var/lock/subsys/mldonkey - echo + echo -n $"Stopping Mldonkey (mlnet): " -+ killproc $fullpath -+ rm -fr /var/lock/subsys/mldonkey ++ if ! status -p $pidfile $prog 2>&1 > /dev/null ; then ++ echo -n $"already stopped" && warning ++ else ++ killproc -p $pidfile ++ RETVAL=$? ++ fi + echo ++ [ $RETVAL -eq 0 ] && rm -f $lockfile $pidfile ++ return $RETVAL } -@@ -53,11 +56,19 @@ case "$1" in +@@ -49,15 +75,27 @@ + stop) + stop + ;; +- restart|reload) ++ restart|force-reload) stop start ;; -+ condrestart) -+ if status mldonkey >/dev/null; then ++ reload) ++ echo $"reload unimplemented" ++ RETVAL=3 ++ ;; ++ try-restart|condrestart) ++ if status -p $pidfile $prog >/dev/null; then + stop + start + else @@ -61,12 +96,14 @@ index 536a88a..2291a9b 100755 + fi + ;; status) - status mldonkey +- status mldonkey ++ status -p $pidfile $prog ;; - *) - gprintf "Usage: mldonkey {start|stop|restart|reload|status}\n" +- RETVAL=1 + *) -+ echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}" - RETVAL=1 ++ echo $"Usage: $0 {start|stop|restart|try-restart|status}" ++ RETVAL=2 esac exit $RETVAL diff --git a/mldonkey.spec b/mldonkey.spec index ea97416..8a0ca84 100644 --- a/mldonkey.spec +++ b/mldonkey.spec @@ -1,5 +1,5 @@ Name: mldonkey -Version: 3.0.0 +Version: 3.0.1 Release: 1%{?dist} Summary: Client for several P2P networks License: GPLv2+ @@ -12,16 +12,29 @@ Patch0: mldonkey-initscript.patch URL: http://mldonkey.sourceforge.net Group: Applications/Internet BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +%if 0%{?rhel} +BuildRequires: ocaml >= 3.09.3 +BuildRequires: camlp4 +%else BuildRequires: ocaml >= 3.10.0 BuildRequires: ocaml-camlp4-devel +%endif +%if 0%{!?rhel} BuildRequires: ocaml-lablgtk-devel >= 2.10.0 -BuildRequires: zlib-devel BuildRequires: desktop-file-utils BuildRequires: gtk2-devel >= 2.4.0 BuildRequires: librsvg2-devel >= 2.4.0 +%endif +BuildRequires: zlib-devel BuildRequires: bzip2-devel BuildRequires: ncurses-devel +%if 0%{?rhel} +BuildRequires: file +%else BuildRequires: file-devel +%endif +ExcludeArch: sparc64 s390 s390x + Requires: logrotate # for kill_mldonkey Requires: perl(LWP::UserAgent) @@ -55,6 +68,7 @@ It can also access other peer-to-peer networks: - DC++ +%if 0%{!?rhel} %package gui Summary: Graphical frontend for mldonkey based on GTK Group: Applications/Internet @@ -68,13 +82,14 @@ The GTK interface for mldonkey provides a convenient way of managing all mldonkey operations. It gives details about conected servers, downloaded files, friends and lets one search for files in a pleasing way. +%endif %package server Summary: Enables mldonkey as a system daemon Group: System Environment/Daemons Requires: %{name} = %{version}-%{release} -# Neseccary for mldonkey_df_monitor.sh +# Necessary for mldonkey_df_monitor.sh Requires: mailx Requires(pre): /usr/sbin/useradd Requires(post): /sbin/chkconfig @@ -124,7 +139,7 @@ You need to edit %{_sysconfdir}/sysconfig/mldonkey_submit %prep %setup -q -%patch0 -p1 -b .fedora +%patch0 -p0 -b .fedora # Let's make rpmlint happy sed -i 's|\r||g' distrib/ed2k_submit/README.MLdonkeySubmit sed -i 's|\r||g' docs/slavanap.txt @@ -139,7 +154,11 @@ chmod 644 src/networks/fasttrack/fst_crypt_ml.c %build %configure --enable-pthread \ --enable-ocamlver=%(rpm -q --qf '%%{version}' ocaml) \ +%if 0%{!?rhel} + --disable-gui \ +%else --enable-gui=newgui2 \ +%endif --disable-gd make depend @@ -165,6 +184,7 @@ done # in order to avoid conflicts with rb_libtorrent (see bz# 484885, 484884) install -p -m 755 make_torrent $RPM_BUILD_ROOT%{_bindir}/mldonkey_make_torrent +%if 0%{!?rhel} # gui install -p -m 755 mlguistarter $RPM_BUILD_ROOT%{_bindir}/mlguistarter @@ -178,6 +198,7 @@ install packages/rpm/mldonkey-icon-48.png -D -m 644 $RPM_BUILD_ROOT%{_datadir}/i install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/pixmaps ln -s ../icons/hicolor/48x48/apps/mldonkey.png $RPM_BUILD_ROOT%{_datadir}/pixmaps/mldonkey.png desktop-file-install --vendor fedora --dir $RPM_BUILD_ROOT%{_datadir}/applications --copy-generic-name-to-name %{SOURCE1} +%endif # Send email when mldonkey runs out of allowed disk space install -D -p -m 755 %{SOURCE9} $RPM_BUILD_ROOT%{_sbindir}/mldonkey_df_monitor.sh @@ -204,13 +225,18 @@ sed -e 's,/etc/init.d,%{_initrddir},g; # Create necessary directories for server install -d -m 755 $RPM_BUILD_ROOT%{_localstatedir}/cache/mldonkey install -d -m 755 $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/incoming +install -d -m 755 $RPM_BUILD_ROOT%{_localstatedir}/run/%{name} # create downloads.ini -echo "temp_directory = \"%{_localstatedir}/cache/mldonkey\"" > $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/downloads.ini -echo "incoming_directory = \"%{_localstatedir}/lib/%{name}/incoming\"" >> $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/downloads.ini -echo "mldonkey_gui = \"%{_bindir}/mlgui\"" >> $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/downloads.ini -echo "mldonkey_bin = \"%{_bindir}/mldonkey\"" >> $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/downloads.ini -echo "log_file = \"%{_localstatedir}/log/mldonkey/mldonkey.log\"" >> $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/downloads.ini +echo -e \ +"temp_directory = \"%{_localstatedir}/cache/mldonkey\"\n"\ +"incoming_directory = \"%{_localstatedir}/lib/%{name}/incoming\"\n"\ +%if 0%{!?rhel} +"mldonkey_gui = \"%{_bindir}/mlgui\"\n"\ +%endif +"mldonkey_bin = \"%{_bindir}/mldonkey\"\n"\ +"log_file = \"%{_localstatedir}/log/mldonkey/mldonkey.log\"\n"\ +> $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/downloads.ini # Install sysconfig file install -D -p -m 644 packages/rpm/mldonkey.sysconfig $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/mldonkey @@ -269,6 +295,7 @@ fi %{_bindir}/svg_converter +%if 0%{!?rhel} %files gui %defattr(-,root,root) %doc Copying.txt distrib/Authors.txt distrib/Bugs.txt distrib/ChangeLog distrib/Developers.txt @@ -287,6 +314,7 @@ fi %{_datadir}/icons/hicolor/32x32/apps/mldonkey.png %{_datadir}/icons/hicolor/48x48/apps/mldonkey.png %{_datadir}/pixmaps/mldonkey.png +%endif %files server @@ -300,6 +328,7 @@ fi %attr(750,mldonkey,mldonkey) %dir %{_localstatedir}/log/mldonkey %attr(750,mldonkey,mldonkey) %dir %{_localstatedir}/cache/mldonkey %attr(750,mldonkey,mldonkey) %dir %{_localstatedir}/lib/mldonkey +%attr(755,mldonkey,mldonkey) %dir %{_localstatedir}/run/mldonkey %attr(770,mldonkey,mldonkey) %dir %{_localstatedir}/lib/mldonkey/incoming %config(noreplace) %{_localstatedir}/lib/mldonkey/downloads.ini @@ -319,6 +348,17 @@ fi %changelog +* Tue Jan 26 2010 Peter Lemenkov 3.0.1-1 +- Ver. 3.0.1 +- Greatly changed init-script +- Disabled GUI for EPEL + +* Tue Sep 22 2009 Dennis Gilmore - 3.0.0-3 +- ExlcudeArch sparc64 s390 s390x since they dont have ocaml + +* Sat Jul 25 2009 Fedora Release Engineering - 3.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + * Sat Mar 14 2009 Peter Lemenkov 3.0.0-1 - Ver. 3.0.0 - Dropped patch1 diff --git a/sources b/sources index 03d98b0..ce5f4f0 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d45b37f334a4008ed15343dfb2caf453 mldonkey-3.0.0.tar.bz2 +b0c3be56f2335b2e8a1749c0e10fa29c mldonkey-3.0.1.tar.bz2