]>
Commit | Line | Data |
---|---|---|
464196bd ER |
1 | # |
2 | # Conditional build: | |
01e8ecf3 JB |
3 | %bcond_without selinux # SELinux support |
4 | %bcond_without tests # tests after build | |
464196bd | 5 | # |
6b761a7e | 6 | Summary: Tool to optimize relocations in object files |
1c8b0f3e | 7 | Summary(pl.UTF-8): Narzędzie optymalizujące relokacje w plikach obiektów |
6b761a7e | 8 | Name: prelink |
01e8ecf3 JB |
9 | Version: 20130503 |
10 | Release: 1 | |
11 | License: GPL v2+ | |
6b761a7e | 12 | Group: Development/Tools |
01e8ecf3 JB |
13 | # backup: http://distfiles.gentoo.org/distfiles/%{name}-%{version}.tar.bz2 |
14 | Source0: http://people.redhat.com/jakub/prelink/%{name}-%{version}.tar.bz2 | |
15 | # Source0-md5: 4cab1571718a9b25665bd025069a02c7 | |
c7a97c13 | 16 | Source1: %{name}.conf |
f6eab362 | 17 | Source2: http://people.redhat.com/jakub/prelink/%{name}.pdf |
570b7e41 | 18 | # Source2-md5: 50946b654da9ccb26230cc1e00ccc53c |
8a317ed3 ER |
19 | Source3: %{name}.cron |
20 | Source4: %{name}.sysconfig | |
a1647842 | 21 | Patch0: %{name}-Makefile.patch |
28f95e6a ER |
22 | Patch1: %{name}-fsync.patch |
23 | Patch2: %{name}-init.patch | |
24 | Patch3: %{name}-md5sha.patch | |
25 | Patch4: %{name}-prelink.h.patch | |
01e8ecf3 JB |
26 | Patch5: %{name}-tests.patch |
27 | BuildRequires: autoconf >= 2.13 | |
28 | BuildRequires: automake >= 1.4 | |
bac337c2 | 29 | BuildRequires: elfutils-devel |
a372cbc1 | 30 | BuildRequires: glibc-devel >= 2.3 |
464196bd | 31 | %{?with_selinux:BuildRequires: libselinux-devel} |
5066e6fa | 32 | BuildRequires: libstdc++-devel |
b6fb5696 | 33 | BuildRequires: libtool |
f686102d | 34 | Requires: glibc >= 2.3.4-0.20040722 |
32f46aae | 35 | Conflicts: paxtest |
6b761a7e AM |
36 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
37 | ||
38 | %description | |
39 | This program replaces relocations in object files with less expensive | |
40 | ones. This allows faster run-time dynamic linking. | |
41 | ||
8b2b2ec8 JR |
42 | %description -l pl.UTF-8 |
43 | Ten program zamienia relokacje w plikach obiektów na mniej wymagające. | |
44 | Dzięki temu program jest szybciej konsolidowany w momencie | |
4fb4c350 | 45 | uruchomienia. |
6b761a7e AM |
46 | |
47 | %prep | |
2e9d022e | 48 | %setup -q -n %{name} |
a1647842 | 49 | %patch0 -p1 |
28f95e6a ER |
50 | %patch1 -p1 |
51 | %patch2 -p1 | |
52 | %patch3 -p1 | |
53 | %patch4 -p1 | |
01e8ecf3 | 54 | %patch5 -p1 |
6b761a7e AM |
55 | |
56 | %build | |
29fc95bd TP |
57 | %{__libtoolize} |
58 | %{__aclocal} -I m4 | |
29fc95bd TP |
59 | %{__autoconf} |
60 | %{__autoheader} | |
570b7e41 | 61 | %{__automake} |
a1647842 | 62 | %configure \ |
464196bd ER |
63 | --enable-static=no \ |
64 | %{!?with_selinux:ac_cv_lib_selinux_is_selinux_enabled=no} \ | |
65 | ||
d841b6cd | 66 | %{__make} \ |
67 | CLFAGS="%{rpmcflags} -D_LARGEFILE64_SOURCE" | |
8a317ed3 ER |
68 | %if %{with tests} |
69 | %{__make} -C testsuite check-harder | |
70 | %{__make} -C testsuite check-cycle | |
71 | %endif | |
6b761a7e AM |
72 | |
73 | %install | |
74 | rm -rf $RPM_BUILD_ROOT | |
8a317ed3 | 75 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{sysconfig,rpm,cron.daily}} |
6b761a7e AM |
76 | |
77 | %{__make} install \ | |
78 | DESTDIR=$RPM_BUILD_ROOT | |
79 | ||
c7a97c13 | 80 | install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir} |
570b7e41 | 81 | install %{SOURCE2} . |
8a317ed3 ER |
82 | cp -a %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.daily/prelink |
83 | cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/prelink | |
d504534f | 84 | |
315bc61a | 85 | install -d $RPM_BUILD_ROOT/var/{lib/misc,log/prelink} |
8a317ed3 ER |
86 | touch $RPM_BUILD_ROOT/var/lib/misc/prelink.full |
87 | touch $RPM_BUILD_ROOT/var/lib/misc/prelink.quick | |
88 | touch $RPM_BUILD_ROOT/var/lib/misc/prelink.force | |
315bc61a | 89 | touch $RPM_BUILD_ROOT/var/log/prelink/prelink.log |
8a317ed3 ER |
90 | |
91 | cat > $RPM_BUILD_ROOT/etc/rpm/macros.prelink <<'EOF' | |
540a576b AF |
92 | # rpm-4.1 verifies prelinked libraries using a prelink undo helper. |
93 | # Note: The 2nd token is used as argv[0] and "library" is a | |
94 | # placeholder that will be deleted and replaced with the appropriate | |
95 | # library file path. | |
8a317ed3 | 96 | %%__prelink_undo_cmd %{_sbindir}/prelink prelink -y library |
540a576b AF |
97 | EOF |
98 | ||
6b761a7e AM |
99 | %clean |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | ||
8a317ed3 ER |
102 | %post |
103 | umask 002 | |
104 | touch /var/lib/misc/prelink.force | |
105 | ||
6b761a7e AM |
106 | %files |
107 | %defattr(644,root,root,755) | |
570b7e41 | 108 | %doc AUTHORS ChangeLog NEWS README THANKS TODO prelink.pdf |
8a317ed3 ER |
109 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/prelink.conf |
110 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/prelink | |
111 | /etc/rpm/macros.prelink | |
112 | %attr(755,root,root) /etc/cron.daily/prelink | |
01e8ecf3 JB |
113 | %attr(755,root,root) %{_bindir}/execstack |
114 | %attr(755,root,root) %{_sbindir}/prelink | |
115 | %{_mandir}/man8/execstack.8* | |
116 | %{_mandir}/man8/prelink.8* | |
5e20a31d ER |
117 | %verify(not md5 mtime size) %ghost %config(missingok,noreplace) /var/lib/misc/prelink.full |
118 | %verify(not md5 mtime size) %ghost %config(missingok,noreplace) /var/lib/misc/prelink.quick | |
119 | %verify(not md5 mtime size) %ghost %config(missingok,noreplace) /var/lib/misc/prelink.force | |
315bc61a AM |
120 | %dir /var/log/prelink |
121 | %verify(not md5 mtime size) %ghost %config(missingok,noreplace) /var/log/prelink/prelink.log |