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