Dzięki za wskazówki i patcha. Efekt końcowy w załączniku, może teraz się
zakwalifikuje do cvs ;)
--
pozdrawiam
Dariusz (milley) Włodarczyk
[-= Uśmiechnij się :) =-] Rejestr jest dla programu a nie jego użytkownika.
#!/bin/sh
#
# haldaemon: ivman daemon
#
# chkconfig: 345 99 01
# description: An extremely flexible desktop independent frontend to HAL
#
# processname: ivman
# pidfile: /var/run/ivman.pid
#
# Sanity checks.
[ -x /usr/bin/ivman ] || exit 0
# Source function library.
. /etc/rc.d/init.d/functions
# so we can rearrange this easily
processname=ivman
servicename=ivman
RETVAL=0
# See how we were called.
case "$1" in
start)
# Check if the service is already running?
if [ ! -f /var/lock/subsys/$servicename ]; then
msg_starting $servicename
daemon $servicename $processname
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$servicename
else
msg_already_running $servicename
fi
;;
stop)
# Stop daemons.
if [ -f /var/lock/subsys/$servicename ]; then
msg_stopping $servicename
killproc $servicename -TERM
rm -f /var/lock/subsys/$servicename >/dev/null 2>&1
rm -f /var/run/$processname.pid >/dev/null 2>&1
else
msg_not_running $servicename
fi
;;
status)
status $processname
RETVAL=$?
;;
restart)
$0 stop
sleep 3
$0 start
;;
condrestart)
if [ -f /var/lock/subsys/$servicename ]; then
$0 stop
sleep 3
$0 start
fi
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
;;
esac
exit $RETVAL
# $Revision:$, $Date:$
Summary: An extremely flexible desktop independent frontend to HAL
Summary(pl): Wysoce konfigurowalny, niezale¿ny od menad¿era okien frontend
do HAL
Name: ivman
Version: 0.6.5
Release: 1
License: GPL
Group: Daemons
Source0: http://dl.sourceforge.net/ivman/%{name}-%{version}.tar.bz2
# Source0-md5: 0d83d1d5df716c120de201d5cf3e6e9b
Source1: %{name}-initscript
URL: http://ivman.sourceforge.net
BuildRequires: dbus-devel >= 0.34
BuildRequires: dbus-glib-devel >= 0.3
BuildRequires: glib2-devel >= 2.6
BuildRequires: hal-devel >= 0.4
BuildRequires: libxml2-devel >= 2.6.17
BuildRequires: pmount >= 0.9.3
Requires: pmount >= 0.9.3
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Ivman is an extremely flexible desktop independent frontend to HAL,
the userspace Hardware Abstraction Layer for Linux. It can be used to
execute arbitrary commands when devices are added to or removed from
your system, when device properties change, or when devices emit
conditions. Any properties of the new or changed device can be
included within the executed command.
%description -l pl
Ivman jest wysoce konfigurowalnym frontendem do HAL (Hardware
Abstraction Layer). Mo¿e byæ u¿ywany do wykonywania poleceñ podczas
dodawania, usuwania urz±dzeñ, zmiany ich w³a¶ciwo¶ci b±d¼ te¿ w
odpowiedzi na komunikaty pochodz±ce od urz±dzeñ. Wszelkie w³a¶ciwo¶ci
urz±dzenia mog± byæ wykorzystane w wykonywanym poleceniu.
%package devel
Summary: Development files for ivman
Summary(pl): Pliki niezbêdne programistom dla ivman
Group: Development/Libraries
Requires: %{name} = %{version}
%description devel
Ivman is an extremely flexible desktop independent frontend to HAL,
the userspace Hardware Abstraction Layer for Linux. It can be used to
execute arbitrary commands when devices are added to or removed from
your system, when device properties change, or when devices emit
conditions. Any properties of the new or changed device can be
included within the executed command. This package contains files need
for development.
%description devel -l pl
Ivman jest wysoce konfigurowalnym frontendem do HAL (Hardware
Abstraction Layer). Mo¿e byæ u¿ywany do wykonywania poleceñ podczas
dodawania, usuwania urz±dzeñ, zmiany ich w³a¶ciwo¶ci b±d¼ te¿ w
odpowiedzi na komunikaty pochodz±ce od urz±dzeñ. Wszelkie w³a¶ciwo¶ci
urz±dzenia mog± byæ wykorzystane w wykonywanym poleceniu. Ten pakiet
zawiera pliki niezbêdne programistom.
%package static
Summary: Static libraries for ivman
Summary(pl): Biblioteki statyczne dla ivman
Group: Development/Libraries
Requires: %{name}-devel = %{version}
%description static
Ivman is an extremely flexible desktop independent frontend to HAL,
the userspace Hardware Abstraction Layer for Linux. It can be used to
execute arbitrary commands when devices are added to or removed from
your system, when device properties change, or when devices emit
conditions. Any properties of the new or changed device can be
included within the executed command. This package contains static
libraries.
%description static -l pl
Ivman jest wysoce konfigurowalnym frontendem do HAL (Hardware
Abstraction Layer). Mo¿e byæ u¿ywany do wykonywania poleceñ podczas
dodawania, usuwania urz±dzeñ, zmiany ich w³a¶ciwo¶ci b±d¼ te¿ w
odpowiedzi na komunikaty pochodz±ce od urz±dzeñ. Wszelkie w³a¶ciwo¶ci
urz±dzenia mog± byæ wykorzystane w wykonywanym poleceniu. Ten pakiet
zawiera biblioteki statyczne.
%prep
%setup -q
%build
%configure
%{__make} \
OPTFLAGS="%{rpmcflags}" \
CC="%{__cc}" \
bindir=%{_bindir} \
datadir=%{_datadir} \
sysconfdir=%{_sysconfdir}
%install
rm -rf $RPM_BUILD_ROOT
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT \
bindir=%{_bindir} \
datadir=%{_datadir} \
sysconfdir=%{_sysconfdir}
install -D %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/ivman
%clean
rm -rf $RPM_BUILD_ROOT
%pre
%groupadd -g 26 plugdev
%useradd -u 26 -d /dev/null -s /bin/false -c "ivman daemon" -g plugdev ivman
%post
/sbin/ldconfig
/sbin/chkconfig --add ivman
%service ivman restart
%preun
if [ "$1" = "0" ]; then
%service -q ivman stop
/sbin/chkconfig --del ivman
fi
%postun
/sbin/ldconfig
%files
%defattr(644,root,root,755)
%doc AUTHORS COPYING ChangeLog README TODO
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ivman/*
%attr(754,root,root) /etc/rc.d/init.d/*
%attr(755,root,root) %{_bindir}/ivman
%attr(755,root,root) %{_libdir}/libIvmConfig.so.*
%{_mandir}/man5/*.5*
%{_mandir}/man8/*.8*
%files devel
%defattr(644,root,root,755)
%{_libdir}/*.la
%attr(755,root,root) %{_libdir}/*.so
%files static
%defattr(644,root,root,755)
%{_libdir}/*.a
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
* %{date} PLD Team <[EMAIL PROTECTED]>
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log:$
_______________________________________________
pld-devel-pl mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-devel-pl