#
# Conditional build:
-# _with_offensive - include offensive fortunes
+%bcond_with offensive # include offensive fortunes
#
Summary: A program which will display a fortune
Summary(cs): Program suenka s vitbou (fortune cookie) s opravami chyb
Summary(de): Glückskeks-Programm mit Bugfixes
Summary(es): Fortune: frases famosas y refranes
Summary(fi): Paranneltu fortnue-ohjelma
-Summary(fr): Programme fortune cookie avec correction de bugs.
+Summary(fr): Programme fortune cookie avec correction de bugs
Summary(pl): Program wy¶wietlaj±cy losow± fortunkê
Summary(pt_BR): Fortune: frases famosas e ditados
Summary(ru): ðÒÏÇÒÁÍÍÁ, ÐÅÞÁÔÁÀÝÁÑ "fortune" (ÓÌÕÞÁÊÎÏ ×ÙÂÒÁÎÎÏÅ ÓÏÏÂÝÅÎÉÅ)
Summary(uk): ðÒÏÇÒÁÍÁ, ÑËÁ ÄÒÕËÕ¤ "fortune" (×ÉÐÁÄËÏ×Ï ×ÉÂÒÁÎÅ ÐÏצÄÏÍÌÅÎÎÑ)
Name: fortune-mod
-Version: 1.0
-Release: 25
+Version: 1.99.1
+Release: 0.1
License: BSD
Group: Applications/Games
-Source0: ftp://sunsite.unc.edu/pub/Linux/games/amusements/fortune/%{name}-9708.tar.gz
-Patch0: %{name}-offense.patch
-Patch1: %{name}-32bit-offset.patch
-Patch2: %{name}-display-source.patch
+#Source0: ftp://sunsite.unc.edu/pub/Linux/games/amusements/fortune/%{name}-9708.tar.gz
+Source0: http://www.redellipse.net/code/downloads/%{name}-%{version}.tar.gz
+# Source0-md5: f208805b3b712e32997d7667e0ec52d8
+Source1: %{name}.sh
+Source2: %{name}.csh
+Patch0: %{name}-32bit-offset.patch
+Patch1: %{name}-display-source.patch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Ten pakiet zawiera angielskie pliki z danymi dla fortunek.
+%package on-login
+Summary: Displays fortune cookie on login
+Summary(pl): Wy¶wietla fortunkê przy logowaniu
+Group: Applications/Games
+Requires: %{name}
+
+%description on-login
+If you want fortune cookie to be displayed each time when you log on
+this package is what you need.
+
+%description on-login -l pl
+Je¶li chcesz, ¿eby fortunka by³a wy¶wietlana przy ka¿dym logowaniu ten
+pakiet jest tym, czego potrzebujesz.
+
%prep
-%setup -q -n fortune-mod-9708
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
+%setup -q
+#%patch0 -p1
+#%patch1 -p1
%build
-%{__make} CFLAGS="%{rpmcflags} \\\$(DEFINES)" %{?_with_offensive:OFFENSIVE=1}
+%{__make} \
+ CFLAGS="%{rpmcflags} \\\$(DEFINES)" \
+ %{?with_offensive:OFFENSIVE=1}
+
%{__make} fortune/fortune.man
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man{1,6},%{_datadir}/games/fortune}
+install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man{1,6},%{_datadir}/games/fortune,/etc/profile.d}
%{__make} install \
FORTDIR=$RPM_BUILD_ROOT%{_bindir} \
BINDIR=$RPM_BUILD_ROOT%{_bindir} \
BINMANDIR=$RPM_BUILD_ROOT%{_mandir}/man1 \
FORTMANDIR=$RPM_BUILD_ROOT%{_mandir}/man6 \
- %{?_with_offensive:OFFENSIVE=1}
+ %{?with_offensive:OFFENSIVE=1}
+
+rm -f $RPM_BUILD_ROOT%{_mandir}/man1/unstr.1*
+
+install %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d
-rm -f $RPM_BUILD_ROOT%{_mandir}/man1/unstr.1
echo ".so strfile.1" > $RPM_BUILD_ROOT%{_mandir}/man1/unstr.1
%clean
%files data
%defattr(644,root,root,755)
%{_datadir}/games/fortunes/*
+%defattr(644,root,root,755)
+
+%files on-login
+%defattr(644,root,root,755)
+%attr(755,root,root) /etc/profile.d/*