]> git.pld-linux.org Git - SPECS.git/blob - v86d.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / v86d.spec
1 #
2 # Conditional build:
3 %bcond_with     x86emu  # x86emu instead of LRMI/vm86
4 %bcond_with     initrd  # build klibc based helper for initrd/initramfs
5
6 %ifnarch %{ix86}
7 %define         with_x86emu     1
8 %endif
9 Summary:        uvesafb userspace helper that runs x86 code in an emulated environment
10 Summary(pl.UTF-8):      Program pomocniczy uvesafb uruchamiający kod x86 w emulowanym środowisku
11 Name:           v86d
12 Version:        0.1.10
13 Release:        3
14 License:        GPL v2
15 Group:          Applications/System
16 Source0:        http://dev.gentoo.org/~spock/projects/uvesafb/archive/%{name}-%{version}.tar.bz2
17 # Source0-md5:  51c792ba7b874ad8c43f0d3da4cfabe0
18 Source1:        %{name}-uvesafb.conf
19 Patch0:         %{name}-system-klibc.patch
20 Patch1:         %{name}-system-libs.patch
21 Patch2:         %{name}-klibc-ldflags.patch
22 URL:            http://dev.gentoo.org/~spock/projects/uvesafb/
23 BuildRequires:  linux-libc-headers >= 7:2.6.24
24 %if %{with initrd}
25 BuildRequires:  klibc-static >= 1.5.8-1
26         %if %{with x86emu}
27 BuildRequires:  x86emu-klibc-devel
28         %else
29 BuildRequires:  lrmi-klibc-devel >= 0.10-6
30         %endif
31 %endif
32 %if %{with x86emu}
33 BuildRequires:  x86emu-devel
34 %else
35 BuildRequires:  lrmi-devel >= 0.10-4
36 Requires:       lrmi >= 0.10-4
37 %endif
38 ExclusiveArch:  %{ix86} %{x8664}
39 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41 %define         _sbindir        /sbin
42
43 %description
44 v86d is the userspace helper that runs x86 code in an emulated
45 environment, used by uvesafb Linux kernel driver. Currently it
46 supports the x86 and x86-64 architectures.
47
48 %description -l pl.UTF-8
49 v86d to działający w przestrzeni użytkownika program pomocniczy
50 uruchamiający kod x86. Jest wykorzystywany przez sterownik jądra
51 Linuksa uvesafb. Obecnie obsługuje architektury x86 i x86-64.
52
53 %package initrd
54 Summary:        uvesafb userspace helper that runs x86 code in an emulated environment - initrd version
55 Summary(pl.UTF-8):      Program pomocniczy uvesafb uruchamiający kod x86 w emulowanym środowisku - wersja dla initrd
56 Group:          Base
57 Requires:       %{name} = %{version}-%{release}
58
59 %description initrd
60 uvesafb userspace helper that runs x86 code in an emulated environment
61 - initrd version.
62
63 %description initrd -l pl.UTF-8
64 Program pomocniczy uvesafb uruchamiający kod x86 w emulowanym
65 środowisku - wersja dla initrd.
66
67 %prep
68 %setup -q
69 %patch0 -p1
70 %patch1 -p1
71 sed -i 's:-g -O2:$(OPTFLAGS):' Makefile
72 %patch2 -p1
73
74 %build
75 %if %{with initrd}
76 # not ac
77 ./configure \
78         --with-klibc \
79         --with%{!?with_x86emu:out}-x86emu
80
81 %{__make} \
82         LIB=%{_lib} \
83         CFLAGS="%{rpmcflags} -Os %{!?with_x86emu:-I/usr/include/klibc/lrmi}"
84
85 mkdir -p initrd
86 cp v86d initrd/
87 %{__make} clean
88 %endif
89
90 # not ac
91 ./configure \
92         --without-klibc \
93         --with%{!?with_x86emu:out}-x86emu
94
95 %{__make} \
96         CC="%{__cc}" \
97         OPTFLAGS="%{rpmcflags} %{!?with_x86emu:-I/usr/include/lrmi}"
98
99 %install
100 rm -rf $RPM_BUILD_ROOT
101 install -d $RPM_BUILD_ROOT{%{_sbindir},/etc/modprobe.d}
102
103 install %{name} $RPM_BUILD_ROOT%{_sbindir}/%{name}
104 install %{SOURCE1} $RPM_BUILD_ROOT/etc/modprobe.d/uvesafb.conf
105
106 %if %{with initrd}
107 install -d $RPM_BUILD_ROOT%{_libdir}/initrd
108 install initrd/%{name} $RPM_BUILD_ROOT%{_libdir}/initrd
109 %endif
110
111 %clean
112 rm -rf $RPM_BUILD_ROOT
113
114 %files
115 %defattr(644,root,root,755)
116 %doc AUTHORS ChangeLog README TODO
117 %attr(755,root,root) %{_sbindir}/v86d
118 %config(noreplace) %verify(not md5 mtime size) /etc/modprobe.d/uvesafb.conf
119
120 %if %{with initrd}
121 %files initrd
122 %defattr(644,root,root,755)
123 %attr(755,root,root) %{_libdir}/initrd/v86d
124 %endif
This page took 0.845495 seconds and 3 git commands to generate.