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