#1 Update to v2.6.2.
Closed 2 years ago by sergiomb. Opened 5 years ago by shlomif.
rpms/ shlomif/fortune-mod shlomif--update-ver  into  rawhide

file modified
+35 -44
@@ -2,13 +2,13 @@ 

  %define CookieDir %{_datadir}/games/fortune

  

  Name:		fortune-mod

- Version:	1.99.5

- Release:	4%{?dist}

+ Version:	2.6.2

+ Release:	1%{?dist}

  Summary:	A program which will display a fortune

  

  License:	BSD

  URL:		https://github.com/shlomif/fortune-mod

- Source0:	https://github.com/shlomif/fortune-mod/archive/fortune-mod-%{version}.tar.gz

+ Source0:	https://www.shlomifish.org/open-source/projects/fortune-mod/arcs/fortune-mod-%{version}.tar.xz

  Source1:	kernelnewbies-fortunes.tar.gz

  Source2:	bofh-excuses.tar.bz2

  # originally at http://www.aboleo.net/software/misc/fortune-tao.tar.gz
@@ -17,13 +17,25 @@ 

  # originally at http://www.dibona.com/opensources/osfortune.tar.gz

  Source5:	osfortune.tar.gz

  Source6:	http://humorix.org/downloads/humorixfortunes-1.4.tar.gz

- Patch0:		fortune-mod-1.99.5-disable-offensive.patch

- Patch1:		fortune-mod-1.99.5-remove-offensive-doc.patch

- Patch2:		fortune-mod-cflags.patch

- Patch3:		fortune-mod-1.99-move-offensive.patch

  

- BuildRequires:  gcc

+ BuildRequires:	perl(Cwd)

+ BuildRequires:	perl(File::Path)

+ BuildRequires:	perl(File::Spec)

+ BuildRequires:	perl(Getopt::Long)

+ BuildRequires:	perl(IO::All)

+ BuildRequires:	perl(Test::More)

+ BuildRequires:	perl(Test::RunValgrind)

+ BuildRequires:	perl(autodie)

+ BuildRequires:	perl(strict)

+ BuildRequires:	perl(warnings)

+ BuildRequires:	perl-Test-Harness

+ BuildRequires:	perl-interpreter

+ BuildRequires:	perl-libs

  BuildRequires:	recode-devel

+ BuildRequires:  cmake

+ BuildRequires:  gcc

+ BuildRequires:  gcc-c++

+ BuildRequires:  valgrind

  

  

  %description
@@ -34,45 +46,25 @@ 

  

  

  %prep

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

- cd fortune-mod

- 

- # disable offensive fortunes completely

- %if %{DisableOffensiveFortunes}

- %patch0 -p0 -b .disable-offensive

- %patch1 -p0 -b .remove-offensive-doc

- %endif

- 

- # use CFLAGS from rpmbuld

- %patch2 -p1 -b .cflags

- # move possibly offensive fortunes into the offensive directory

- %patch3 -p0 -b .move-offensive

- 

+ %setup -q -n %{name}-%{version}

  

  %build

- cd fortune-mod

- 

- make COOKIEDIR=%{CookieDir} \

- 	FORTDIR=%{_bindir} BINDIR=%{_sbindir}

- 

+ mkdir build

+ cd build

+ %cmake -DCOOKIEDIR=%{CookieDir} -DLOCALDIR=%{CookieDir} -DNO_OFFENSIVE=TRUE ..

+ %make_build

  

  %install

- cd fortune-mod

- 

- make	COOKIEDIR=%{CookieDir} fortune/fortune.man

- make	FORTDIR=$RPM_BUILD_ROOT/%{_bindir} \

- 	COOKIEDIR=$RPM_BUILD_ROOT%{CookieDir} \

- 	LOCALDIR=$RPM_BUILD_ROOT%{CookieDir} \

- 	BINDIR=$RPM_BUILD_ROOT/%{_sbindir} \

- 	BINMANDIR=$RPM_BUILD_ROOT/%{_mandir}/man1 \

- 	FORTMANDIR=$RPM_BUILD_ROOT/%{_mandir}/man6 \

- 	install

+ cd build

+ %make_install

  

  tar zxvf %{SOURCE1} -C $RPM_BUILD_ROOT%{CookieDir}

  %if %{DisableOffensiveFortunes}

  rm -f $RPM_BUILD_ROOT%{CookieDir}/men-women*

  %endif

  

+ mv $RPM_BUILD_ROOT/usr/games/fortune $RPM_BUILD_ROOT%{_bindir}

+ rm -f $RPM_BUILD_ROOT%{_bindir}/rot

  # this isn't debian

  rm -f $RPM_BUILD_ROOT%{CookieDir}/debian*

  rm -f $RPM_BUILD_ROOT%{CookieDir}/off/debian*
@@ -100,19 +92,18 @@ 

  for i in \

      kernelnewbies bofh-excuses tao hitchhiker \

      osfortune humorix-misc humorix-stories \

- ; do util/strfile $RPM_BUILD_ROOT%{CookieDir}/$i ; done

+ ; do ./strfile $RPM_BUILD_ROOT%{CookieDir}/$i ; done

  

  

  %check

- cd fortune-mod

- # root-check currently requires an unpackaged Perl script

- # TAP checks still fail

- make check-deps datfiles-check

+ cd build

+ rm -f ../tests/t/trailing-space*.t

+ make check

  

  

  %files

- %license LICENSE

- %doc README.md fortune-mod/README fortune-mod/ChangeLog fortune-mod/TODO

+ %license COPYING.txt

+ %doc README ChangeLog TODO

  %{_bindir}/fortune

  %{_sbindir}/strfile

  %{_sbindir}/unstr

Hi!

I updated fortune-mod to 2.6.2 (I am also the upstream). Tested fine on koji. Please review.

we may close this old PR

Pull-Request has been closed by sergiomb

2 years ago