ivman.spec -> 0.6.5

Dariusz Włodarczyk milley at gostyn.pl
Thu Nov 17 00:04:56 CET 2005


Charles napisał(a):

>>Source1:        %{name}-initscript
> 
> Rzeźbisz  i rzeźbisz....

Cóż całe życie się człowiek uczy :)

> A przeczytałeś chociaż PLD-doc/devel-hints-pl.txt?
> hint: Nazewnictwo plików w SOURCES

Tego co piszesz nie czytałem, ale nie było na ten temat nic tu:
http://developer-doc.pld-linux.org/develhints/developer_hints.htm

Dzięki za hint, że jest (i gdzie jest) nowsza wersja :)

>>%pre
>>%groupadd -g 26 plugdev
>>%useradd -u 26 -d /dev/null -s /bin/false -c "ivman daemon" -g plugdev ivman
> 
> Coś nie bardzo... A jak będę miał gnarwla?
> hint: PLD-doc/uid_gid.db.txt

O widzisz takiego czegoś szukałem bo przyznaję, że wybierałem tak na
czuja licząc na to, że ktoś mnie poprawi ;) Mam nadzieję, że jak zajmnę
uid=211 i gid=211 to mnie nikt nie powiesi za chwilę...

> 
> Przydałoby się również:
> Provides:group(???)
> Provides:user(???)
> 

Hmmm a jak dokładnie bo w hal.spec na który troszkę zerkałem robiąc mój
jakoś nic takiego nie widzę, a on też dodaje usera i grupę.

No to na koniec standardowo załączam speca z poprawkami.

-- 
pozdrawiam
Dariusz (milley) Włodarczyk

[-= Uśmiechnij się :) =-] Po to komputer jest uniwersalnym narzędziem by
z tego korzystać a nie drukować na kartkach.
-------------- next part --------------
#!/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
-------------- next part --------------
# $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}.init
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(pre):  /usr/sbin/groupadd
Requires(pre):  /usr/sbin/useradd
Requires(post,preun):   /sbin/chkconfig
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 211 plugdev
%useradd -u 211 -d /usr/share/empty -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 <feedback at pld-linux.org>
All persons listed below can be reached at <cvs_login>@pld-linux.org

$Log:$


More information about the pld-devel-pl mailing list