]> git.pld-linux.org Git - packages/acpica.git/blob - acpica.spec
ca1a6d6a797d28e98757b4dfa7d572aa0bf92592
[packages/acpica.git] / acpica.spec
1 #
2 # Conditional build:
3 %bcond_with     tests           # build without tests
4
5 Summary:        ACPI Component Architecture - an assembler and disassembler for DSDT tables
6 Summary(pl.UTF-8):      ACPI CA - asembler i disasembler dla tablic DSDT
7 Name:           acpica
8 Version:        20141107
9 Release:        1
10 License:        GPL v2
11 Group:          Development/Tools
12 Source0:        https://acpica.org/sites/acpica/files/%{name}-unix2-%{version}.tar.gz
13 # Source0-md5:  af9f1e67023fa85f9d6abf28b5345abd
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
24 URL:            https://acpica.org/
25 BuildRequires:  bison
26 BuildRequires:  flex
27 BuildRequires:  sed >= 4.0
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
34 tables.
35
36 %description -l pl.UTF-8
37 Pakiet ACPI Component Architecture zawiera asembler i disasembler do
38 tablic DSDT.
39
40 %prep
41 %setup -q -n %{name}-unix2-%{version}
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
51
52 %build
53 %define makeopts \\\
54         HOST=_LINUX \\\
55         CC="%{__cc}" \\\
56         OPT_CFLAGS="%{rpmcflags}" \\\
57         OPT_LDFLAGS="%{rpmcflags} %{rpmldflags}"
58
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
93 %install
94 rm -rf $RPM_BUILD_ROOT
95 %{__make} install \
96         DESTDIR=$RPM_BUILD_ROOT
97
98 %clean
99 rm -rf $RPM_BUILD_ROOT
100
101 %files
102 %defattr(644,root,root,755)
103 %doc changes.txt source/compiler/new_table.txt
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
109 %attr(755,root,root) %{_bindir}/acpisrc
110 %attr(755,root,root) %{_bindir}/acpixtract
111 %attr(755,root,root) %{_bindir}/iasl
This page took 0.027403 seconds and 2 git commands to generate.