new upstream release 0.9.1
This commit is contained in:
parent
85bf0ca4f8
commit
18e2d1e082
2 changed files with 49 additions and 38 deletions
|
|
@ -1,33 +1,43 @@
|
|||
# Conditional for release and snapshot builds. Uncomment for release-builds.
|
||||
#global rel_build 1
|
||||
%global rel_build 1
|
||||
|
||||
# Setup _pkgdocdir if not defined already.
|
||||
%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
||||
%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
||||
|
||||
# Settings used for build from snapshots.
|
||||
%{!?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}}
|
||||
%if ! 0%{?rel_build}
|
||||
%global commit 4520781f25805bd9e3b0a7b861d55a22baeff7e3
|
||||
%global commit_date 20151229
|
||||
%global shortcommit %(c=%{commit};echo ${c:0:7})
|
||||
%global gitver git%{commit_date}-%{shortcommit}
|
||||
%global gitrel .git%{commit_date}.%{shortcommit}
|
||||
%endif # 0%%{?rel_build}
|
||||
|
||||
# Proper naming for the tarball from github.
|
||||
%global gittar %{name}-%{version}%{!?rel_build:-%{gitver}}.tar.gz
|
||||
%global gittar %{name}-%{version}%{!?rel_build:-%{gitver}}.tar.gz
|
||||
|
||||
Name: 2048-cli
|
||||
Version: 0.9.1
|
||||
Release: 0.2%{?gitrel}%{?dist}
|
||||
Summary: The game 2048 for your Linux terminal
|
||||
%{?el5:Group: Amusements/Games}
|
||||
# No SDL2 on EPEL <= 7.
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||
%bcond_without sdl
|
||||
%else # 0%%{?fedora} || 0%%{?rhel} >= 8
|
||||
%bcond_with sdl
|
||||
%endif # 0%%{?fedora} || 0%%{?rhel} >= 8
|
||||
|
||||
License: MIT
|
||||
URL: https://github.com/Tiehuis/%{name}
|
||||
Name: 2048-cli
|
||||
Version: 0.9.1
|
||||
Release: 1%{?gitrel}%{?dist}
|
||||
Summary: The game 2048 for your Linux terminal
|
||||
|
||||
License: MIT
|
||||
URL: https://github.com/Tiehuis/%{name}
|
||||
%if 0%{?rel_build}
|
||||
# Sources for release-builds.
|
||||
%{?rel_build:Source0: %{url}/archive/v%{version}.tar.gz#/%{gittar}}
|
||||
Source0: %{url}/archive/v%{version}.tar.gz#/%{gittar}
|
||||
%else # 0%%{?rel_build}
|
||||
# Sources for snapshot-builds.
|
||||
%{!?rel_build:Source0: %{url}/archive/%{commit}.tar.gz#/%{gittar}}
|
||||
Source0: %{url}/archive/%{commit}.tar.gz#/%{gittar}
|
||||
%endif # 0%%{?rel_build}
|
||||
|
||||
%{?el5:BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)}
|
||||
BuildRequires: ncurses-devel
|
||||
|
||||
%description
|
||||
|
|
@ -35,64 +45,60 @@ A cli version of the game 2048 for your Linux terminal.
|
|||
|
||||
|
||||
%package nocurses
|
||||
Summary: The game 2048 for your Linux terminal (non-ncurses)
|
||||
%{?el5:Group: Amusements/Games}
|
||||
Summary: The game 2048 for your Linux terminal (non-ncurses)
|
||||
|
||||
%description nocurses
|
||||
A non-ncurses cli version of the game 2048 for your Linux terminal.
|
||||
|
||||
|
||||
%if %{with sdl}
|
||||
%package sdl
|
||||
Summary: The game 2048 for your Linux terminal (SDL)
|
||||
%{?el5:Group: Amusements/Games}
|
||||
Summary: The game 2048 for your Linux terminal (SDL)
|
||||
|
||||
BuildRequires: SDL2_ttf-devel
|
||||
BuildRequires: liberation-mono-fonts
|
||||
BuildRequires: SDL2_ttf-devel
|
||||
BuildRequires: liberation-mono-fonts
|
||||
|
||||
Requires: liberation-mono-fonts
|
||||
Requires: liberation-mono-fonts
|
||||
|
||||
%description sdl
|
||||
A SDL version of the game 2048 for your Linux terminal.
|
||||
%endif # %%{with sdl}
|
||||
|
||||
|
||||
%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
|
||||
export TTF_FONT_PATH="%{_datadir}/fonts/liberation/LiberationMono-Regular.ttf"
|
||||
%configure || :
|
||||
%{__make} %{?_smp_mflags} terminal
|
||||
%{__mv} -f 2048 2048nc
|
||||
%if %{with sdl}
|
||||
%{__make} %{?_smp_mflags} sdl
|
||||
%{__mv} -f 2048 2048sdl
|
||||
%endif # %%{with sdl}
|
||||
%{__make} %{?_smp_mflags} curses
|
||||
|
||||
|
||||
%install
|
||||
%{?el5:%{__rm} -rf %{buildroot}}
|
||||
|
||||
# There is no install-target in Makefile.
|
||||
%{__mkdir} -p %{buildroot}%{_bindir} \
|
||||
%{buildroot}%{_mandir}/man1 \
|
||||
%{buildroot}%{_pkgdocdir}
|
||||
%{__install} -pm 0755 2048 2048nc 2048sdl %{buildroot}%{_bindir}
|
||||
%{__install} -pm 0755 2048 2048nc %{buildroot}%{_bindir}
|
||||
%{__install} -pm 0644 man/2048.1 %{buildroot}%{_mandir}/man1/2048.1
|
||||
%{__install} -pm 0644 man/2048.1 %{buildroot}%{_mandir}/man1/2048nc.1
|
||||
%if %{with sdl}
|
||||
%{__install} -pm 0755 2048sdl %{buildroot}%{_bindir}
|
||||
%{__install} -pm 0644 man/2048.1 %{buildroot}%{_mandir}/man1/2048sdl.1
|
||||
%{__install} -pm 0644 README.md %{buildroot}%{_pkgdocdir}
|
||||
|
||||
|
||||
%{?el5:%clean}
|
||||
%{?el5:%{__rm} -rf %{buildroot}}
|
||||
%endif # %%{with sdl}
|
||||
|
||||
|
||||
%files
|
||||
%{!?_licensedir:%global license %doc}
|
||||
%license LICENSE
|
||||
%doc %{_pkgdocdir}
|
||||
%doc README.md
|
||||
%{_bindir}/2048
|
||||
%{_mandir}/man1/2048.1*
|
||||
|
||||
|
|
@ -104,6 +110,7 @@ A SDL version of the game 2048 for your Linux terminal.
|
|||
%{_bindir}/2048nc
|
||||
%{_mandir}/man1/2048nc.1*
|
||||
|
||||
%if %{with sdl}
|
||||
%files sdl
|
||||
# Pickup license-files from main-pkg's license-dir
|
||||
# If there's no license-dir they are picked up by %%doc previously
|
||||
|
|
@ -111,9 +118,13 @@ A SDL version of the game 2048 for your Linux terminal.
|
|||
%doc %{_pkgdocdir}
|
||||
%{_bindir}/2048sdl
|
||||
%{_mandir}/man1/2048sdl.1*
|
||||
%endif # %%{with sdl}
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Mar 30 2016 Björn Esser <fedora@besser82.io> - 0.9.1-1
|
||||
- new upstream release 0.9.1
|
||||
|
||||
* Tue Mar 29 2016 Björn Esser <fedora@besser82.io> - 0.9.1-0.2.git20151229.4520781
|
||||
- properly apply CFLAGS, without clobbering the Makefile-preset
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
27ca872b7eccb27dd425d6bf02833b06 2048-cli-0.9.1-git20151229-4520781.tar.gz
|
||||
e940e430d4222718dd04ad88bd0daf2a 2048-cli-0.9.1.tar.gz
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue