webCDwriter.spec up to 2.6.91 - diff
Andrzej Krzysztofowicz
ankry w green.mif.pg.gda.pl
Śro, 10 Lis 2004, 16:33:13 CET
=?iso-8859-2?Q?Micha=B3?= Panasiewicz wrote:
> Requires(pre): /bin/id
> -Requires(pre): /usr/bin/find
> -Requires(pre): /usr/bin/getgid
> -Requires(pre): /usr/sbin/groupadd
> -Requires(pre): /usr/sbin/useradd
> -Requires(pre): /usr/sbin/usermod
> +Requires(pre): %{_bindir}/find
> +Requires(pre): %{_bindir}/getgid
Taaaa
A jak to ma dzialac, jesli ustawisz %{_bindir} dla tego pakietu na cos innego
niz /usr/bin ?
Makra nie sa 'sobie a muzom', tylko po to, by mozna zmieniac ich wartosc.
> +Requires(pre): %{_sbindir}/groupadd
> +Requires(pre): %{_sbindir}/useradd
> +Requires(pre): %{_sbindir}/usermod
To samo.
> Requires(post,preun): /sbin/chkconfig
> -Requires(postun): /usr/sbin/userdel
> -Requires(postun): /usr/sbin/groupdel
> -Requires: cdrtools
> -Requires: mkisofs
> +Requires(postun): %{_sbindir}/userdel
> +Requires(postun): %{_sbindir}/groupdel
To samo.
> +Requires: cdrtools >=3D 2.01
> +Requires: cdrtools-readcd >=3D 2.01
> +Requires: cdrtools-mkisofs >=3D 2.01
> +Requires: cdrtools-utils >=3D 2.01
> Requires: mpg123
> +Requires: libstdc++
Hmmm, nie wyjdzie w automatycznych zaleznosciach ?
[...]
> %install
> rm -rf $RPM_BUILD_ROOT
> -install -d $RPM_BUILD_ROOT{%{_bindir},/etc/rc.d/init.d,/home/services/CDWs=
Tu jest miejsce na tworzenie katalogow, nie pozniej.
> erver/bin}
> -%{__make} \
> - BINDIR=3D$RPM_BUILD_ROOT%{_bindir} \
> - HOMEBINDIR=3D$RPM_BUILD_ROOT/home/services/CDWserver/bin \
> - install
> +%{__make} install
> =20
> -rm -f $RPM_BUILD_ROOT%{_bindir}/*-dummy
> +#TO DO:
> +# kompilacja klienta w javie
> =20
> -install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/CDWserver
> +#umieszczenie pliku rc startuj=B1cego serwer we w=B3a=B6ciwym katalogu
> +mkdir $RPM_BUILD_ROOT/etc/rc.d
> +mkdir $RPM_BUILD_ROOT/etc/rc.d/init.d
install -d
[...]
> %pre
[...]
> "%{name} user" -g %{CDWgroup} %{CDWuser} 1>&2
> - fi
> + %{_sbindir}/useradd -c "systemowy u=BFytkownik dla %{name}" -u 109 -r -d=
To, co na poczatku.
> /home/services/CDWserver -s /bin/false -g %{CDWgroup} %{CDWuser} 1>&2
> fi
> =20
> -%post
> -/sbin/chkconfig --add CDWserver
> -if [ -f /var/lock/subsys/CDWserver ]; then
> - /etc/rc.d/init.d/CDWserver restart >&2
> -else
> - echo "Run \"/etc/rc.d/init.d/CDWserver start\" to start webCDwriter daemo=
> n." >&2
> +# Since rpm will not change the owner of an existing %config file
> +%{__chown} %{USER} /etc/CDWserver/accounts 2> /dev/null || :
> +%{__chown} %{USER} /etc/CDWserver/config 2> /dev/null || :
> +%{__chown} %{USER} /etc/CDWserver/key.txt 2> /dev/null || :
> +%{__chown} %{USER} /etc/CDWserver/password 2> /dev/null || :
> +%{__chmod} 600 /etc/CDWserver/password 2> /dev/null || :
> +%{__chown} %{USER} %{_var}/log/CDWserver/CDinfos 2> /dev/null || :
> +%{__chown} %{USER} %{_var}/log/CDWserver/connects 2> /dev/null || :
> +%{__chown} %{USER} %{_var}/log/CDWserver/log 2> /dev/null || :
> +%{__chown} %{USER} %{_var}/log/CDWserver/sessions 2> /dev/null || :
Hmmm w %pre ?
Przed KAZDA instalacja pakietu ?
> +
> +if [ -e %{_bindir}/CDWserver-GPL ]; then
> + rm -f %{_bindir}/CDWserver-GPL
> fi
> =20
> +%post
> +
> + if [ -x /sbin/chkconfig ]; then
> + /sbin/chkconfig --add CDWserver
> + fi
> +
> + if [ -x /sbin/insserv ]; then
> + /sbin/insserv /etc/rc.d/init.d/CDWserver
> + fi
> +
> + #move binary files to new localization
> + if [ -e /home/CDWserver/bin/ ]; then
I co, zawsze jak sobie utworze taki katalog ...
> + echo "Przenosz=EA narzedzia do %{_var}/CDWserver/bin/..."
> + for tool in cdrdao cdrecord mkisofs
> + do
> + if [ -e /home/CDWserver/bin/$tool ] \
> + && [ ! -e %{_var}/CDWserver/bin/$tool ]; then
> + mv /home/CDWserver/bin/$tool %{_var}/CDWserver/bin/
To mi po upgrejdzie ma w nim grzebac ???
> + fi
> + done
> + rm -rf /home/CDWserver/bin/
Ja sobie tego nie zycze!
[...]
--
=======================================================================
Andrzej M. Krzysztofowicz ankry w mif.pg.gda.pl
phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math., Gdansk University of Technology
Więcej informacji o liście dyskusyjnej pld-devel-pl