]>
Commit | Line | Data |
---|---|---|
d7d54e98 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # build without tests | |
4 | ||
fa3091f1 | 5 | Summary: ACPI Component Architecture - an assembler and disassembler for DSDT tables |
be632254 | 6 | Summary(pl.UTF-8): ACPI CA - asembler i disasembler dla tablic DSDT |
fa3091f1 | 7 | Name: acpica |
e8495c16 | 8 | Version: 20141107 |
fa3091f1 | 9 | Release: 1 |
659b3445 | 10 | License: GPL v2 |
fa3091f1 | 11 | Group: Development/Tools |
659b3445 | 12 | Source0: https://acpica.org/sites/acpica/files/%{name}-unix2-%{version}.tar.gz |
e8495c16 | 13 | # Source0-md5: af9f1e67023fa85f9d6abf28b5345abd |
f3dfbd7c ER |
14 | Source1: https://acpica.org/sites/acpica/files/acpitests-unix-%{version}.tar.gz |
15 | # Source1-md5: 64f6360eb986524254849930ff0a711f | |
16 | Patch0: debian-big_endian.patch | |
17 | Patch1: debian-unaligned.patch | |
18 | Patch2: name-miscompare.patch | |
19 | Patch3: aapits-linux.patch | |
20 | Patch4: asllookup-miscompare.patch | |
21 | Patch5: aapits-makefile.patch | |
22 | Patch6: re-enable-big-endian.patch | |
23 | Patch7: OPT_LDFLAGS.patch | |
e8495c16 | 24 | URL: https://acpica.org/ |
fa3091f1 | 25 | BuildRequires: bison |
900d6841 | 26 | BuildRequires: flex |
92c5d0ee | 27 | BuildRequires: sed >= 4.0 |
fa3091f1 AM |
28 | Provides: iasl |
29 | Obsoletes: iasl | |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | %description | |
33 | ACPI Component Architecture - an assembler and disassembler for DSDT | |
be632254 JB |
34 | tables. |
35 | ||
36 | %description -l pl.UTF-8 | |
37 | Pakiet ACPI Component Architecture zawiera asembler i disasembler do | |
38 | tablic DSDT. | |
fa3091f1 AM |
39 | |
40 | %prep | |
659b3445 | 41 | %setup -q -n %{name}-unix2-%{version} |
f3dfbd7c ER |
42 | tar -x --strip-components=1 -f %{SOURCE1} |
43 | %patch0 -p1 | |
44 | %patch1 -p1 | |
45 | %patch2 -p1 | |
46 | %patch3 -p1 | |
47 | %patch4 -p1 | |
48 | %patch5 -p1 | |
49 | %patch6 -p1 | |
50 | %patch7 -p1 | |
fa3091f1 | 51 | |
fa3091f1 | 52 | %build |
d7d54e98 ER |
53 | %define makeopts \\\ |
54 | HOST=_LINUX \\\ | |
55 | CC="%{__cc}" \\\ | |
56 | OPT_CFLAGS="%{rpmcflags}" \\\ | |
b3f0bd18 | 57 | OPT_LDFLAGS="%{rpmcflags} %{rpmldflags}" |
fa3091f1 | 58 | |
d7d54e98 ER |
59 | %{__make} %{makeopts} |
60 | ||
61 | %if %{with tests} | |
62 | %{__make} %{makeopts} -C tests/aapits | |
63 | %{__make} %{makeopts} -C tests/aapits/asl \ | |
64 | ASL=$(pwd)/generate/unix/bin/iasl | |
65 | %{__make} %{makeopts} -C tests/templates | |
66 | ||
67 | cd tests | |
68 | ||
69 | # ASL tests | |
70 | ./aslts.sh # relies on non-zero exit | |
71 | [ $? -eq 0 ] || exit 1 | |
72 | ||
73 | # API tests | |
74 | cd aapits/bin | |
75 | ./aapitsrun | |
76 | [ $? -eq 0 ] || exit 1 | |
77 | cd ../.. | |
78 | ||
79 | # misc tests | |
80 | #./run-misc-tests.sh $RPM_BUILD_ROOT%{_bindir} %{version} | |
81 | ||
82 | # Template tests | |
83 | cd templates | |
84 | if [ -f diff.log ]; then | |
85 | if [ -s diff.log ]; then | |
86 | # implies errors occurred | |
87 | exit 1 | |
88 | fi | |
89 | fi | |
90 | cd .. | |
91 | %endif | |
92 | ||
fa3091f1 AM |
93 | %install |
94 | rm -rf $RPM_BUILD_ROOT | |
659b3445 JR |
95 | %{__make} install \ |
96 | DESTDIR=$RPM_BUILD_ROOT | |
fa3091f1 | 97 | |
be632254 JB |
98 | %clean |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | ||
fa3091f1 AM |
101 | %files |
102 | %defattr(644,root,root,755) | |
d7d54e98 | 103 | %doc changes.txt source/compiler/new_table.txt |
659b3445 JR |
104 | %attr(755,root,root) %{_bindir}/acpibin |
105 | %attr(755,root,root) %{_bindir}/acpidump | |
106 | %attr(755,root,root) %{_bindir}/acpiexec | |
107 | %attr(755,root,root) %{_bindir}/acpihelp | |
108 | %attr(755,root,root) %{_bindir}/acpinames | |
76966ddc | 109 | %attr(755,root,root) %{_bindir}/acpisrc |
659b3445 | 110 | %attr(755,root,root) %{_bindir}/acpixtract |
be632254 | 111 | %attr(755,root,root) %{_bindir}/iasl |