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