]>
Commit | Line | Data |
---|---|---|
e7a7f6cd | 1 | Summary: Microsoft PE executable type detector |
71290a77 | 2 | Summary(pl.UTF-8): Detector typu plików wykonywalnych PE Microsoftu |
e7a7f6cd | 3 | Name: binfmt-detector |
4 | Version: 0.1 | |
f4b97792 | 5 | Release: 3 |
e7a7f6cd | 6 | License: GPL |
7 | Group: Base | |
8 | Source0: http://team.pld-linux.org/~wolf/%{name}.tar.gz | |
9 | # Source0-md5: 11623bddbeb536e88c47c8a1aedc9189 | |
10 | Source1: %{name}.init | |
3a143baa | 11 | BuildRequires: rpmbuild(macros) >= 1.268 |
f4b97792 | 12 | Requires(post,preun): /sbin/chkconfig |
3d90754e | 13 | Requires: rc-scripts |
e7a7f6cd | 14 | Conflicts: wine <= 1:0.9.12-1 |
15 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
16 | ||
17 | %description | |
18 | This utility determines the Microsoft PE executable file's type | |
19 | (Native, .NET CLR) and runs it using the appropriate runtime (Wine, | |
20 | Mono). | |
21 | ||
22 | It is inteded to be used in a Linux binfmt configuration, since binfmt | |
23 | itself is incapable of reliably distinguishing between various PE file | |
24 | types (since they have no different "magic string") and runtimes | |
25 | refuse to run files which they don't support (CLR runtimes refuse to | |
26 | run Native images and vice versa). | |
27 | ||
71290a77 JR |
28 | %description -l pl.UTF-8 |
29 | To narzędzie określa typ pliku wykonywalnego PE Microsoftu (natywny, | |
30 | .NET CLR) i uruchamia odpowiednie środowisko wykonawcze (Wine, Mono). | |
e7a7f6cd | 31 | |
71290a77 JR |
32 | Jest używane w połączeniu z linuksowym binfmt, ponieważ samo binfmt |
33 | nie jest w stanie odróżnić różnych typów plików PE (nie zawierają one | |
34 | różnych "magicznych ciągów"), a środowiska uruchomieniowe nie | |
35 | pozwalają uruchomić nieobsługiwanych przez siebie plików (CLR nie | |
36 | uruchamia natywnych obrazów i vice versa). | |
e7a7f6cd | 37 | |
38 | %prep | |
39 | %setup -q -n %{name} | |
40 | ||
41 | %build | |
42 | %{__cc} %{rpmcflags} binfmt-detector-cli.c -o binfmt-detector-cli | |
43 | ||
44 | %install | |
45 | rm -rf $RPM_BUILD_ROOT | |
3a143baa | 46 | install -d $RPM_BUILD_ROOT{%{_bindir},/etc/rc.d/init.d} |
e7a7f6cd | 47 | |
48 | install binfmt-detector-cli $RPM_BUILD_ROOT%{_bindir} | |
49 | install binfmt-detector.sh $RPM_BUILD_ROOT%{_bindir} | |
50 | ||
3a143baa | 51 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/binfmt-detector |
e7a7f6cd | 52 | |
53 | %clean | |
54 | rm -rf $RPM_BUILD_ROOT | |
55 | ||
56 | %post | |
57 | /sbin/chkconfig --add binfmt-detector | |
3a143baa | 58 | %service binfmt-detector restart |
e7a7f6cd | 59 | |
60 | %preun | |
61 | if [ "$1" = "0" ]; then | |
3a143baa | 62 | %service binfmt-detector stop |
e7a7f6cd | 63 | /sbin/chkconfig --del binfmt-detector |
64 | fi | |
65 | ||
66 | %files | |
67 | %defattr(644,root,root,755) | |
68 | %doc README | |
69 | %attr(755,root,root) %{_bindir}/* | |
3a143baa | 70 | %attr(754,root,root) /etc/rc.d/init.d/binfmt-detector |