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