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