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