Dnia niedziela, 23 kwietnia 2006 02:13, Przemek Iskra napisał(a):
> zrób wrapper dla programu w shellu, który skopiuje config jeśli jest to
> konieczne i potem robi:
> exec prawdziwy-program ${1+"$@"}
>
> tylko jedna rzecz, ten config nie może być w /usr/share/doc/, dokładnie
> to nie może być dodany przez:
> %doc bluemote-example.cfg
> ponieważ tych plików można nie instalować
>
> tak więc lepiej poprostu do /etc

Ok, poprawione, bluemote-example.cfg w /etc i bluemote to scrypt basha 
odpalający bluemoteapp <- czyli właściwą binarke. Bannera już nie ma.
# $Revision: 1.0 $, $Date: 2006/04/15 22:52:54 $

Summary:        Bluemote - pilot przez bluetooth
Summary(pl):    Bluemote - a remote controller via bluetooth
Name:           bluemote
Version:        2.0
Release:        1
License:        GPL
Group:          Applications
Source0:        
http://www.geocities.com/saravkrish/progs/bluemote/%{name}.%{version}.tar.gz
# Source0-md5:  69ab4eafb839a3f22fca2832fbba60f6
URL:            http://www.geocities.com/saravkrish/progs/bluemote/
BuildRequires:  gcc
Requires:       bluez-libs
Requires:       bluez-utils
BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description
Bluemote is a program meant to extend your Bluetooth enabled 
T610 (and most other Sony Ericsson) as a remote for your PC.

%description -l pl
Bluemote to program, który zamieni Twój wyposażony w Bluetooth 
telefon T610 (i większość innych telefonów Sony Ericsson) 
w pilota dla komputera.

%prep
%setup -q -n %{name}

%build
%{__make}

%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_bindir},%{_sysconfdir}}
install bluemote $RPM_BUILD_ROOT%{_bindir}/bluemoteapp
install bluemote-example.cfg $RPM_BUILD_ROOT%{_sysconfdir}

cat > $RPM_BUILD_ROOT%{_bindir}/bluemote <<EOF
#!/bin/bash
if [ -s $HOME/.bluemote.cfg ]; then
bluemoteapp
exit 0
else
cp /etc/bluemote-example.cfg $HOME/.bluemote.cfg
bluemoteapp
fi

EOF

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(644,root,root,755)
%doc AUTHOR README config.txt
%attr(755,root,root) %{_bindir}/bluemoteapp
%attr(755,root,root) %{_bindir}/bluemote
%{_sysconfdir}/bluemote-example.cfg

%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: template.spec,v $

_______________________________________________
pld-devel-pl mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-devel-pl

Odpowiedź listem elektroniczym