]>
Commit | Line | Data |
---|---|---|
d7d54e98 ER |
1 | # |
2 | # Conditional build: | |
77760c90 | 3 | %bcond_with tests # ASL tests |
d7d54e98 | 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 |
77760c90 | 8 | Version: 20170303 |
fa3091f1 | 9 | Release: 1 |
659b3445 | 10 | License: GPL v2 |
fa3091f1 | 11 | Group: Development/Tools |
77760c90 JB |
12 | Source0: https://acpica.org/sites/acpica/files/%{name}-unix-%{version}.tar.gz |
13 | # Source0-md5: 704c7d0ba7ee826ea489995c4837ebd2 | |
f3dfbd7c | 14 | Source1: https://acpica.org/sites/acpica/files/acpitests-unix-%{version}.tar.gz |
77760c90 JB |
15 | # Source1-md5: 2dc88f6782bb3be3c66bd1a052ee7972 |
16 | Source2: iasl.1 | |
17 | Source3: acpibin.1 | |
18 | Source4: acpidump.1 | |
19 | Source5: acpiexec.1 | |
20 | Source6: acpihelp.1 | |
21 | Source7: acpinames.1 | |
22 | Source8: acpisrc.1 | |
23 | Source9: acpixtract.1 | |
f3dfbd7c ER |
24 | Patch0: debian-big_endian.patch |
25 | Patch1: debian-unaligned.patch | |
26 | Patch2: name-miscompare.patch | |
77760c90 JB |
27 | Patch3: asllookup-miscompare.patch |
28 | Patch4: re-enable-big-endian.patch | |
29 | Patch5: OPT_LDFLAGS.patch | |
30 | Patch6: int-format.patch | |
31 | Patch8: asllookup-ppc64.patch | |
32 | Patch9: template.patch | |
33 | Patch10: free.patch | |
34 | Patch11: update-big-endian.patch | |
35 | Patch12: ppc64le.patch | |
36 | Patch13: arm7hl.patch | |
e8495c16 | 37 | URL: https://acpica.org/ |
fa3091f1 | 38 | BuildRequires: bison |
900d6841 | 39 | BuildRequires: flex |
92c5d0ee | 40 | BuildRequires: sed >= 4.0 |
fa3091f1 AM |
41 | Provides: iasl |
42 | Obsoletes: iasl | |
43 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
44 | ||
45 | %description | |
46 | ACPI Component Architecture - an assembler and disassembler for DSDT | |
be632254 JB |
47 | tables. |
48 | ||
49 | %description -l pl.UTF-8 | |
50 | Pakiet ACPI Component Architecture zawiera asembler i disasembler do | |
51 | tablic DSDT. | |
fa3091f1 AM |
52 | |
53 | %prep | |
77760c90 | 54 | %setup -q -n %{name}-unix-%{version} |
f3dfbd7c ER |
55 | tar -x --strip-components=1 -f %{SOURCE1} |
56 | %patch0 -p1 | |
57 | %patch1 -p1 | |
58 | %patch2 -p1 | |
59 | %patch3 -p1 | |
60 | %patch4 -p1 | |
61 | %patch5 -p1 | |
62 | %patch6 -p1 | |
77760c90 JB |
63 | %patch8 -p1 |
64 | %patch9 -p1 | |
65 | %patch10 -p1 | |
66 | %patch11 -p1 | |
67 | %patch12 -p1 | |
68 | %patch13 -p1 | |
fa3091f1 | 69 | |
fa3091f1 | 70 | %build |
d7d54e98 ER |
71 | %define makeopts \\\ |
72 | HOST=_LINUX \\\ | |
73 | CC="%{__cc}" \\\ | |
74 | OPT_CFLAGS="%{rpmcflags}" \\\ | |
b3f0bd18 | 75 | OPT_LDFLAGS="%{rpmcflags} %{rpmldflags}" |
fa3091f1 | 76 | |
d7d54e98 ER |
77 | %{__make} %{makeopts} |
78 | ||
79 | %if %{with tests} | |
d7d54e98 ER |
80 | %{__make} %{makeopts} -C tests/templates |
81 | ||
82 | cd tests | |
83 | ||
84 | # ASL tests | |
85 | ./aslts.sh # relies on non-zero exit | |
86 | [ $? -eq 0 ] || exit 1 | |
87 | ||
d7d54e98 ER |
88 | # misc tests |
89 | #./run-misc-tests.sh $RPM_BUILD_ROOT%{_bindir} %{version} | |
90 | ||
91 | # Template tests | |
92 | cd templates | |
93 | if [ -f diff.log ]; then | |
94 | if [ -s diff.log ]; then | |
95 | # implies errors occurred | |
96 | exit 1 | |
97 | fi | |
98 | fi | |
99 | cd .. | |
100 | %endif | |
101 | ||
fa3091f1 AM |
102 | %install |
103 | rm -rf $RPM_BUILD_ROOT | |
77760c90 | 104 | |
659b3445 JR |
105 | %{__make} install \ |
106 | DESTDIR=$RPM_BUILD_ROOT | |
fa3091f1 | 107 | |
77760c90 JB |
108 | install -d $RPM_BUILD_ROOT%{_mandir}/man1 |
109 | cp -p %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} %{SOURCE9} \ | |
110 | $RPM_BUILD_ROOT%{_mandir}/man1 | |
111 | ||
112 | %{__rm} $RPM_BUILD_ROOT%{_bindir}/acpiexamples | |
113 | ||
be632254 JB |
114 | %clean |
115 | rm -rf $RPM_BUILD_ROOT | |
116 | ||
fa3091f1 AM |
117 | %files |
118 | %defattr(644,root,root,755) | |
d7d54e98 | 119 | %doc changes.txt source/compiler/new_table.txt |
659b3445 JR |
120 | %attr(755,root,root) %{_bindir}/acpibin |
121 | %attr(755,root,root) %{_bindir}/acpidump | |
122 | %attr(755,root,root) %{_bindir}/acpiexec | |
123 | %attr(755,root,root) %{_bindir}/acpihelp | |
124 | %attr(755,root,root) %{_bindir}/acpinames | |
76966ddc | 125 | %attr(755,root,root) %{_bindir}/acpisrc |
659b3445 | 126 | %attr(755,root,root) %{_bindir}/acpixtract |
be632254 | 127 | %attr(755,root,root) %{_bindir}/iasl |
77760c90 JB |
128 | %{_mandir}/man1/acpibin.1* |
129 | %{_mandir}/man1/acpidump.1* | |
130 | %{_mandir}/man1/acpiexec.1* | |
131 | %{_mandir}/man1/acpihelp.1* | |
132 | %{_mandir}/man1/acpinames.1* | |
133 | %{_mandir}/man1/acpisrc.1* | |
134 | %{_mandir}/man1/acpixtract.1* | |
135 | %{_mandir}/man1/iasl.1* |