banner macro in rpm

Paweł Żurowski pzurowski at pld-linux.org
Sun Nov 21 15:03:38 CET 2004


Dnia 19-11-2004, pią o godzinie 14:27 +0100, Paweł Gołaszewski
napisał(a): 
> On Fri, 19 Nov 2004, [iso-8859-2] Paweł Żurowski wrote:
> > skrypcik ten ma natomiast dosc duza zalete, jesli chce sie zobaczyc, co
> > takiego wywalilo na ekran, po wiekszej instalacji, np.:
> > [code]
> > LIST=`banner --names -all`
> > poldek --upgrade-dist
> > banner --show --all --exclude $LIST
> > [/code]
> 
> IMO należy to tylko wdrożyć :)

Will it be ok? (banner.sh.spec is only a sample of using)

greetings
-pawel

-- 
Pawel Zurowski

-------------- next part --------------
A non-text attachment was scrubbed...
Name: rpm-banner.patch
Type: text/x-patch
Size: 2025 bytes
Desc: not available
Url : /mailman/pipermail/pld-devel-en/attachments/20041121/77d0a7c5/rpm-banner-0002.bin
-------------- next part --------------
# $Revision: 1.28 $, $Date: 2004/07/01 23:41:04 $
Summary:	%%banner macro test
Summary(pl):	test makra %%banner
Name:		banner.sh
Version:	0
Release:	0.14
Epoch:		0
License:	GPL 2+
Group:		-
Vendor:		-
#Icon:		-
Source0:	banner.sh
# Source0-md5:	ffc0610fd891b85f9cff90ab8ab95837
URL:		-
Requires:	coreutils
BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)

%description

%description -l pl

%prep

%build

%install
rm -rf $RPM_BUILD_ROOT
# create directories if necessary
install -d $RPM_BUILD_ROOT{/bin,/var/lib/banner}
install %{SOURCE0} $RPM_BUILD_ROOT/bin/

%clean
rm -rf $RPM_BUILD_ROOT

%pre

%post
# tests without options
%banner helloworld << EOF
hello world!
EOF
%banner hithere
Hi! As you see "<< EOF" is not necessary, but looks much better
EOF
%banner warning << EndOfBanner
"<< EOF" is not necessary, however "EOF" has to be
EndOfBanner
exit 1
EOF
# appending
%banner foo << EOF
foo
EOF
%banner foo -a << EOF
bar
EOF
# no showing all time
%banner bar -n << EOF
boom!
EOF
# threshold level tests, shows more important (smaller number), "noshows" less important
%banner a -t1 << EOF
1
EOF
%banner b -t2 << EOF
2
EOF
%banner c -t3 << EOF
3
EOF
%banner d -t4 << EOF
4
EOF
%banner e -t5 << EOF
5
EOF
%banner f -t6 << EOF
6
EOF
%banner g -t7 << EOF
7
EOF
%banner h -t8 << EOF
8
EOF
%banner i -t9 << EOF
9
EOF
%banner j -t10 << EOF
10
EOF
%banner k -t11 << EOF
11
EOF
%banner l -t12 << EOF
12
EOF
# all options can be conbined but -t will overide -n

%preun

%postun

%files
%defattr(644,root,root,755)
%attr(755,root,root) /bin/*
/var/lib/banner

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



More information about the pld-devel-en mailing list