]> git.pld-linux.org Git - packages/fortune-mod.git/blobdiff - fortune-mod.spec
- release 28 to rebuild with ac
[packages/fortune-mod.git] / fortune-mod.spec
index 3cfb416574af039827334c4d132ed6092068b472..8869b3fb4766b0c6d2a37ea168c0397e5360ef13 100644 (file)
@@ -1,21 +1,30 @@
+#
+# Conditional build:
+# _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(da):   fortune-cookie program med mange fejl rettelser
 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:       23
+Release:       28
 License:       BSD
 Group:         Applications/Games
 Source0:       ftp://sunsite.unc.edu/pub/Linux/games/amusements/fortune/%{name}-9708.tar.gz
+# Source0-md5: 81a87a44f9d94b0809dfc2b7b140a379
+Source1:       %{name}.sh
+Source2:       %{name}.csh
 Patch0:                %{name}-offense.patch
+Patch1:                %{name}-32bit-offset.patch
+Patch2:                %{name}-display-source.patch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -127,26 +136,46 @@ by ka
 
 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
 
 %build
-%{__make} CFLAGS="%{rpmcflags} \\\$(DEFINES)"
+%{__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} \
        COOKIEDIR=$RPM_BUILD_ROOT%{_datadir}/games/fortunes \
        BINDIR=$RPM_BUILD_ROOT%{_bindir} \
        BINMANDIR=$RPM_BUILD_ROOT%{_mandir}/man1 \
-       FORTMANDIR=$RPM_BUILD_ROOT%{_mandir}/man6
+       FORTMANDIR=$RPM_BUILD_ROOT%{_mandir}/man6 \
+       %{?_with_offensive:OFFENSIVE=1}
 
 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/unstr.1
+
+install %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT/etc/profile.d
+
 echo ".so strfile.1" > $RPM_BUILD_ROOT%{_mandir}/man1/unstr.1
 
 %clean
@@ -158,7 +187,13 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/*
 %{_mandir}/man6/fortune.6*
 %{_mandir}/man1/*
+%dir %{_datadir}/games/fortunes
 
 %files data
 %defattr(644,root,root,755)
-%{_datadir}/games/fortunes
+%{_datadir}/games/fortunes/*
+%defattr(644,root,root,755)
+
+%files on-login
+%defattr(644,root,root,755)
+%attr(755,root,root) /etc/profile.d/*
This page took 0.088177 seconds and 4 git commands to generate.