]> git.pld-linux.org Git - packages/perl.git/blob - perl.spec
- added using %%{__make} macro.
[packages/perl.git] / perl.spec
1 %define         perlver 5.005
2 %define         perlrel 03
3 %define         perlthread -thread
4 %define         __find_provides %{_builddir}/%{name}%{version}/find-perl-provides
5 Summary:        Practical Extraction and Report Language
6 Summary(de):    Praktische Extraktions- und Berichtsprache 
7 Summary(fr):    Practical Extraction and Report Language (Perl)
8 Summary(pl):    Practical Extraction and Report Language (Perl)
9 Summary(tr):    Kabuk yorumlama dili
10 Name:           perl
11 Version:        %{perlver}_%{perlrel}
12 Release:        15
13 License:        GPL
14 Group:          Utilities/Text
15 Group(fr):      Utilitaires/Texte
16 Group(pl):      Narzêdzia/Tekst
17 Epoch:          1
18 Source0:        ftp://ftp.perl.org/pub/perl/CPAN/src/5.0/%{name}%{version}.tar.gz
19 Patch0:         perl-noroot_install.patch
20 Patch1:         perl-DESTDIR.patch
21 Patch2:         perl-File-Spec-0.7.patch
22 Patch3:         perl-CPAN-1.50.patch
23 Patch4:         perl-find-provides.patch
24 URL:            http://www.perl.org/
25 Requires:       csh
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
29 Perl is an interpreted language optimized for scanning arbitrary text
30 files, extracting information from those text files, and printing
31 reports based on that information. It's also a good language for many
32 system management tasks. The language is intended to be practical
33 (easy to use, efficient, complete) rather than beautiful (tiny,
34 elegant, minimal).
35
36 This version has support for threads compiled in.
37
38 %description -l de
39 Perl ist eine Interpreter-Sprache, die zum Durchsuchen beliebiger
40 Text- dateien, Extrahieren von Informationen aus diesen Dateien und
41 Drucken von auf diesen Informationen basierenden Berichten optimiert
42 ist. Die Sprache eignet sich außerdem für viele
43 Systemverwaltungsaufgaben. Sie ist eher praktisch (einfache
44 Anwendung,effizient, vollständig) als schön (winzig, elegant,
45 minimal).
46
47 %description -l fr
48 Perl est un langage interprété, optimisé pour filtrer des fichiers
49 texte, extraire des informations de ces fichiers, et imprimer des
50 rapports basés sur ces informations. C'est aussi un bon langage pour
51 de nombreuses procédures de gestion système. Ce langage se veut
52 pratique (simple à utiliser, efficace, complet) autant qu'agréable
53 (conscrit, élégant, minimal).
54
55 %description -l pl
56 Perl jest jêzykiem przeznaczonym do skanowania plików tekstowych,
57 wyci±gania z nich informacji i drukowania raportu bazuj±cego na tych
58 informacjach. Jest równie¿ doskona³ym jêzykiem dla wielu narzêdzi do
59 nadzoru systemu. Jêzyk ten jest w zamierzeniu praktycznym (³atwym w
60 u¿yciu, efektywnym, kompletnym) bardziej ni¿ piêkny ;) (skromny,
61 elegancki, minimalny).
62
63 %description -l tr
64 Perl, metin dosyalarýný taramak, bu metin dosyalarýndan bilgi çýkarmak
65 ve bu bilgiye dayalý raporlar hazýrlamak icin geliþtirilmiþ bir
66 yorumlamalý dildir. Ayrýca pek çok sistem yönetimi görevleri için de
67 yararlý yetenekleri vardýr. Perl, güzel (ufak, zarif, minimum)
68 olmaktan çok, pratik olmaya yönelik (kullanýmý kolay, verimli,
69 eksiksiz) olarak tasarlanmýþtýr.
70
71 %package -n sperl
72 Summary:        Practical Extraction and Report Language (SUID root binary)
73 Summary(pl):    Practical Extraction and Report Language (SUID root binaria)
74 Group:          Utilities/Text
75 Group(fr):      Utilitaires/Texte
76 Group(pl):      Narzêdzia/Tekst
77 Requires:       %{name} = %{version}
78
79 %description -n sperl
80 Practical Extraction and Report Language (SUID root binary).
81
82 %description -n sperl -l pl
83 Practical Extraction and Report Language (SUID root binaria).
84
85 %prep
86 %setup  -q -n %{name}%{version}
87 %patch0 -p1
88 %patch1 -p1
89 %patch2 -p1
90 %patch3 -p1
91 %patch4 -p1
92
93 for i in find-* ; do
94         mv $i $i.old
95         sed "s|FPPATH|%{_builddir}/%{name}%{version}|g" < $i.old > $i
96         chmod 755 $i; rm -f $i.old
97 done
98
99 %build
100 # this is gross
101 cat > config.over <<EOF
102 installprefix=$RPM_BUILD_ROOT%{_prefix}
103 test -d \$installprefix || mkdir -p \$installprefix
104 test -d \$installprefix/bin || mkdir -p \$installprefix/bin
105 installarchlib=\`echo \$installarchlib | sed "s!\$prefix!\$installprefix!"\`
106 installbin=\`echo \$installbin | sed "s!\$prefix!\$installprefix!"\`
107 installman1dir=\`echo \$installman1dir | sed "s!\$prefix!\$installprefix!"\`
108 installman3dir=\`echo \$installman3dir | sed "s!\$prefix!\$installprefix!"\`
109 installprivlib=\`echo \$installprivlib | sed "s!\$prefix!\$installprefix!"\`
110 installscript=\`echo \$installscript | sed "s!\$prefix!\$installprefix!"\`
111 installsitelib=\`echo \$installsitelib | sed "s!\$prefix!\$installprefix!"\`
112 installsitearch=\`echo \$installsitearch | sed "s!\$prefix!\$installprefix!"\`
113 EOF
114
115 sh Configure \
116         -des \
117         -Dcc=gcc \
118         -Darchname=%{_target_platform} \
119         -Dprefix=%{_prefix} \
120         -Dscriptdir=%{_bindir} \
121         -Dman1dir=%{_mandir}/man1 \
122         -Dman3dir=%{_mandir}/man3 \
123         -Dman3ext=3pm \
124         -Doptimize="$RPM_OPT_FLAGS" \
125         -Duseshrplib \
126         -Dusethreads \
127         -Dd_dosuid \
128         -Ud_setresuid \
129         -Ud_setresgid 
130
131 make
132
133 # Strip binaries (done now rather than at install)
134
135 strip {perl,suidperl,x2p/a2p}
136
137 %install
138 rm -rf $RPM_BUILD_ROOT
139 install -d $RPM_BUILD_ROOT
140
141 %{__make} install
142 install utils/pl2pm $RPM_BUILD_ROOT%{_bindir}/pl2pm
143
144 ## Generate *.ph files with a trick (based on RH).
145 # Everybody else is using it so why can't we? ;)
146 %{__make} all -f - <<EOF
147 PKGS    = glibc-devel gdbm-devel gpm-devel libgr-devel libjpeg-devel \
148         libpng-devel libtiff-devel ncurses-devel popt-devel \
149         zlib-devel binutils libelf e2fsprogs-devel pam-devel pwdb-devel \
150         rpm-devel
151 STDH    = \$(filter /usr/include/%%, \$(shell rpm -q --queryformat '[%%{FILENAMES}\n]' \$(PKGS)))
152 STDH    += \$(wildcard /usr/include/linux/*.h) \$(wildcard /usr/include/asm/*.h) \$(wildcard /usr/include/scsi/*.h)
153 GCCDIR  = \$(shell gcc --print-file-name include)
154 GCCH    = \$(filter \$(GCCDIR)/%%, \$(shell rpm -q --queryformat '[%%{FILENAMES}\n]' gcc))
155
156 LIBPATH = %{_builddir}/%{name}%{perlver}_%{perlrel}
157 PERLLIB = $RPM_BUILD_ROOT%{_libdir}/perl5/%{perlver}%{perlrel}
158 PERLBIN = $RPM_BUILD_ROOT%{_bindir}/perl
159 PERL    = LD_LIBRARY_PATH=\$(LIBPATH) PERL5LIB=\$(PERLLIB) \$(PERLBIN)
160 PHDIR   = \$(PERLLIB)/%{_target_platform}%{perlthread}
161 PHBIN   = $RPM_BUILD_ROOT%{_bindir}/h2ph
162 H2PH    = \$(PERL) \$(PHBIN) -d \$(PHDIR)/
163
164 all: std-headers gcc-headers
165
166 std-headers: \$(STDH)
167         cd /usr/include && \$(H2PH) \$(STDH:/usr/include/%%=%%)
168
169 gcc-headers: \$(GCCH)
170         cd \$(GCCDIR) && \$(H2PH) \$(GCCH:\$(GCCDIR)/%%=%%)
171
172 EOF
173
174 ( cd $RPM_BUILD_ROOT%{_libdir}/perl5/%{perlver}%{perlrel}/%{_target_platform}%{perlthread}/
175
176 ## Fix permissions
177 find . -name \*.ph -exec chmod 644 {} \;
178 find . -type d -exec chmod 755 {} \;
179
180 ## Fix paths
181 mv .packlist .packlist.old
182 sed "s|$RPM_BUILD_ROOT||g" < .packlist.old > .packlist
183 rm -f .packlist.old
184
185 mv Config.pm Config.pm.old
186 sed "s|$RPM_BUILD_ROOT||g" < Config.pm.old > Config.pm
187 rm -f Config.pm.old )
188
189 gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man*/* \
190         README Change*
191
192 find $RPM_BUILD_ROOT%{_libdir}/perl5 -name \*.so -exec strip --strip-unneeded {} \;
193
194 %clean
195 rm -rf $RPM_BUILD_ROOT
196
197 %files
198 %defattr(644,root,root,755)
199 %doc README.gz Change*
200
201 %attr(755,root,root) %{_bindir}/a2p
202 %attr(755,root,root) %{_bindir}/c2ph
203 %attr(755,root,root) %{_bindir}/find2perl
204 %attr(755,root,root) %{_bindir}/h2ph
205 %attr(755,root,root) %{_bindir}/h2xs
206 %attr(755,root,root) %{_bindir}/perl
207 %attr(755,root,root) %{_bindir}/perl%{perlver}%{perlrel}
208 %attr(755,root,root) %{_bindir}/perlbug
209 %attr(755,root,root) %{_bindir}/perlcc
210 %attr(755,root,root) %{_bindir}/perldoc
211 %attr(755,root,root) %{_bindir}/pl2pm
212 %attr(755,root,root) %{_bindir}/pod2html
213 %attr(755,root,root) %{_bindir}/pod2latex
214 %attr(755,root,root) %{_bindir}/pod2man
215 %attr(755,root,root) %{_bindir}/pod2text
216 %attr(755,root,root) %{_bindir}/pstruct
217 %attr(755,root,root) %{_bindir}/s2p
218 %attr(755,root,root) %{_bindir}/splain
219
220 %dir %{_libdir}/perl5
221 %attr( - ,root,root) %{_libdir}/perl5/*
222 #%dir %{_libdir}/site_perl
223 #%attr( - ,root,root) %{_libdir}/site_perl/*
224 %{_mandir}/man[13]/*
225
226 %files -n sperl
227 %defattr(644,root,root,755)
228 %attr(4755,root,root) %{_bindir}/sperl%{perlver}%{perlrel}
229 %attr(4755,root,root) %{_bindir}/suidperl
This page took 0.049528 seconds and 4 git commands to generate.