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