diff --git a/2048-cli.spec b/2048-cli.spec index bd5ee6c..5b2c030 100644 --- a/2048-cli.spec +++ b/2048-cli.spec @@ -5,8 +5,8 @@ %{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}} # Settings used for build from snapshots. -%{!?rel_build:%global commit dc9adea7b5bd83468e61735791b29cec99738b43} -%{!?rel_build:%global commit_date 20150225} +%{!?rel_build:%global commit 4520781f25805bd9e3b0a7b861d55a22baeff7e3} +%{!?rel_build:%global commit_date 20151229} %{!?rel_build:%global shortcommit %(c=%{commit};echo ${c:0:7})} %{!?rel_build:%global gitver git%{commit_date}-%{shortcommit}} %{!?rel_build:%global gitrel .git%{commit_date}.%{shortcommit}} @@ -15,8 +15,8 @@ %global gittar %{name}-%{version}%{!?rel_build:-%{gitver}}.tar.gz Name: 2048-cli -Version: 0.9 -Release: 7%{?gitrel}%{?dist} +Version: 0.9.1 +Release: 0.1%{?gitrel}%{?dist} Summary: The game 2048 for your Linux terminal %{?el5:Group: Amusements/Games} @@ -28,9 +28,6 @@ URL: https://github.com/Tiehuis/%{name} %{!?rel_build:Source0: %{url}/archive/%{commit}.tar.gz#/%{gittar}} %{?el5:BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)} -BuildRequires: asciidoc -BuildRequires: docbook-style-xsl -BuildRequires: libxslt BuildRequires: ncurses-devel %description @@ -45,12 +42,34 @@ Summary: The game 2048 for your Linux terminal (non-ncurses) A non-ncurses cli version of the game 2048 for your Linux terminal. +%package sdl +Summary: The game 2048 for your Linux terminal (SDL) +%{?el5:Group: Amusements/Games} + +BuildRequires: SDL2_ttf-devel +BuildRequires: liberation-mono-fonts + +Requires: liberation-mono-fonts + +%description sdl +A SDL version of the game 2048 for your Linux terminal. + + %prep %setup -q%{!?rel_build:n %{name}-%{commit}} +%{__sed} -i -e 's!-o $(PROGRAM)!& $(LDFLAGS)!g' Makefile +%{__sed} -i -e 's!res/Anonymous Pro.ttf!%{_datadir}/fonts/liberation/LiberationMono-Regular.ttf!' \ + src/gfx_sdl.c %build -%{__make} %{?_smp_mflags} 2048 2048nc man \ +%{__make} %{?_smp_mflags} terminal \ + CFLAGS='%{optflags}' LDFLAGS='%{?__global_ldflags}' +%{__mv} -f 2048 2048nc +%{__make} %{?_smp_mflags} sdl \ + CFLAGS='%{optflags}' LDFLAGS='%{?__global_ldflags}' +%{__mv} -f 2048 2048sdl +%{__make} %{?_smp_mflags} curses \ CFLAGS='%{optflags}' LDFLAGS='%{?__global_ldflags}' @@ -61,10 +80,11 @@ A non-ncurses cli version of the game 2048 for your Linux terminal. %{__mkdir} -p %{buildroot}%{_bindir} \ %{buildroot}%{_mandir}/man1 \ %{buildroot}%{_pkgdocdir} -%{__install} -pm 0755 2048 2048nc %{buildroot}%{_bindir} -%{__install} -pm 0644 man/*.1 %{buildroot}%{_mandir}/man1 -%{__install} -pm 0644 man/2048*.1.txt LICENSE README.md \ - %{buildroot}%{_pkgdocdir} +%{__install} -pm 0755 2048 2048nc 2048sdl %{buildroot}%{_bindir} +%{__install} -pm 0644 man/2048.1 %{buildroot}%{_mandir}/man1/2048.1 +%{__install} -pm 0644 man/2048.1 %{buildroot}%{_mandir}/man1/2048nc.1 +%{__install} -pm 0644 man/2048.1 %{buildroot}%{_mandir}/man1/2048sdl.1 +%{__install} -pm 0644 README.md %{buildroot}%{_pkgdocdir} %{?el5:%clean} @@ -72,17 +92,34 @@ A non-ncurses cli version of the game 2048 for your Linux terminal. %files +%{!?_licensedir:%global license %doc} +%license LICENSE %doc %{_pkgdocdir} %{_bindir}/2048 %{_mandir}/man1/2048.1* %files nocurses +# Pickup license-files from main-pkg's license-dir +# If there's no license-dir they are picked up by %%doc previously +%{?_licensedir:%license %{_datadir}/licenses/%{name}*} %doc %{_pkgdocdir} %{_bindir}/2048nc %{_mandir}/man1/2048nc.1* +%files sdl +# Pickup license-files from main-pkg's license-dir +# If there's no license-dir they are picked up by %%doc previously +%{?_licensedir:%license %{_datadir}/licenses/%{name}*} +%doc %{_pkgdocdir} +%{_bindir}/2048sdl +%{_mandir}/man1/2048sdl.1* + %changelog +* Tue Mar 29 2016 Björn Esser - 0.9.1-0.1.git20151229.4520781 +- update to new snapshot git20151229.4520781 +- handle %%license and %%doc properly + * Wed Feb 03 2016 Fedora Release Engineering - 0.9-7.git20150225.dc9adea - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index 1efb159..cd8f722 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -2f23b5bfdd66380dc8540aa6d0610b1d 2048-cli-0.9-git20150225-dc9adea.tar.gz +27ca872b7eccb27dd425d6bf02833b06 2048-cli-0.9.1-git20151229-4520781.tar.gz