]> git.xonotic.org Git - xonotic/gmqcc.git/blob - distro/fedora/gmqcc.spec
Less parens
[xonotic/gmqcc.git] / distro / fedora / gmqcc.spec
1 Name:           gmqcc
2 Version:        0.3.5
3 Release:        2%{?dist}
4 Summary:        Improved Quake C Compiler
5 License:        MIT
6 URL:            http://graphitemaster.github.io/gmqcc/
7 Source0:        https://github.com/graphitemaster/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
8 # fix build on big endian arches - stdlib.h required for exit()
9 Patch0:         %{name}-0.3.5-stdlib.patch
10
11 # tests fail on big endians
12 ExclusiveArch:  %{ix86} x86_64 %{arm}
13
14 %description
15 Modern written-from-scratch compiler for the QuakeC language with
16 support for many common features found in other QC compilers.
17
18 %package -n qcvm
19 Summary:        Standalone QuakeC VM binary executor
20
21 %description -n qcvm
22 Executor for QuakeC VM binary files created using a QC compiler such
23 as gmqcc or fteqcc. It provides a small set of built-in functions, and
24 by default executes the main function if there is one. Some options
25 useful for debugging are available as well.
26
27 %package -n gmqpak
28 Summary:        Standalone Quake PAK file utility
29
30 %description -n gmqpak
31 Standalone Quake PAK file utility supporting the extraction of files,
32 directories, or whole PAKs, as well as the opposite (creation of PAK files).
33
34 %prep
35 %setup -q
36 %patch0 -p1
37 echo '#!/bin/sh' > ./configure
38 chmod +x ./configure 
39
40 # and for all for all of those switches they increase the runtime of the compile
41 # making compiles of code slower
42
43 # we don't need compiel time buffer protection, we test with clangs address
44 # sanatizer and valgrind before releases
45 %global optflags %(echo %{optflags} | sed 's/-D_FORTIFY_SOURCE=2 //')
46 # there is no exceptions in C
47 %global optflags %(echo %{optflags} | sed 's/-fexceptions //')
48 # same with clangs address sanatizer and valgrind testing
49 %global optflags %(echo %{optflags} | sed 's/-fstack-protector-strong //')
50 # buffer overflow protection is unrequired since most (if not all) allocations
51 # happen dynamically and we have our own memory allocator which checks this
52 # (with valgrind integration), also clangs address santatizer cathes it as
53 # for grecord-gcc-switches, that just adds pointless information to the binary
54 # increasing it size
55 %global optflags %(echo %{optflags} | sed 's/--param=ssp-buffer-size=4 //')
56
57 %build
58 %configure
59 make %{?_smp_mflags}
60
61 %install
62 %make_install PREFIX=%{_prefix}
63
64 %check
65 make check
66
67 %files
68 %doc LICENSE README AUTHORS CHANGES TODO
69 %doc gmqcc.ini.example
70 %{_mandir}/man1/gmqcc.1*
71 %{_bindir}/gmqcc
72
73 %files -n qcvm
74 %doc LICENSE README AUTHORS CHANGES TODO
75 %{_mandir}/man1/qcvm.1*
76 %{_bindir}/qcvm
77
78 %files -n gmqpak
79 %doc LICENSE README AUTHORS CHANGES TODO
80 %{_mandir}/man1/gmqpak.1*
81 %{_bindir}/gmqpak
82
83 %changelog
84 * Sat Nov 16 2013 Dan HorĂ¡k <dan[at]danny.cz> - 0.3.5-2
85 - fix build on big endian arches
86 - use the standard wildcarded filename for man pages
87 - and make it Exclusive for little endians because tests fail on big endians
88
89 * Thu Nov 14 2013 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.3.5-1
90 - 0.3.5 upstream release
91
92 * Thu Sep 26 2013 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.3.0-2
93 - Optimizing compile flags
94
95 * Fri Sep 20 2013 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.3.0-1
96 - Update to 0.3.0 (improved new package: gmqpak)
97
98 * Sat Jul 27 2013 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.2.9-1
99 - Initial release