Version: @VERSION@
Release: 1
License: GPL v2+
-Group: Productivity/Networking/Other
+Group: Applications/Internet
Summary: Direct Connect client
Source0: http://www.dolda2000.com/~fredrik/doldaconnect/%{name}-%{version}.tar.gz
URL: http://www.dolda2000.com/~fredrik/doldaconnect/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Requires: %{name}-libs = %{version}-%{release}
+Requires: %{name}-data = %{version}-%{release}
+Requires: doldacond = %{version}-%{release}
%description
Dolda Connect is a client program for the Direct Connect peer-to-peer
%package libs
Summary: %{name} libraries
Group: Libraries
+Requires: krb5-libs >= 1.5
%description libs
Shared libraries for %{name}.
%package devel
Summary: Development files for %{name}.
Group: Development/Libraries
+Requires: %{name}-libs = %{version}-%{release}
%description devel
Header files and development libraries for %{name}.
%package guile
Summary: Guile module for %{name}.
Group: Libraries
+Requires: %{name}-libs = %{version}-%{release}
+Requires: guile >= 1.8.0
%description guile
Guile module for using the %{name} library in Scheme programs.
+%package applet
+Summary: GNOME applet for %{name}
+Group: Applications/Internet
+Requires: %{name}-libs = %{version}-%{release}
+Requires: %{name}-data = %{version}-%{release}
+
+%description applet
+A GNOME applet for checking the status of transfers in %{name}.
+
+%package data
+Summary: Common data files for %{name}
+Group: Applications/Internet
+
+%description data
+This package contains common data files for other %{name} packages.
+
+%package -n dolcon
+Summary: The Gtk client in %{name}.
+Group: Applications/Internet
+Requires: %{name}-libs = %{version}-%{release}
+Requires: %{name}-data = %{version}-%{release}
+Conflicts: %{name}
+
+%description -n dolcon
+This package contains only the Gtk client for %{name}, so that it can
+be used without using a local server.
+
%package -n doldacond
Summary: The daemon in %{name}.
Group: Daemons
Requires(post,preun): /sbin/chkconfig
-Requires: rc-scripts
+Requires: initscripts
+Requires: krb5-libs >= 1.5
+Requires: gdbm >= 1.8.0
%description -n doldacond
Daemon for %{name} that does all the actual work of filesharing.
%setup
%build
-echo "rpm" >source
+echo "rpm" %{release} >source
%configure --disable-rpath --with-guile \
--enable-gtk2ui --enable-guishell --with-pam \
- --with-krb5 --enable-gnomeapplet
+ --with-krb5 --enable-gnomeapplet --without-keyutils
%{__make}
%install
rm -rf "$RPM_BUILD_ROOT"
mkdir "$RPM_BUILD_ROOT"
make install DESTDIR="$RPM_BUILD_ROOT"
+install -D -m 644 contrib/pam.d-doldacond "$RPM_BUILD_ROOT"%{_sysconfdir}/pam.d/doldacond
+install -D contrib/fedora-init.d-doldacond "$RPM_BUILD_ROOT"%{_initrddir}/doldacond
rm -f "$RPM_BUILD_ROOT"%{_libdir}/gaim/*.a
rm -f "$RPM_BUILD_ROOT"%{_libdir}/libdolcon-guile.a
rm -f "$RPM_BUILD_ROOT"%{_libdir}/libdolcon-guile.la
%{_bindir}/dolconf
%{_bindir}/dolcon-launch
%{_bindir}/doldacond-shell
+%{_desktopdir}/dolcon.desktop
+%{_mandir}/man1/dolcon.1.gz
+
+%files applet
%{_libdir}/bonobo/servers/*.server
%{_libexecdir}/dolcon-trans-applet
-%{_desktopdir}/dolcon.desktop
+
+%files data
%{_iconsdir}/*
%{_datadir}/locale/*/LC_MESSAGES/doldaconnect.mo
-%{_mandir}/man1/dolcon.1.gz
%doc AUTHORS ChangeLog README doc/INSTALL doc/gui-shell doc/TODO doc/protorev
%files libs
%{_mandir}/man5/doldacond.conf.5.gz
%{_mandir}/man8/doldacond.8.gz
+%post -n doldacond
+/sbin/chkconfig --add doldacond
+
+%preun -n doldacond
+%service doldacond stop
+/sbin/chkconfig --del doldacond
+
+%files -n dolcon
+%{_bindir}/dolcon
+%{_mandir}/man1/dolcon.1.gz
+
%changelog
* Tue Oct 16 2007 Fredrik Tolf <fredrik@dolda2000.com>
-- Initial spec files. Quite a lot taken from the PLD specfile.
+- Initial spec file. Quite a lot taken from the PLD specfile.
--- /dev/null
+#!/bin/sh
+# Stolen from PLD Linux
+#
+# doldacond: Direct Connect client as daemon
+#
+#
+# chkconfig: 345 91 09
+# description: doldacond
+#
+# config: /etc/sysconfig/doldacond
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+# Get service config
+if [ -f /etc/sysconfig/doldacond ]; then
+ . /etc/sysconfig/doldacond
+fi
+
+# Check that networking is up.
+if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
+ msg_network_down doldacon
+ exit 1
+fi
+
+# See how we were called.
+case "$1" in
+ start)
+ # Check if service is already running?
+ if [ ! -f /var/lock/subsys/doldacond ]; then
+ msg_starting doldacond
+ daemon doldacond -C /etc/doldaconnect/doldacond.conf -p /var/run/doldacond.pid ${ADD_OPT}
+ RETVAL=$?
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/doldacond
+ else
+ msg_already_running doldacond
+ fi
+ ;;
+ stop)
+ if [ -f /var/lock/subsys/doldacond ]; then
+ msg_stopping doldacond
+ killproc --pidfile /var/run/doldacond.pid doldacond
+ rm -f /var/lock/subsys/doldacond
+ else
+ msg_not_running doldacond
+ fi
+ ;;
+ status)
+ status doldacond
+ RESULT=$?
+ ;;
+ reload)
+ if [ -f /var/lock/subsys/doldacond ]; then
+ msg_reloading doldacond
+ killproc --pidfile /var/run/doldacond.pid doldacond -HUP
+ RETVAL=$?
+ else
+ msg_not_running doldacond
+ exit 7
+ fi
+ ;;
+ restart|force-reload)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ msg_usage "$0 {start|stop|restart|force-reload|status}"
+ exit 3
+esac
+
+exit 0