Blob Blame History Raw
Name:		glmark2
Version:	2014.03
Release:	5%{?dist}
Summary:	Benchmark for OpenGL 2.0


License:	GPLv3
URL:		http://launchpad.net/glmark2
# the project is moving to github, in the future the upstream will point here:
#URL:		https://github.com/glmark2/glmark2



##
## upstream sources
##

## Instructions for creating (future) github tarball:
#
# git clone https://github.com/glmark2/glmark2.git
# cd glmark2
# githash=$(git rev-parse --short HEAD)
# gitdate=$(date --utc +%Y%m%d)
# git archive --prefix="glmark2-${gitdate}git${githash}/" ${githash} | xz -9 -T0 > glmark2-${gitdate}git${githash}.tar.xz
#
##

## The old launchpad site is still used (for now)
# bded41aaf918ce062d9b81e42cc5be943e6a80bc4ff9d046983b96102c3df6b5
Source0:	%{url}/trunk/2014.03/+download/glmark2-2014.03.tar.gz


## The bellow sources are carried by Fedora package maintaners


##
## .desktop files
##

# 9a43f39f0ddfc91e758e7d7cc44169df30f432b85e668ac135eb38e5dbaa48d8
Source1:	%{name}.desktop

# 5f4c57f5d183ab1b989f293bbc2a6abc27d54f6f796a62318fe7519cc9311a21
Source2:	%{name}-es2.desktop

# ca9e822c62d415052cb27474bfa6ac2f700409bfbeffe9450444b9ef2f5ee246
Source8:	%{name}-drm.desktop

# 74d8b8939dbb9c704c355aa76c10e71bb85adf500ebe3dfa5049d29c52876d05
Source9:	%{name}-es2-drm.desktop



##
## .desktop pixmap icons
##


# de1229366912806f838409c7ff315be5cc48c6e659d78dfd80d0c5db4dcede1d
Source3:	%{name}.png

# aabcddd0c23d20daf0ed024ae4e7b925ec2fb63bb656843d7180904093a8020e
Source4:	%{name}-es2.png

# 12262d758152ac7c404e8f7173024366ebf4f326935584c1b147c5f3ce1341bf
Source12:	%{name}-drm.png

# 12262d758152ac7c404e8f7173024366ebf4f326935584c1b147c5f3ce1341bf
Source13:	%{name}-es2-drm.png


##
## gimp icon sources (not packaged into final rpm, just source rpm)
##

# 1e96f5291318a9c466eed0435ad0e740c789a9b418476807b7253ce0d88b5421
Source5:	%{name}.xcf

# 163b7db2a293e1e86a34c6f84294bb1f54e313ef983fff511a4fe1abca9acd5f
Source6:	%{name}-es2.xcf

# 7ab4b18107ecf3140493f7eeaf2374f8de82bbcb82fe98d58e444b174266f1f7
Source10:	%{name}-drm.xcf

# cc25e28b8c5db4f03e18b95d557323ab09d5a9849946e41e45ba11e3b6df13bb
Source11:	%{name}-es2-drm.xcf



##
## appdata - glmark2 only!
##

# 2d5b3e7c9380d068598f272b2f5b55ca736fa157fd205246a86c2473e08577d4
Source7:	%{name}.appdata.xml








##
## BRs
##

BuildRequires:	libjpeg-devel
BuildRequires:	pkgconfig(libpng12)
BuildRequires:	pkgconfig(x11)
BuildRequires:	pkgconfig(gl)
BuildRequires:	pkgconfig(egl)
BuildRequires:	pkgconfig(glesv2)
BuildRequires:	pkgconfig(libdrm)
BuildRequires:	pkgconfig(gbm)
BuildRequires:	python
BuildRequires:	desktop-file-utils
BuildRequires:	appdata-tools



Requires:	%{name}-common = %{version}-%{release}

%description
Glmark2 is a benchmark for OpenGL 2.0.




## 
##  sub-package
##  The noarch sub-package is easier on the mirrors.
##  One package for common noarch data shared with all architectures.
##  


%package common
Summary:	Models, Textures, and Shaders for GLmark2 Benchmark suite
BuildArch:	noarch
Requires:	%{name} = %{version}-%{release}
%description common
Common graphical assets for Glamrk2 benchmark suite




%prep
%setup -q

# Remove bundled libraries!
rm -rv src/libjpeg-turbo src/libpng

%build
./waf configure	--with-flavors="drm-gl,drm-glesv2,x11-gl,x11-glesv2" --prefix=%{_usr}

./waf -v


%install
./waf install -v --destdir=%{buildroot}


## The .desktop files
desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications %{SOURCE1}

desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications %{SOURCE2}

desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications %{SOURCE8}

desktop-file-install \
--dir=%{buildroot}%{_datadir}/applications %{SOURCE9}


## The ICON files
%{__install} -vd	"%{buildroot}%{_datadir}/pixmaps/"
%{__install} -vp	%{SOURCE3} \
					%{SOURCE4} \
					%{SOURCE12} \
					%{SOURCE13} \
					"%{buildroot}%{_datadir}/pixmaps/"

## The appdata
%{__install} -vd "%{buildroot}%{_datadir}/appdata/"
%{__install} -vp %{SOURCE7} "%{buildroot}%{_datadir}/appdata/"


## Upstream presently does not have any %%check's 
## Here we validate .appdata.xml files, but make erros non-fatal
%check
#appdata-validate %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml || true
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml || :


%files
## the x11 opengl benchmark
%doc NEWS README COPYING COPYING.SGI
%{_datadir}/applications/%{name}.desktop
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/pixmaps/%{name}.png
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1.gz


## x11 Opengl benchmark DRM
%{_datadir}/applications/%{name}-drm.desktop
%{_datadir}/pixmaps/%{name}-drm.png
%{_bindir}/%{name}-drm
%{_mandir}/man1/%{name}-drm.1.gz


## Opengl ES 2 benchmark
%{_datadir}/applications/%{name}-es2.desktop
%{_datadir}/pixmaps/%{name}-es2.png
%{_bindir}/%{name}-es2
%{_mandir}/man1/%{name}-es2.1.gz


## Opengl ES 2 benchmark DRM
%{_datadir}/applications/%{name}-es2-drm.desktop
%{_datadir}/pixmaps/%{name}-es2-drm.png
%{_bindir}/%{name}-es2-drm
%{_mandir}/man1/%{name}-es2-drm.1.gz


%files common
## assets: models, shaders, textures
%{_datadir}/%{name}/



%changelog
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2014.03-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2014.03-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 2014.03-3
- Rebuilt for GCC 5 C++11 ABI change

* Sun Jan 04 2015 Jon Disnard <jdisnard@gmail.com> 2014.03-2
- Use current appdata validation standards.

* Fri Jan 02 2015 Jon Disnard <jdisnard@gmail.com> 2014.03-1
- Now using upstream 2014.03
- re-jiggered waf configure per upstream

* Sun Feb 23 2014 Jon Disnard <jdisnard@gmail.com> 2012.12-3
- fix %%files datadir ownership
- remove redundant .desktop validation checks
- add transitive dep in -common sub-package
- Remove bundled libraries per package guidelines
- Move waf ./configure to %%build phase


* Sat Feb 01 2014 Jon Disnard <jdisnard@gmail.com> 2012.12-2
- Make appdata-validate informative, not imperative.

* Sat Feb 01 2014 Jon Disnard <jdisnard@gmail.com> 2012.12-2
- Package review fixes

* Sun Jan 26 2014 Jon Disnard <jdisnard@gmail.com> 2012.12-1
- Inception